aboutsummaryrefslogtreecommitdiff
path: root/views/default/page/components/gallery.php
diff options
context:
space:
mode:
authorewinslow <ewinslow@36083f99-b078-4883-b0ff-0f9b5a30f544>2011-04-26 17:28:54 +0000
committerewinslow <ewinslow@36083f99-b078-4883-b0ff-0f9b5a30f544>2011-04-26 17:28:54 +0000
commit632cf13234d04a3f6b7acf67866a82e0bebde55c (patch)
tree9355d87a9ab4570b9e54685ad9869cd4fedd392f /views/default/page/components/gallery.php
parenteb714fba7a38845b73a3a0784b7f35b684f24396 (diff)
downloadelgg-632cf13234d04a3f6b7acf67866a82e0bebde55c.tar.gz
elgg-632cf13234d04a3f6b7acf67866a82e0bebde55c.tar.bz2
Fixes #3290: Fluid gallery w/o tables -- working great for fixed-width content
git-svn-id: http://code.elgg.org/elgg/trunk@9027 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'views/default/page/components/gallery.php')
-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') {