summaryrefslogtreecommitdiff
path: root/themes
diff options
context:
space:
mode:
authorBharat Mediratta <bharat@menalto.com>2008-12-31 07:06:10 +0000
committerBharat Mediratta <bharat@menalto.com>2008-12-31 07:06:10 +0000
commit44c987e89e7fd3babebdc4835c1225b6d7869df1 (patch)
tree217853f2c70b1c39c2e3687409287729dea7d18b /themes
parentb7f451635a043a98d75ccba3e69597e8ea11226f (diff)
Add sibling information on photo pages and a very simple next/previous interface.
Diffstat (limited to 'themes')
-rw-r--r--themes/default/views/pager.html.php2
-rw-r--r--themes/default/views/photo.html.php11
2 files changed, 12 insertions, 1 deletions
diff --git a/themes/default/views/pager.html.php b/themes/default/views/pager.html.php
index 76cb35cd..b9dbc2e8 100644
--- a/themes/default/views/pager.html.php
+++ b/themes/default/views/pager.html.php
@@ -1,7 +1,7 @@
<? defined("SYSPATH") or die("No direct script access."); ?>
<? // See http://docs.kohanaphp.com/libraries/pagination ?>
<ul id="gPager">
- <li><?= sprintf(_("Items %d - %d of %d"), $current_first_item, $current_last_item, $total_items) ?></li>
+ <li><?= sprintf(_("Photos %d - %d of %d"), $current_first_item, $current_last_item, $total_items) ?></li>
<? if ($first_page): ?>
<li class="first"><a href="<?= str_replace('{page}', 1, $url) ?>"><?= _("first") ?></a></li>
<? else: ?>
diff --git a/themes/default/views/photo.html.php b/themes/default/views/photo.html.php
index 7cfe542a..88047381 100644
--- a/themes/default/views/photo.html.php
+++ b/themes/default/views/photo.html.php
@@ -12,3 +12,14 @@
<?= $theme->photo_bottom() ?>
</div>
+
+<? if ($position > 1): ?>
+<a href="<?= url::site("{$previous_item->type}s/$previous_item->id") ?>"><?= _("previous") ?></a>
+<? endif ?>
+<?= sprintf(_("Viewing photo %d of %d"), $position, $sibling_count) ?>
+
+<? if ($position < $sibling_count): ?>
+<a href="<?= url::site("{$next_item->type}s/$next_item->id") ?>"><?= _("next") ?></a>
+<? endif ?>
+
+