From f7a720d2e827925f6fbae4981e2a17fd79eb31f6 Mon Sep 17 00:00:00 2001 From: Bharat Mediratta Date: Mon, 8 Jun 2009 23:17:28 -0700 Subject: Rename main_element_attributes() callback to body_attributes() to be more intuitive for themers. --- themes/admin_default/views/admin.html.php | 2 +- themes/default/views/page.html.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'themes') diff --git a/themes/admin_default/views/admin.html.php b/themes/admin_default/views/admin.html.php index 721c4dd5..b7cfaa40 100644 --- a/themes/admin_default/views/admin.html.php +++ b/themes/admin_default/views/admin.html.php @@ -31,7 +31,7 @@ admin_head() ?> - main_element_attributes() ?>> + body_attributes() ?>> admin_page_top() ?>
diff --git a/themes/default/views/page.html.php b/themes/default/views/page.html.php index 6c77fb72..0c84129f 100644 --- a/themes/default/views/page.html.php +++ b/themes/default/views/page.html.php @@ -54,7 +54,7 @@ head() ?> - main_element_attributes() ?>> + body_attributes() ?>> page_top() ?>
site_status() ?> -- cgit v1.2.3 From a4a38ba76003f5ca8fec0f50b4a84b930c80dd20 Mon Sep 17 00:00:00 2001 From: Tim Almdal Date: Wed, 10 Jun 2009 08:17:27 +0800 Subject: Created not_authorized.html.php which is a prettier login screen if the root album is not publicly browsable. Signed-off-by: Tim Almdal --- modules/gallery/controllers/albums.php | 10 ++-------- themes/default/views/page.html.php | 7 ------- 2 files changed, 2 insertions(+), 15 deletions(-) (limited to 'themes') diff --git a/modules/gallery/controllers/albums.php b/modules/gallery/controllers/albums.php index 0fd89f05..9b837442 100644 --- a/modules/gallery/controllers/albums.php +++ b/modules/gallery/controllers/albums.php @@ -26,14 +26,8 @@ class Albums_Controller extends Items_Controller { $page_size = module::get_var("gallery", "page_size", 9); if (!access::can("view", $album)) { if ($album->id == 1) { - $template = new Theme_View("page.html", "album"); - $template->set_global("page_size", $page_size); - $template->set_global("item", $album); - $template->set_global("children", array()); - $template->set_global("children_count", 0); - $template->set_global("parents", $album->parents()); - $template->unauthorized = true; - $template->content = new View("album.html"); + $template = new Theme_View("not_authorized.html", "album"); + $template->content = new View("login_page.html"); print $template; return; } else { diff --git a/themes/default/views/page.html.php b/themes/default/views/page.html.php index a17b643d..6c77fb72 100644 --- a/themes/default/views/page.html.php +++ b/themes/default/views/page.html.php @@ -52,13 +52,6 @@ head() ?> - - - main_element_attributes() ?>> -- cgit v1.2.3 From 98422857ebd5bd5c68b7b0060b6f6aef0b74bcbc Mon Sep 17 00:00:00 2001 From: Tim Almdal Date: Wed, 10 Jun 2009 08:22:35 +0800 Subject: Forgot this on the last commit Signed-off-by: Tim Almdal --- themes/default/views/not_authorized.html.php | 69 ++++++++++++++++++++++++++++ 1 file changed, 69 insertions(+) create mode 100644 themes/default/views/not_authorized.html.php (limited to 'themes') diff --git a/themes/default/views/not_authorized.html.php b/themes/default/views/not_authorized.html.php new file mode 100644 index 00000000..d009a4ac --- /dev/null +++ b/themes/default/views/not_authorized.html.php @@ -0,0 +1,69 @@ + + + + + + + <? if (empty($page_title)): ?> + <?= t("Gallery3 Login") ?> + <? if (!empty($item)): ?> + :: <?= p::clean($item->title) ?> + <? endif ?> + <? else: ?> + <?= $page_title ?> + <? endif ?> + <?= $theme->page_type ?> + + " type="image/x-icon" /> + " + media="screen,print,projection" /> + " + media="screen" /> + " + media="screen,print,projection" /> + " + media="screen,print,projection" /> + + + + + + + + + + + + head() ?> + + + main_element_attributes() ?>> + page_top() ?> +
+ site_status() ?> +
+ display("header.html") ?> +
+
+
+
+
+ messages() ?> + +
+
+
+
+
+
+
+ display("footer.html") ?> +
+
+ page_bottom() ?> + + -- cgit v1.2.3 From b276eaa68beca1266bf8fd83625ddfad73f44420 Mon Sep 17 00:00:00 2001 From: Tim Almdal Date: Wed, 10 Jun 2009 08:38:21 +0800 Subject: Add some window dressing to login_page.html in order to make it more in line with the overall look of the Gallery3 theme Signed-off-by: Tim Almdal --- modules/gallery/controllers/albums.php | 4 +- themes/default/views/login_page.html.php | 48 ++++++++++++++++++- themes/default/views/not_authorized.html.php | 69 ---------------------------- 3 files changed, 47 insertions(+), 74 deletions(-) delete mode 100644 themes/default/views/not_authorized.html.php (limited to 'themes') diff --git a/modules/gallery/controllers/albums.php b/modules/gallery/controllers/albums.php index 9b837442..f37609e6 100644 --- a/modules/gallery/controllers/albums.php +++ b/modules/gallery/controllers/albums.php @@ -26,9 +26,7 @@ class Albums_Controller extends Items_Controller { $page_size = module::get_var("gallery", "page_size", 9); if (!access::can("view", $album)) { if ($album->id == 1) { - $template = new Theme_View("not_authorized.html", "album"); - $template->content = new View("login_page.html"); - print $template; + print new Theme_View("login_page.html"); return; } else { access::forbidden(); diff --git a/themes/default/views/login_page.html.php b/themes/default/views/login_page.html.php index 27f8571e..c4880727 100644 --- a/themes/default/views/login_page.html.php +++ b/themes/default/views/login_page.html.php @@ -7,11 +7,55 @@ <?= t("Please Login to Gallery") ?> + " type="image/x-icon" /> + " + media="screen,print,projection" /> + " + media="screen" /> + " + media="screen,print,projection" /> " media="screen,print,projection" /> + + + + + + + + + + + + head() ?> - - + main_element_attributes() ?>> + page_top() ?> +
+ site_status() ?> +
+ display("header.html") ?> +
+
+
+
+
+ messages() ?> + +
+
+
+
+
+
+
+ display("footer.html") ?> +
+
+ page_bottom() ?> diff --git a/themes/default/views/not_authorized.html.php b/themes/default/views/not_authorized.html.php deleted file mode 100644 index d009a4ac..00000000 --- a/themes/default/views/not_authorized.html.php +++ /dev/null @@ -1,69 +0,0 @@ - - - - - - - <? if (empty($page_title)): ?> - <?= t("Gallery3 Login") ?> - <? if (!empty($item)): ?> - :: <?= p::clean($item->title) ?> - <? endif ?> - <? else: ?> - <?= $page_title ?> - <? endif ?> - <?= $theme->page_type ?> - - " type="image/x-icon" /> - " - media="screen,print,projection" /> - " - media="screen" /> - " - media="screen,print,projection" /> - " - media="screen,print,projection" /> - - - - - - - - - - - - head() ?> - - - main_element_attributes() ?>> - page_top() ?> -
- site_status() ?> -
- display("header.html") ?> -
-
-
-
-
- messages() ?> - -
-
-
-
-
-
-
- display("footer.html") ?> -
-
- page_bottom() ?> - - -- cgit v1.2.3