aboutsummaryrefslogtreecommitdiffstats
path: root/admin.php
diff options
context:
space:
mode:
authorplegall <plg@piwigo.org>2010-03-09 23:19:11 +0000
committerplegall <plg@piwigo.org>2010-03-09 23:19:11 +0000
commitcbfc601ad8579ae8516464b324d52a4136bc4fe7 (patch)
tree71ec43d9a0e8d05e5356b1b88e9df19a3e1dd57b /admin.php
parent89ef534fc273aae095bf2c727e87eda7f4b71cdf (diff)
feature 1491: administration panel header/footer. Graphicaly outside the
administration theme. The header includes the gallery title with a link to gallery, a theme changer, an explicit "visit gallery" link, a logout link. The footer includes links to piwigo.org (homepage, documentation, forum) and the contact webmaster link. Due to new header/footer, I've removed the "Links" section in the menubar. The new footer sticks to the bottom of the browser window. I've slightly "rounded" grum tabs to look like the menubar borders. Graphical illustration (top left and bottom left leaves) were removed to improve readability. They make things beautiful on gallery side, they decrease usability on admin side. Piwigo logo was removed to save space on administration footer. It would be nice to have a small logo to place bottom left in the footer next to "Powered by Piwigo". Links>Administration link was replaced by a big link box just above the menubar. The H2 was outside the #content box, nearly invisible on top right corner. Now it is 1) easy to read 2) inside #content. feature 1490: ability to switch from goto/roma to goto/clear with a single click in administration header. The global organisation of the page is quite heavily changed. The global layout is: body#theAdminPage body#theAdminPage > #the_page body#theAdminPage > #the_page > #pwgHead body#theAdminPage > #the_page > #pwgMain body#theAdminPage > #the_page > #pwgMain > #menubar body#theAdminPage > #the_page > #pwgMain > #content body#theAdminPage > #the_page > #footer git-svn-id: http://piwigo.org/svn/trunk@5098 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to 'admin.php')
-rw-r--r--admin.php32
1 files changed, 32 insertions, 0 deletions
diff --git a/admin.php b/admin.php
index 01bba5475..d914ad7ca 100644
--- a/admin.php
+++ b/admin.php
@@ -59,6 +59,36 @@ SELECT
exit();
}
+// theme changer
+if (isset($_GET['change_theme']))
+{
+ $admin_themes = array('goto/roma', 'goto/clear');
+
+ $new_admin_theme = array_pop(
+ array_diff(
+ $admin_themes,
+ array($conf['admin_layout'])
+ )
+ );
+
+ $query = '
+DELETE
+ FROM '.CONFIG_TABLE.'
+ WHERE param = "admin_layout"
+;';
+ pwg_query($query);
+
+ $query = '
+INSERT
+ INTO '.CONFIG_TABLE.'
+ SET param = "admin_layout"
+ , value = "'.$new_admin_theme.'"
+;';
+ pwg_query($query);
+
+ redirect('admin.php');
+}
+
// +-----------------------------------------------------------------------+
// | synchronize user informations |
// +-----------------------------------------------------------------------+
@@ -94,6 +124,7 @@ $template->set_filenames(array('admin' => 'admin.tpl'));
$template->assign(
array(
+ 'USERNAME' => $user['username'],
'U_SITE_MANAGER'=> $link_start.'site_manager',
'U_HISTORY_STAT'=> $link_start.'stats',
'U_FAQ'=> $link_start.'help',
@@ -123,6 +154,7 @@ $template->assign(
'U_LOGOUT'=> PHPWG_ROOT_PATH.'index.php?act=logout',
'U_PLUGINS'=> $link_start.'plugins_list',
'U_ADD_PHOTOS' => $link_start.'photos_add',
+ 'U_CHANGE_THEME' => PHPWG_ROOT_PATH.'admin.php?change_theme=1',
)
);