From b84ef45eb13f218c63cd904386db6bb737ef8bee Mon Sep 17 00:00:00 2001 From: Tim Almdal Date: Tue, 9 Jun 2009 07:18:41 -0700 Subject: Rather than just displaying the "unformatted" login screen when the root album is not viewable by a guest, display the root album as if it was empty. When the page finishes loading force the login dialog to be displayed. --- themes/default/views/page.html.php | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'themes') diff --git a/themes/default/views/page.html.php b/themes/default/views/page.html.php index 6c77fb72..a17b643d 100644 --- a/themes/default/views/page.html.php +++ b/themes/default/views/page.html.php @@ -52,6 +52,13 @@ head() ?> + + + main_element_attributes() ?>> -- cgit v1.2.3 From e7a3b6fa55d4eda9140b122bc50681b979229da3 Mon Sep 17 00:00:00 2001 From: Tim Almdal Date: Tue, 9 Jun 2009 17:17:27 -0700 Subject: Created not_authorized.html.php which is a prettier login screen if the root album is not publicly browsable. --- 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 cf86a7b8df9571eef7b507f174ee3f714776d14d Mon Sep 17 00:00:00 2001 From: Tim Almdal Date: Tue, 9 Jun 2009 17:22:35 -0700 Subject: Forgot this on the last commit --- 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 7e61bcbbecefb6b12343a8c6d3f700d282a3528b Mon Sep 17 00:00:00 2001 From: Tim Almdal Date: Tue, 9 Jun 2009 17:38:21 -0700 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 --- 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 From 89b6570eccf4d7aa12c730c8115517a5e24fc890 Mon Sep 17 00:00:00 2001 From: Chad Kieffer Date: Tue, 9 Jun 2009 21:33:16 -0600 Subject: Update floats after .rtl addition. Both should work now. --- themes/default/css/screen.css | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'themes') diff --git a/themes/default/css/screen.css b/themes/default/css/screen.css index f306f287..03c13cc1 100644 --- a/themes/default/css/screen.css +++ b/themes/default/css/screen.css @@ -92,11 +92,11 @@ a:hover, margin: .3em 1em; } -.rtl #gDialog .gCancel { +#gForgotPasswordLink, .rtl #gDialog .gCancel { float: right; } -.rtl #gForgotPasswordLink { +#gDialog .gCancel, .rtl #gForgotPasswordLink { float: left; } -- cgit v1.2.3