diff options
author | Bharat Mediratta <bharat@menalto.com> | 2011-08-27 20:56:03 -0700 |
---|---|---|
committer | Bharat Mediratta <bharat@menalto.com> | 2011-08-27 20:56:03 -0700 |
commit | 084c2717c0ddff6c5caa79c62abb3cdb9b4aea31 (patch) | |
tree | af0fc03f042d11715cbbb3d137390d7df706ec3c /modules/gallery/libraries/Theme_View.php | |
parent | dc21cf36b606048dc24532407d39bc8f5b4211fa (diff) | |
parent | 246f5b59cb0e525a5ff6eaffce6b13e9af7e70b2 (diff) |
Merge branch 'master' into bharat_dev
Diffstat (limited to 'modules/gallery/libraries/Theme_View.php')
-rw-r--r-- | modules/gallery/libraries/Theme_View.php | 47 |
1 files changed, 1 insertions, 46 deletions
diff --git a/modules/gallery/libraries/Theme_View.php b/modules/gallery/libraries/Theme_View.php index d0b35d3e..13e58004 100644 --- a/modules/gallery/libraries/Theme_View.php +++ b/modules/gallery/libraries/Theme_View.php @@ -38,6 +38,7 @@ class Theme_View_Core extends Gallery_View { $this->item = null; $this->tag = null; $this->set_global(array("theme" => $this, + "theme_info" => theme::get_info($this->theme_name), "user" => identity::active_user(), "page_type" => $page_type, "page_subtype" => $page_subtype, @@ -142,52 +143,6 @@ class Theme_View_Core extends Gallery_View { } /** - * Set up the data and render a pager. - * - * See themes/wind/views/pager.html for documentation on the variables generated here. - */ - public function paginator() { - $v = new View("paginator.html"); - $v->page_type = $this->page_type; - $v->page_subtype = $this->page_subtype; - $v->first_page_url = null; - $v->previous_page_url = null; - $v->next_page_url = null; - $v->last_page_url = null; - - if ($this->page_type == "collection") { - $v->page = $this->page; - $v->max_pages = $this->max_pages; - $v->total = $this->children_count; - - if ($this->page != 1) { - $v->first_page_url = url::site(url::merge(array("page" => 1))); - $v->previous_page_url = url::site(url::merge(array("page" => $this->page - 1))); - } - - if ($this->page != $this->max_pages) { - $v->next_page_url = url::site(url::merge(array("page" => $this->page + 1))); - $v->last_page_url = url::site(url::merge(array("page" => $this->max_pages))); - } - - $v->first_visible_position = ($this->page - 1) * $this->page_size + 1; - $v->last_visible_position = min($this->page * $this->page_size, $v->total); - } else if ($this->page_type == "item") { - $v->position = $this->position; - $v->total = $this->sibling_count; - if ($this->previous_item) { - $v->previous_page_url = $this->previous_item->url(); - } - - if ($this->next_item) { - $v->next_page_url = $this->next_item->url(); - } - } - - return $v; - } - - /** * Print out any site wide status information. */ public function site_status() { |