diff options
author | Bharat Mediratta <bharat@menalto.com> | 2009-11-14 16:18:49 -0800 |
---|---|---|
committer | Bharat Mediratta <bharat@menalto.com> | 2009-11-14 16:20:36 -0800 |
commit | 29efb6ba9f3e2cf15f29b509f985890c33bc08fa (patch) | |
tree | 8fc4ad5dc1b7f1d8e9a54cb5db06f9522f4745f1 /modules/gallery/libraries/Theme_View.php | |
parent | 846f365db9d3c1b61ed4bd68316bd5e7b80e56ec (diff) |
Rename "pager" to "paginator" so that we differentiate page.html.php
from paginator.html.php
Diffstat (limited to 'modules/gallery/libraries/Theme_View.php')
-rw-r--r-- | modules/gallery/libraries/Theme_View.php | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/modules/gallery/libraries/Theme_View.php b/modules/gallery/libraries/Theme_View.php index 5e8bc728..19dc0829 100644 --- a/modules/gallery/libraries/Theme_View.php +++ b/modules/gallery/libraries/Theme_View.php @@ -140,26 +140,28 @@ class Theme_View_Core extends Gallery_View { * * See themes/wind/views/pager.html for documentation on the variables generated here. */ - public function pager() { - $v = new View("pager.html"); + public function paginator() { + $v = new View("paginator.html"); $v->page_type = $this->page_type; $v->first_page_url = null; $v->previous_page_url = null; $v->next_page_url = null; $v->last_page_url = null; - if ($this->page_type == "album") { + if ($this->page_type == "album" || $this->page_type = "tag") { $v->page = $this->page; $v->max_pages = $this->max_pages; $v->total = $this->children_count; + + $model = $this->page_type == "album" ? $this->item : $this->tag; if ($this->page != 1) { - $v->first_page_url = $this->item->url(); - $v->previous_page_url = $this->item->url("page=" . ($this->page - 1)); + $v->first_page_url = $model->url(); + $v->previous_page_url = $model->url("page=" . ($this->page - 1)); } if ($this->page != $this->max_pages) { - $v->next_page_url = $this->item->url("page=" . ($this->page + 1)); - $v->last_page_url = $this->item->url("page={$this->max_pages}"); + $v->next_page_url = $model->url("page=" . ($this->page + 1)); + $v->last_page_url = $model->url("page={$this->max_pages}"); } $v->first_visible_position = ($this->page - 1) * $this->page_size + 1; |