Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
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
  • Loading branch information
plegall committed Mar 9, 2010
1 parent 89ef534 commit cbfc601
Show file tree
Hide file tree
Showing 11 changed files with 319 additions and 90 deletions.
32 changes: 32 additions & 0 deletions admin.php
Expand Up @@ -59,6 +59,36 @@
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 |
// +-----------------------------------------------------------------------+
Expand Down Expand Up @@ -94,6 +124,7 @@

$template->assign(
array(
'USERNAME' => $user['username'],
'U_SITE_MANAGER'=> $link_start.'site_manager',
'U_HISTORY_STAT'=> $link_start.'stats',
'U_FAQ'=> $link_start.'help',
Expand Down Expand Up @@ -123,6 +154,7 @@
'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',
)
);

Expand Down
20 changes: 2 additions & 18 deletions admin/template/goto/admin.tpl
@@ -1,5 +1,6 @@
{known_script id="jquery.ui" src=$ROOT_URL|@cat:"template-common/lib/ui/packed/ui.core.packed.js" }
{known_script id="jquery.ui.accordion" src=$ROOT_URL|@cat:"template-common/lib/ui/packed/ui.accordion.packed.js" }
{known_script id="jquery.tipTip" src=$ROOT_URL|@cat:"template-common/lib/plugins/jquery.tipTip.minified.js" }

<script type="text/javascript">
jQuery().ready(function(){ldelim}
Expand All @@ -12,25 +13,8 @@ jQuery().ready(function(){ldelim}
</script>

<div id="menubar">
<div id="adminHome"><a href="{$U_ADMIN}">Administration Home</a></div>
<dl class="first">
<dt class="rdion"><span>{'Links'|@translate}&nbsp;</span></dt>
<dd>
<ul>
<li><a href="{$U_RETURN}">{'Home'|@translate}</a></li>
<li><a href="{$U_FAQ}">{'Instructions'|@translate}</a></li>
<li><a href="{$U_ADMIN}" title="{'Administration'|@translate}">{'Administration'|@translate}</a></li>
<li><a href="{$U_LOGOUT}">{'Logout'|@translate}</a></li>
{if isset($pwgmenu)}
<li class="external"><a class="external" href="{$pwgmenu.WIKI}" onclick="window.open(this.href, '');
return false;">{'Documentation'|@translate}</a></li>
<li class="external"><a class="external" href="{$pwgmenu.FORUM}" onclick="window.open(this.href, '');
return false;">{'Support'|@translate}</a></li>
{/if}

</ul>
</dd>
</dl>
<dl>
<dt class="rdion"><span>{'Configuration'|@translate}&nbsp;</span></dt>
<dd>
<ul>
Expand Down
2 changes: 1 addition & 1 deletion admin/template/goto/content.css
@@ -1,6 +1,6 @@
/* .Content is on every pages so it is common and it will no longer be a specific css */
.content { margin-right: 1em; margin-bottom: 1em; }
.content h2 { margin-bottom: 3px;}
.content h2 {margin: 0; padding: 5px 0.5em 5px 0.5em; text-align: right; font-size: 120%;}
.content .navigationBar { margin: 10px 0; text-align: center; }
.content form { text-align: left; }
.content dt { margin-bottom: 5px; font-style: italic;
Expand Down
186 changes: 167 additions & 19 deletions admin/template/goto/default-layout.css
Expand Up @@ -210,24 +210,28 @@ BODY {
margin: 5px;
padding: 0;
font-size: 0.8em;
font-family: Univers, Helvetica, Optima, "Bitstream Vera Sans", sans-serif;
font-family: "Lucida Grande",Verdana,Arial,"Bitstream Vera Sans",sans-serif;
text-align: center; /* be nice to IE5 */
}

H1 {
text-align: center;
font-size: 150%;
font-weight: bold;
padding: 0;
margin: 0.5em 0 1em 0;
color:#eee;
letter-spacing:1px;
text-align: left;
font-size: 150%;
font-weight: normal;
font-style:italic;
padding: 8px 0 0 10px;
margin: 0;
float:left;
}

H2 {
margin: 0;
padding: 5px 0.5em 5px 0.5em;
text-align: left;
font-size: 120%;
}
#pwgHead {color:#aaa;}
#pwgHead A {color:#ccc;}
#pwgHead A:hover {color:#fff;border-bottom:1px solid #fff}
#pwgHead A#instructions:hover {border:none;}

#headActions {float:right; height:46px; line-height:46px; margin-right:10px;}

A {
text-decoration:none;
Expand All @@ -248,13 +252,6 @@ HR.separation {
clear: both;
}

#copyright {
clear: both;
font-size: 83%;
text-align: center;
margin: 0 0 10px 0;
}

/** General defaults **/
INPUT, SELECT {
margin: 0;
Expand Down Expand Up @@ -547,4 +544,155 @@ ul.holder li.bit-box-focus a.closebutton, ul.holder li.bit-box-focus a.closebutt

#uploadFormSettings TH {
width:50%;
}

#pwgHead {
background-color:#464646;
height:46px;
}

html, body {height:100%; margin:0; padding:0;}
#the_page {min-height:100%; position:relative; padding:0;margin:0;}
#pwgMain {padding:10px;padding-bottom:60px;}

#footer {
position:absolute;
bottom:0;
width:100%;
height:46px;
background-color:#464646;
color:#aaa;
line-height:46px;
}

#footer A {color:#ccc;}
#footer A:hover {color:#fff;border-bottom:1px solid #fff;}

#adminHome {
text-align:center;
margin-bottom:15px;
line-height:30px;
width:200px;
margin-left:5px;
-moz-border-radius: 6px; -webkit-border-radius: 6px; border-radius: 6px;
}

