diff --git a/modules/calendarview/controllers/calendarview.php b/modules/calendarview/controllers/calendarview.php index 0f628bc8..76a7219e 100644 --- a/modules/calendarview/controllers/calendarview.php +++ b/modules/calendarview/controllers/calendarview.php @@ -78,7 +78,7 @@ class CalendarView_Controller extends Controller { } // Set up the page. - $template = new Theme_View("page.html", "collection", "CalendarDayView"); + $template = new Theme_View("calpage.html", "collection", "CalendarDayView"); $template->set_global("page", $page); $template->set_global("max_pages", $max_pages); $template->set_global("page_size", $page_size); @@ -103,14 +103,14 @@ class CalendarView_Controller extends Controller { ->order_by("captured", "ASC") ->find_all($page_size, $offset)); } -/* + // Set up breadcrumbs - $calendar_breadcrumbs[0] = new Calendar_Breadcrumb($display_year, url::site("calendarview/calendar/" . $display_year . "/" . $display_user)); - $calendar_breadcrumbs[1] = new Calendar_Breadcrumb(t(date("F", mktime(0, 0, 0, $display_month, $display_day, $display_year))), url::site("calendarview/month/" . $display_year . "/" . $display_user . "/" . $display_month)); - $fake_item = new Calendar_Breadcrumb($display_day, ""); - $template->set_global("item", $fake_item); - $template->set_global("parents", $calendar_breadcrumbs); -*/ + $calendar_breadcrumbs[0] = new Calendar_Breadcrumb(item::root()->title, item::root()->url()); + $calendar_breadcrumbs[1] = new Calendar_Breadcrumb($display_year, url::site("calendarview/calendar/" . $display_year . "/" . $display_user)); + $calendar_breadcrumbs[2] = new Calendar_Breadcrumb(t(date("F", mktime(0, 0, 0, $display_month, $display_day, $display_year))), url::site("calendarview/month/" . $display_year . "/" . $display_user . "/" . $display_month)); + $calendar_breadcrumbs[3] = new Calendar_Breadcrumb($display_day, ""); + $template->set_global("breadcrumbs", $calendar_breadcrumbs); + // Finish setting up and then display the page. $template->set_global("children_count", $day_count); $template->content = new View("dynamic.html"); @@ -154,7 +154,7 @@ class CalendarView_Controller extends Controller { } // Set up the page. - $template = new Theme_View("page.html", "collection", "CalendarMonthView"); + $template = new Theme_View("calpage.html", "collection", "CalendarMonthView"); $template->set_global("page", $page); $template->set_global("max_pages", $max_pages); $template->set_global("page_size", $page_size); @@ -179,13 +179,13 @@ class CalendarView_Controller extends Controller { ->order_by("captured", "ASC") ->find_all($page_size, $offset)); } -/* - // Set up breadcrumbs for this page. - $calendar_breadcrumbs[0] = new Calendar_Breadcrumb($display_year, url::site("calendarview/calendar/" . $display_year . "/" . $display_user)); - $fake_item = new Calendar_Breadcrumb(t(date("F", mktime(0, 0, 0, $display_month, 1, $display_year))), ""); - $template->set_global("item", $fake_item); - $template->set_global("parents", $calendar_breadcrumbs); -*/ + + // Set up breadcrumbs + $calendar_breadcrumbs[0] = new Calendar_Breadcrumb(item::root()->title, item::root()->url()); + $calendar_breadcrumbs[1] = new Calendar_Breadcrumb($display_year, url::site("calendarview/calendar/" . $display_year . "/" . $display_user)); + $calendar_breadcrumbs[2] = new Calendar_Breadcrumb(t(date("F", mktime(0, 0, 0, $display_month, 1, $display_year))), ""); + $template->set_global("breadcrumbs", $calendar_breadcrumbs); + // Finish setting up and then display the page. $template->set_global("children_count", $day_count); $template->content = new View("dynamic.html"); diff --git a/modules/calendarview/libraries/Calendar_Breadcrumb.php b/modules/calendarview/libraries/Calendar_Breadcrumb.php index 054311f1..342dae25 100644 --- a/modules/calendarview/libraries/Calendar_Breadcrumb.php +++ b/modules/calendarview/libraries/Calendar_Breadcrumb.php @@ -21,27 +21,11 @@ class Calendar_Breadcrumb_Core { // Creates a class to maintain a single breadcrumb. // Multiple breadcrumbs can be achieved by createing an array of this class type. public $title = ""; - public $id = 0; + public $id = 1; public $url = ""; public function __construct($new_title, $new_url) { $this->title = $new_title; $this->url = $new_url; } - - public function url($query=null) { - return $this->url; - } - - public function parent() { - return null; - } - - public function is_album() { - return false; - } - - public function is_photo() { - return false; - } } diff --git a/modules/calendarview/views/calpage.html.php b/modules/calendarview/views/calpage.html.php new file mode 100644 index 00000000..1d060d2b --- /dev/null +++ b/modules/calendarview/views/calpage.html.php @@ -0,0 +1,154 @@ + + + + + + + <? if ($page_title): ?> + <?= $page_title ?> + <? else: ?> + <? if ($theme->item()): ?> + <? if ($theme->item()->is_album()): ?> + <?= t("Browse Album :: %album_title", array("album_title" => $theme->item()->title)) ?> + <? elseif ($theme->item()->is_photo()): ?> + <?= t("Photo :: %photo_title", array("photo_title" => $theme->item()->title)) ?> + <? else: ?> + <?= t("Movie :: %movie_title", array("movie_title" => $theme->item()->title)) ?> + <? endif ?> + <? elseif ($theme->tag()): ?> + <?= t("Browse Tag :: %tag_title", array("tag_title" => $theme->tag()->name)) ?> + <? else: /* Not an item, not a tag, no page_title specified. Help! */ ?> + <?= t("Gallery") ?> + <? endif ?> + <? endif ?> + + " type="image/x-icon" /> + css("yui/reset-fonts-grids.css") ?> + css("superfish/css/superfish.css") ?> + css("themeroller/ui.base.css") ?> + css("gallery.common.css") ?> + css("screen.css") ?> + + page_type == "collection"): ?> + + + + + + + script("jquery.js") ?> + script("jquery.form.js") ?> + script("jquery-ui.js") ?> + script("gallery.common.js") ?> + + + script("gallery.ajax.js") ?> + script("gallery.dialog.js") ?> + script("superfish/js/superfish.js") ?> + script("jquery.localscroll.js") ?> + script("ui.init.js") ?> + + head() they get combined */ ?> + page_subtype == "photo"): ?> + script("jquery.scrollTo.js") ?> + script("gallery.show_full_size.js") ?> + page_subtype == "movie"): ?> + script("flowplayer.js") ?> + + + head() ?> + + + body_attributes() ?>> + page_top() ?> +
+ site_status() ?> +
+
+ + + + + + user_menu() ?> + header_top() ?> + + + + + + header_bottom() ?> +
+ + + + + + + +
+
+
+
+
+ messages() ?> + +
+
+
+
+ page_subtype != "login"): ?> + + +
+
+ +
+ page_bottom() ?> + +