summaryrefslogtreecommitdiff
path: root/themes/default
diff options
context:
space:
mode:
authorBharat Mediratta <bharat@menalto.com>2009-03-16 04:33:45 +0000
committerBharat Mediratta <bharat@menalto.com>2009-03-16 04:33:45 +0000
commit736d74d05f70be5b72e44eafe2cc8efae52b0af7 (patch)
tree31cda57354967ecb717026f3f631daaa54801aec /themes/default
parentcbc7c870fa8b54c2c320fedaf02b5b6010c55277 (diff)
Clean up the login, maintenance login and required-top-level-login code.
We now have two clear and separate login approaches: login/ajax login/html Choose the one that's appropriate. Totally simplified the maintenance page to be separate from the theme and dead simple, and use login/html approach there. Totally simplified the top level login (login_page.html.php) to just be a login page, not the rest of the chrome on the page and use the login/ajax approach there. Don't use access::required in albums and then catch the exception, instead use access::can and check the return code. Improve the text for maintenance mode.
Diffstat (limited to 'themes/default')
-rw-r--r--themes/default/views/login_page.html.php24
-rw-r--r--themes/default/views/maintenance.html.php56
2 files changed, 1 insertions, 79 deletions
diff --git a/themes/default/views/login_page.html.php b/themes/default/views/login_page.html.php
index ffe1762b..1bd76c18 100644
--- a/themes/default/views/login_page.html.php
+++ b/themes/default/views/login_page.html.php
@@ -26,7 +26,6 @@
<script src="<?= url::file("lib/gallery.dialog.js") ?>" type="text/javascript"></script>
<script src="<?= url::file("lib/superfish/js/superfish.js") ?>" type="text/javascript"></script>
<script src="<?= $theme->url("js/ui.init.js") ?>" type="text/javascript"></script>
- <?= $theme->head() ?>
<script>
$("#gLoginLink").ready(function() {
$("#gLoginLink").click();
@@ -35,27 +34,6 @@
</head>
<body>
- <?= $theme->page_top() ?>
- <div id="doc4" class="yui-t5 gView">
- <div id="hd">
- <div id="gHeader">
- <?= $theme->display("header.html") ?>
- </div>
- </div>
- <div id="bd">
- <div id="yui-main">
- <div class="yui-b">
- <div id="gContent" class="yui-g">&nbsp; </div>
- </div>
- </div>
- <div id="gSidebar" class="yui-b">&nbsp;</div>
- </div>
- <div id="ft">
- <div id="gFooter">
- <?= $theme->display("footer.html") ?>
- </div>
- </div>
- </div>
- <?= $theme->page_bottom() ?>
+ <a id="gLoginLink" href="<?= url::site("login/ajax") ?>">Log in</a>
</body>
</html>
diff --git a/themes/default/views/maintenance.html.php b/themes/default/views/maintenance.html.php
deleted file mode 100644
index fde3973d..00000000
--- a/themes/default/views/maintenance.html.php
+++ /dev/null
@@ -1,56 +0,0 @@
-<?php defined("SYSPATH") or die("No direct script access.") ?>
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Tranisitional//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
- <head>
- <meta http-equiv="content-type" content="text/html; charset=UTF-8" />
- <title><?= $title ?></title>
- <link rel="shortcut icon" href="<?= $theme->url("images/favicon.ico") ?>" type="image/x-icon" />
- <link rel="stylesheet" type="text/css" href="<?= url::file("lib/yui/reset-fonts-grids.css") ?>"
- media="screen,print,projection" />
- <link rel="stylesheet" type="text/css" href="<?= url::file("lib/superfish/css/superfish.css") ?>"
- media="screen" />
- <link rel="stylesheet" type="text/css" href="<?= url::file("lib/themeroller/ui.base.css") ?>"
- media="screen,print,projection" />
- <link rel="stylesheet" type="text/css" href="<?= $theme->url("css/screen.css") ?>"
- media="screen,print,projection" />
- <!--[if IE]>
- <link rel="stylesheet" type="text/css" href="<?= $theme->url("css/fix-ie.css") ?>"
- media="screen,print,projection" />
- <![endif]-->
- <script src="<?= url::file("lib/jquery.js") ?>" type="text/javascript"></script>
- <script src="<?= url::file("lib/jquery.form.js") ?>" type="text/javascript"></script>
- <script src="<?= url::file("lib/jquery-ui.js") ?>" type="text/javascript"></script>
- <script src="<?= url::file("lib/gallery.dialog.js") ?>" type="text/javascript"></script>
- <script src="<?= url::file("lib/superfish/js/superfish.js") ?>" type="text/javascript"></script>
- <script src="<?= $theme->url("js/jquery.scrollTo.js") ?>" type="text/javascript"></script>
- <script src="<?= $theme->url("js/jquery.localscroll.js") ?>" type="text/javascript"></script>
- <script src="<?= $theme->url("js/ui.init.js") ?>" type="text/javascript"></script>
- <?= $theme->head() ?>
- </head>
-
- <body>
- <?= $theme->page_top() ?>
- <div id="doc4" class="yui-t5 gView">
- <div id="hd">
- <?= $theme->site_status() ?>
- <div id="gHeader">
- <?= $theme->display("header.html") ?>
- </div>
- </div>
- <div id="bd">
- <div id="gContent" style="float:left">
- <ul id="gMessage">
- <li class="gWarning"><?= $content ?></li>
- </ul>
- </div>
- </div>
- <div id="ft">
- <div id="gFooter">
- <?= $theme->display("footer.html") ?>
- </div>
- </div>
- </div>
- <?= $theme->page_bottom() ?>
- </body>
-</html>