#adminHome A {display:block; font-size:1.1em; font-weight:bold;}
#adminHome A {border:none;}

#piwigoInfos {float:left; margin-left:10px;}
#pageInfos {float:right; margin-right:10px;}

/* TipTip CSS - Version 1.2 */

#tiptip_holder {
display: none;
position: absolute;
top: 0;
left: 0;
z-index: 99999;
}

#tiptip_holder.tip_top {
padding-bottom: 5px;
}

#tiptip_holder.tip_bottom {
padding-top: 5px;
}

#tiptip_holder.tip_right {
padding-left: 5px;
}

#tiptip_holder.tip_left {
padding-right: 5px;
}

#tiptip_content {
font-size: 11px;
color: #fff;
text-shadow: 0 0 2px #000;
padding: 4px 8px;
border: 1px solid rgba(255,255,255,0.25);
background-color: rgb(25,25,25);
background-color: rgba(25,25,25,0.92);
background-image: -webkit-gradient(linear, 0% 0%, 0% 100%, from(transparent), to(#000));
border-radius: 3px;
-webkit-border-radius: 3px;
-moz-border-radius: 3px;
box-shadow: 0 0 3px #555;
-webkit-box-shadow: 0 0 3px #555;
-moz-box-shadow: 0 0 3px #555;
}

#tiptip_arrow, #tiptip_arrow_inner {
position: absolute;
border-color: transparent;
border-style: solid;
border-width: 6px;
height: 0;
width: 0;
}

#tiptip_holder.tip_top #tiptip_arrow {
border-top-color: #fff;
border-top-color: rgba(255,255,255,0.35);
}

#tiptip_holder.tip_bottom #tiptip_arrow {
border-bottom-color: #fff;
border-bottom-color: rgba(255,255,255,0.35);
}

#tiptip_holder.tip_right #tiptip_arrow {
border-right-color: #fff;
border-right-color: rgba(255,255,255,0.35);
}

#tiptip_holder.tip_left #tiptip_arrow {
border-left-color: #fff;
border-left-color: rgba(255,255,255,0.35);
}

#tiptip_holder.tip_top #tiptip_arrow_inner {
margin-top: -7px;
margin-left: -6px;
border-top-color: rgb(25,25,25);
border-top-color: rgba(25,25,25,0.92);
}

