diff --git a/modules/calendarview/controllers/calendarview.php b/modules/calendarview/controllers/calendarview.php index d91d0bdd..7351ad98 100644 --- a/modules/calendarview/controllers/calendarview.php +++ b/modules/calendarview/controllers/calendarview.php @@ -32,6 +32,7 @@ class CalendarView_Controller extends Controller { // Draw the page. $template = new Theme_View("page.html", "other", "CalendarView"); + $template->css("calendarview_calendar.css"); $template->page_title = t("Gallery :: Calendar"); $template->content = new View("calendarview_year.html"); $template->content->calendar_year = $display_year; @@ -62,7 +63,7 @@ class CalendarView_Controller extends Controller { ->find_all() ->count(); } - + // Figure out paging stuff. $page_size = module::get_var("gallery", "page_size", 9); $page = $this->input->get("page", "1"); @@ -98,7 +99,7 @@ class CalendarView_Controller extends Controller { ->orderby("captured", "ASC") ->find_all($page_size, $offset)); } - + // Finish setting up and then display the page. $template->set_global("children_count", $day_count); $template->content = new View("dynamic.html"); @@ -124,7 +125,7 @@ class CalendarView_Controller extends Controller { ->count(); if ($count > 0) { $valid_users[$one_user->id] = $one_user->full_name; - } + } } // Generate a list of years, starting with the year the earliest photo was @@ -160,19 +161,19 @@ class CalendarView_Controller extends Controller { // Return the newly generated form. return $form; } - + public function setprefs() { // Change the calendar year and / or user. - + // Prevent Cross Site Request Forgery access::verify_csrf(); // Get user specified settings. - $str_user_id = Input::instance()->post("cal_user"); + $str_user_id = Input::instance()->post("cal_user"); $str_year_id = Input::instance()->post("cal_year"); // redirect to the currect page. - url::redirect(url::site("calendarview/calendar/" . $str_year_id . "/" . $str_user_id)); + url::redirect(url::site("calendarview/calendar/" . $str_year_id . "/" . $str_user_id)); } } diff --git a/modules/calendarview/css/calendarview_calendar.css b/modules/calendarview/css/calendarview_calendar.css new file mode 100644 index 00000000..12edad10 --- /dev/null +++ b/modules/calendarview/css/calendarview_calendar.css @@ -0,0 +1,8 @@ +table.calendar { text-align: center; width:100px; } +table.calendar caption { font-size: 1.5em; padding: 0.2em; } +table.calendar th, table.calendar td { padding: 0.2em; background: #fff; border: 0; } +table.calendar td:hover { background: #ddf; } +table.calendar td.prev-next { background: #ccc; color: #999; } +table.calendar td.today { color: #800; } +#cal_user, #cal_year, #g-view-calendar-form li { display: inline; } +#SaveSettings { float: right; } diff --git a/modules/calendarview/views/calendarview_year.html.php b/modules/calendarview/views/calendarview_year.html.php index 851b4e91..59389d18 100644 --- a/modules/calendarview/views/calendarview_year.html.php +++ b/modules/calendarview/views/calendarview_year.html.php @@ -1,15 +1,4 @@ -

diff --git a/modules/calendarview/views/kohana_calendar.php b/modules/calendarview/views/kohana_calendar.php index e227803d..ff510658 100644 --- a/modules/calendarview/views/kohana_calendar.php +++ b/modules/calendarview/views/kohana_calendar.php @@ -43,7 +43,11 @@ else } ?> + + + +