aboutsummaryrefslogtreecommitdiff
path: root/views/default/page/components
diff options
context:
space:
mode:
authorBrett Profitt <brett.profitt@gmail.com>2011-04-26 15:03:02 -0400
committerBrett Profitt <brett.profitt@gmail.com>2011-04-26 15:03:02 -0400
commitc80ba5aa03264dd64c20ed8ae222e87f9371a44d (patch)
tree9355d87a9ab4570b9e54685ad9869cd4fedd392f /views/default/page/components
parent581c2d35ae053aed07a607b8bb844603c48b7c2f (diff)
parent632cf13234d04a3f6b7acf67866a82e0bebde55c (diff)
downloadelgg-c80ba5aa03264dd64c20ed8ae222e87f9371a44d.tar.gz
elgg-c80ba5aa03264dd64c20ed8ae222e87f9371a44d.tar.bz2
Merge remote branch 'upstream/master'
Diffstat (limited to 'views/default/page/components')
-rw-r--r--views/default/page/components/gallery.php40
1 files changed, 9 insertions, 31 deletions
diff --git a/views/default/page/components/gallery.php b/views/default/page/components/gallery.php
index 1ba896836..e86b9f885 100644
--- a/views/default/page/components/gallery.php
+++ b/views/default/page/components/gallery.php
@@ -3,8 +3,6 @@
* Gallery view
*
* @uses $vars['items']
- *
- * @todo not complete - number of columns
*/
$items = $vars['items'];
@@ -21,8 +19,6 @@ $pagination = elgg_extract('pagination', $vars, true);
$offset_key = elgg_extract('offset_key', $vars, 'offset');
$position = elgg_extract('position', $vars, 'after');
-$num_columns = 4;
-
if ($pagination && $count) {
$nav .= elgg_view('navigation/pagination', array(
'offset' => $offset,
@@ -37,33 +33,15 @@ if ($position == 'before' || $position == 'both') {
}
?>
-<table class="elgg-gallery">
-<?php
-
-$col = 0;
-foreach ($items as $item) {
- if ($col == 0) {
- echo '<tr>';
- }
- $col++;
-
- echo '<td>';
- echo elgg_view_list_item($item, $vars);
- echo "</td>";
-
- if ($col == $num_columns) {
- echo '</tr>';
- $col = 0;
- }
-}
-
-if ($col > 0) {
- echo '</tr>';
-}
-
-?>
-
-</table>
+<ul class="elgg-gallery">
+ <?php
+ foreach ($items as $item) {
+ echo '<li>';
+ echo elgg_view_list_item($item, $vars);
+ echo "</li>";
+ }
+ ?>
+</ul>
<?php
if ($position == 'after' || $position == 'both') {