#tiptip_holder.tip_bottom #tiptip_arrow_inner {
margin-top: -5px;
margin-left: -6px;
border-bottom-color: rgb(25,25,25);
border-bottom-color: rgba(25,25,25,0.92);
}

#tiptip_holder.tip_right #tiptip_arrow_inner {
margin-top: -6px;
margin-left: -5px;
border-right-color: rgb(25,25,25);
border-right-color: rgba(25,25,25,0.92);
}

#tiptip_holder.tip_left #tiptip_arrow_inner {
margin-top: -6px;
margin-left: -7px;
border-left-color: rgb(25,25,25);
border-left-color: rgba(25,25,25,0.92);
}

/* Webkit Hacks */
@media screen and (-webkit-min-device-pixel-ratio:0) {
#tiptip_content {
padding: 4px 8px 5px 8px;
background-color: rgba(45,45,45,0.88);
}
#tiptip_holder.tip_bottom #tiptip_arrow_inner {
border-bottom-color: rgba(45,45,45,0.88);
}
#tiptip_holder.tip_top #tiptip_arrow_inner {
border-top-color: rgba(20,20,20,0.92);
}
}
59 changes: 39 additions & 20 deletions admin/template/goto/footer.tpl
Expand Up @@ -2,38 +2,57 @@
Warning : This is the admin pages footer only
don't be confusing with the public page footer
*}
<div id="copyright">
<a name="EoP"></a> <!-- End of ADMIN Page -->
{if isset($debug.TIME) }
{'SQL queries in'|@translate} {$debug.TIME} ({$debug.NB_QUERIES} {'SQL queries in'|@translate} {$debug.SQL_TIME}) -
{/if}
</div> <!-- pwgMain -->
{if isset($footer_elements)}
{foreach from=$footer_elements item=v}
{$v}
{/foreach}
{/if}
{if isset($debug.QUERIES_LIST)}
<div id="debug">
{$debug.QUERIES_LIST}
</div>
{/if}

<div id="footer">
<div id="piwigoInfos">
{* Please, do not remove this copyright. If you really want to,
contact us on http://piwigo.org to find a solution on how
to show the origin of the script...
*}

{'Powered by'|@translate}
<a href="{$PHPWG_URL}" class="Piwigo">
<a href="{$PHPWG_URL}" title="Visit Piwigo project website">
<span class="Piwigo">Piwigo</span></a>
{$VERSION}
{if isset($CONTACT_MAIL)}
- {'Contact'|@translate}
| <a class="external" href="{$pwgmenu.WIKI}" title="Read Piwigo Documentation" onclick="window.open(this.href, ''); return false;">{'Documentation'|@translate}</a>
| <a class="external" href="{$pwgmenu.FORUM}" title="Get Support on Piwigo Forum" onclick="window.open(this.href, ''); return false;">{'Support'|@translate}</a>
</div> <!-- piwigoInfos -->

<div id="pageInfos">
{if isset($debug.TIME) }
{'SQL queries in'|@translate} {$debug.TIME} ({$debug.NB_QUERIES} {'SQL queries in'|@translate} {$debug.SQL_TIME}) -
{/if}


{'Contact'|@translate}
<a href="mailto:{$CONTACT_MAIL}?subject={'title_send_mail'|@translate|@escape:url}">{'Webmaster'|@translate}</a>
{/if}
</div> <!-- pageInfos -->

</div> <!-- copyright -->
{if isset($footer_elements)}
{foreach from=$footer_elements item=v}
{$v}
{/foreach}
{/if}
{if isset($debug.QUERIES_LIST)}
<div id="debug">
{$debug.QUERIES_LIST}
</div>
{/if}
</div> <!-- footer -->
</div> <!-- the_page -->

{literal}
<script type='text/javascript'>
$(function() {
$('#pwgHead A, #footer A').tipTip({
'delay' : 0,
'fadeIn' : 200,
'fadeOut' : 200,
});
});
</script>
{/literal}

</body>
</html>

0 comments on commit cbfc601

Please sign in to comment.