feature 1514: new screen to manage installed themes; activate, deactivate,

delete, set as default.

plugins.class.php was merged back to a state it doesn't manage themes at all.
themes.class.php was created instead, from a duplication of plugins.class.php
and strongly modified then.

feature 1507: the display of available themes is now much more "graphic".

git-svn-id: http://piwigo.org/svn/trunk@5153 68402e56-0260-453c-a942-63ccdbb3a9ee
This commit is contained in:
plegall 2010-03-17 00:48:38 +00:00
commit f82430dd3b
21 changed files with 929 additions and 66 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

View file

@ -737,8 +737,13 @@ BODY#thePopuphelpPage {
height: 4em; /* legend height (don't set auto to be Gecko friendly)*/
}
.themeBox {float:left; text-align:center; height:170px; background-color:#eee; margin:5px; -moz-border-radius:5px;}
.themeBox {float:left; text-align:center; height:180px; background-color:#eee; margin:5px; -moz-border-radius:5px;}
.themeBox IMG {border:1px solid white; margin:0 15px;}
.themeName {font-size:1.1em; margin:5px 0;}
.themeActions {margin:5px 0;}
.themeActions A {display:block;}
.themeActions {margin:5px 0; font-size:12px;}
.themeActions A {}
#themesContent .themeBox IMG {width:150px; height:120px;}
#themesContent H3 {font-size:16px; text-align:left; border-bottom:1px solid #444; letter-spacing:1px; margin:5px;}
.themeBoxes {min-height:300px;}

View file

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

View file

@ -0,0 +1,42 @@
<div class="titrePage">
<h2>{'Installed Themes'|@translate}</h2>
</div>
<div id="themesContent">
<h3>Active Themes</h3>
{if isset($active_themes)}
<div class="themeBoxes">
{foreach from=$active_themes item=theme}
<div class="themeBox{if $theme.is_default} themeDefault{/if}">
<div class="themeName">{$theme.name}{if $theme.is_default} <em>(default)</em>{/if}</div>
<div class="themeShot"><img src="{$theme.screenshot}"></div>
<div class="themeActions">
<a href="{$deactivate_baseurl}{$theme.id}" title="{'Forbid this theme to users'|@translate}">{'Deactivate'|@translate}</a>
{if not $theme.is_default}
| <a href="{$set_default_baseurl}{$theme.id}" title="{'Set as default theme for unregistered and new users'|@translate}">{'Default'|@translate}</a>
{/if}
</div> <!-- themeActions -->
</div>
{/foreach}
</div> <!-- themeBoxes -->
{/if}
{if isset($inactive_themes)}
<h3>Inactive Themes</h3>
<div class="themeBoxes">
{foreach from=$inactive_themes item=theme}
<div class="themeBox">
<div class="themeName">{$theme.name}</div>
<div class="themeShot"><img src="{$theme.screenshot}"></div>
<div class="themeActions">
<a href="{$activate_baseurl}{$theme.id}" title="{'Make this theme available to users'|@translate}">{'Activate'|@translate}</a>
| <a href="{$delete_baseurl}{$theme.id}" title="{'Delete this theme'|@translate}">{'Delete'|@translate}</a>
</div>
</div>
{/foreach}
</div> <!-- themeBoxes -->
{/if}
</div> <!-- themesContent -->

View file

@ -1,15 +1,15 @@
<div class="titrePage">
<h2>{'Install New Theme'|@translate}</h2>
<h2>{'Add New Theme'|@translate}</h2>
</div>
{if isset($themes)}
<div id="themesBox">
<div id="themeBoxes">
{foreach from=$new_themes item=theme name=themes_loop}
<div class="themeBox">
<div class="themeName">{$theme.name}</div>
<div class="themeShot"><img src="{$theme.src}"></div>
<div class="themeActions"><a href="{$theme.install_url}">Install</a></div>
<div class="themeShot"><img src="{$theme.screenshot}"></div>
<div class="themeActions"><a href="{$theme.install_url}">{'Install'|@translate}</a></div>
</div>
{/foreach}
</div> <!-- themesBox -->
</div> <!-- themeBoxes -->
{/if}

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.2 KiB

View file

@ -222,3 +222,5 @@ html>body #menubar {min-height:477px; height:477px;} /* IE 7 and modern browsers
.themeBox IMG {border:1px solid #666;}
.themeName {color:white;}
.themeActions A {border-bottom:none;}
.themeDefault {background-color:#555;}