summaryrefslogtreecommitdiff
path: root/lib/gallery.php
diff options
context:
space:
mode:
authorEvan Prodromou <evan@prodromou.name>2008-11-20 09:29:14 -0500
committerEvan Prodromou <evan@prodromou.name>2008-11-20 09:29:14 -0500
commitcbed94166717913f2ba8399b16e3f685d0e31c5c (patch)
treeabb109d6426624bb2b2e9d067eadf1555a818bc0 /lib/gallery.php
parentc10a2e3fe29eb7cea1ac9bc18877b100896626e3 (diff)
links to different display options for subscriptions
darcs-hash:20081120142914-84dde-293e068ab92d9174bc270c35700809a1be9f19e1.gz
Diffstat (limited to 'lib/gallery.php')
-rw-r--r--lib/gallery.php28
1 files changed, 28 insertions, 0 deletions
diff --git a/lib/gallery.php b/lib/gallery.php
index f9d0b31fa..88e5c61f5 100644
--- a/lib/gallery.php
+++ b/lib/gallery.php
@@ -65,6 +65,9 @@ class GalleryAction extends Action {
common_show_header($profile->nickname . ": " . $this->gallery_type(),
NULL, $profile,
array($this, 'show_top'));
+
+ $this->display_links($page, $display);
+
$this->show_gallery($profile, $page, $display);
common_show_footer();
}
@@ -186,4 +189,29 @@ class GalleryAction extends Action {
function div_class() {
return '';
}
+
+ function display_links($page, $display) {
+
+ common_element_start('p');
+
+ switch ($display) {
+ case 'list':
+ common_element('span', NULL, _('List'));
+ common_text(' | ');
+ common_element('a', array('href' => common_local_url($this->trimmed('action'),
+ array('display' => 'icons',
+ 'page' => floor(($page * AVATARS_PER_PAGE) / PROFILES_PER_PAGE)))),
+ _('Icons'));
+ break;
+ default:
+ common_element('a', array('href' => common_local_url($this->trimmed('action'),
+ array('page' => floor(($page * PROFILES_PER_PAGE) / AVATARS_PER_PAGE)))),
+ _('List'));
+ common_text(' | ');
+ common_element('span', NULL, _('Icons'));
+ break;
+ }
+
+ common_element_end('p');
+ }
} \ No newline at end of file