summaryrefslogtreecommitdiff
path: root/themes
diff options
context:
space:
mode:
Diffstat (limited to 'themes')
-rw-r--r--themes/default/views/album.html.php8
-rw-r--r--themes/default/views/pager.html.php28
2 files changed, 29 insertions, 7 deletions
diff --git a/themes/default/views/album.html.php b/themes/default/views/album.html.php
index 0d181536..034c9a9e 100644
--- a/themes/default/views/album.html.php
+++ b/themes/default/views/album.html.php
@@ -27,10 +27,4 @@
<? endforeach ?>
</ul>
- <div id="gPagination">
- Items 1-10 of 34
- <span class="first_inactive">first</span>
- <span class="previous_inactive">previous</span>
- <a href="#" class="next">next</a>
- <a href="#" class="last">last</a>
- </div>
+ <?= $theme->pager() ?>
diff --git a/themes/default/views/pager.html.php b/themes/default/views/pager.html.php
new file mode 100644
index 00000000..bec06696
--- /dev/null
+++ b/themes/default/views/pager.html.php
@@ -0,0 +1,28 @@
+<? defined("SYSPATH") or die("No direct script access."); ?>
+<? // See http://docs.kohanaphp.com/libraries/pagination ?>
+<div id="gPagination">
+ <?= sprintf(_("Photos %d - %d of %d"), $current_first_item, $current_last_item, $total_items) ?>
+ <? if ($first_page): ?>
+ <a href="<?= str_replace('{page}', 1, $url) ?>"><?= _("first") ?></a>
+ <? else: ?>
+ <span class="first_inactive"><?= _("first") ?></span>
+ <? endif ?>
+
+ <? if ($previous_page): ?>
+ <a href="<?= str_replace('{page}', $previous_page, $url) ?>"><?= _("previous") ?></a>
+ <? else: ?>
+ <span class="previous_inactive"><?= _("previous") ?></span>
+ <? endif ?>
+
+ <? if ($next_page): ?>
+ <a href="<?= str_replace('{page}', $next_page, $url) ?>"><?= _("next") ?></a>
+ <? else: ?>
+ <span class="next_inactive"><?= _("next") ?></span>
+ <? endif ?>
+
+ <? if ($last_page): ?>
+ <a href="<?= str_replace('{page}', $last_page, $url) ?>"><?= _("last") ?></a>
+ <? else: ?>
+ <span class="last_inactive"><?= _("last") ?></span>
+ <? endif ?>
+</div>