summaryrefslogtreecommitdiff
path: root/themes
diff options
context:
space:
mode:
authorBharat Mediratta <bharat@menalto.com>2009-11-17 13:42:51 -0800
committerBharat Mediratta <bharat@menalto.com>2009-11-17 14:04:45 -0800
commit1067e68292852f524fceda4c6cf7cd5f7110b234 (patch)
treeb42d9d2814a4a96bbdc63b5280cc22572402c0bb /themes
parentade642cff4a4ca810f468723b04efc6f229916d8 (diff)
Redesign the way that we consider page types to create buckets of page
types, and a subtype for specifics. Currently the top level bucket collection, item, other Here are the core subtypes so far: collection: album, search, tag item: movie, photo other: login, reset, comment-fragment, comment It's legal to create new page_subtypes whenever you want. Use the appropriate page_type to get the coarse grain behavior that you want.
Diffstat (limited to 'themes')
-rw-r--r--themes/wind/views/page.html.php8
-rw-r--r--themes/wind/views/paginator.html.php13
-rw-r--r--themes/wind/views/sidebar.html.php8
3 files changed, 15 insertions, 14 deletions
diff --git a/themes/wind/views/page.html.php b/themes/wind/views/page.html.php
index f41dcd27..6056f54e 100644
--- a/themes/wind/views/page.html.php
+++ b/themes/wind/views/page.html.php
@@ -33,7 +33,7 @@
<link rel="stylesheet" type="text/css" href="<?= $theme->url("css/fix-ie.css") ?>"
media="screen,print,projection" />
<![endif]-->
- <? if ($theme->page_type == 'album'): ?>
+ <? if ($theme->page_type == "collection"): ?>
<? if ($thumb_proportion != 1): ?>
<? $new_width = $thumb_proportion * 213 ?>
<? $new_height = $thumb_proportion * 240 ?>
@@ -61,10 +61,10 @@
<?= $theme->script("ui.init.js") ?>
<? /* These are page specific, but if we put them before $theme->head() they get combined */ ?>
- <? if ($theme->page_type == "photo"): ?>
+ <? if ($theme->page_subtype == "photo"): ?>
<?= $theme->script("jquery.scrollTo.js") ?>
<?= $theme->script("gallery.show_full_size.js") ?>
- <? elseif ($theme->page_type == "movie"): ?>
+ <? elseif ($theme->page_subtype == "movie"): ?>
<?= $theme->script("flowplayer.js") ?>
<? endif ?>
@@ -122,7 +122,7 @@
</div>
</div>
<div id="g-sidebar" class="yui-b">
- <? if ($theme->page_type != "login"): ?>
+ <? if ($theme->page_subtype != "login"): ?>
<?= new View("sidebar.html") ?>
<? endif ?>
</div>
diff --git a/themes/wind/views/paginator.html.php b/themes/wind/views/paginator.html.php
index 5d300cf4..f6c03084 100644
--- a/themes/wind/views/paginator.html.php
+++ b/themes/wind/views/paginator.html.php
@@ -6,12 +6,13 @@
// for album views.
//
// Available variables for all page types:
-// $page_type - "album", "movie", "photo" or "tag"
+// $page_type - "collection", "item", or "other"
+// $page_subtype - "album", "movie", "photo", "tag", etc.
// $previous_page_url - the url to the previous page, if there is one
// $next_page_url - the url to the next page, if there is one
// $total - the total number of photos in this album
//
-// Available for the "album" and "tag" page types:
+// Available for the "collection" page types:
// $page - what page number we're on
// $max_pages - the maximum page number
// $page_size - the page size
@@ -20,14 +21,14 @@
// $first_visible_position - the position number of the first visible photo on this page
// $last_visible_position - the position number of the last visible photo on this page
//
-// Available for "photo" and "movie" page types:
+// Available for "item" page types:
// $position - the position number of this photo
//
?>
<ul class="g-pager ui-helper-clearfix">
<li class="g-first">
- <? if ($page_type == "album" || $page_type == "tag"): ?>
+ <? if ($page_type == "collection"): ?>
<? if (isset($first_page_url)): ?>
<a href="<?= $first_page_url ?>" class="g-button ui-icon-left ui-state-default ui-corner-all">
<span class="ui-icon ui-icon-seek-first"></span><?= t("First") ?></a>
@@ -48,7 +49,7 @@
<li class="g-info">
<? if ($total): ?>
- <? if ($page_type == "album" || $page_type == "tag"): ?>
+ <? if ($page_type == "collection"): ?>
<?= /* @todo This message isn't easily localizable */
t2("Photo %from_number of %count",
"Photos %from_number - %to_number of %count",
@@ -73,7 +74,7 @@
<span class="ui-icon ui-icon-seek-next"></span><?= t("Next") ?></a>
<? endif ?>
- <? if ($page_type == "album" || $page_type == "tag"): ?>
+ <? if ($page_type == "collection"): ?>
<? if (isset($last_page_url)): ?>
<a href="<?= $last_page_url ?>" class="g-button ui-icon-right ui-state-default ui-corner-all">
<span class="ui-icon ui-icon-seek-end"></span><?= t("Last") ?></a>
diff --git a/themes/wind/views/sidebar.html.php b/themes/wind/views/sidebar.html.php
index cd50fc01..086d1359 100644
--- a/themes/wind/views/sidebar.html.php
+++ b/themes/wind/views/sidebar.html.php
@@ -1,13 +1,13 @@
<?php defined("SYSPATH") or die("No direct script access.") ?>
<?= $theme->sidebar_top() ?>
<div id="g-view-menu" class="g-buttonset ui-helper-clearfix">
- <? if ($page_type == "album"):?>
+ <? if ($page_subtype == "album"):?>
<?= $theme->album_menu() ?>
- <? elseif ($page_type == "photo") : ?>
+ <? elseif ($page_subtype == "photo") : ?>
<?= $theme->photo_menu() ?>
- <? elseif ($page_type == "movie") : ?>
+ <? elseif ($page_subtype == "movie") : ?>
<?= $theme->movie_menu() ?>
- <? elseif ($page_type == "tag") : ?>
+ <? elseif ($page_subtype == "tag") : ?>
<?= $theme->tag_menu() ?>
<? endif ?>
</div>