Ignore:
Timestamp:
Jun 16, 2013, 6:23:45 PM (11 years ago)
Author:
mistic100
Message:

feature:2884 Display "i" tooltip on themes
+ simplify layout (like plugins_installed)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/admin/themes/default/template/themes_installed.tpl

    r14192 r23259  
    11{include file='include/colorbox.inc.tpl'}
     2
    23{footer_script}{literal}
    34jQuery(document).ready(function() {
    4   $("a.preview-box").colorbox();
    5 });
     5  $("a.preview-box").colorbox();
     6 
     7  jQuery('.showInfo').tipTip({
     8    'delay' : 0,
     9    'fadeIn' : 200,
     10    'fadeOut' : 200,
     11    'maxWidth':'300px',
     12    'keepAlive':true,
     13    'activation':'click'
     14  });
     15});
    616{/literal}{/footer_script}
    717
     
    1222<div id="themesContent">
    1323
    14 <fieldset>
    15 <legend>{'Active Themes'|@translate}</legend>
    16 {if isset($active_themes)}
    17 <div class="themeBoxes">
    18 {foreach from=$active_themes item=theme}
    19   <div class="themeBox{if $theme.is_default} themeDefault{/if}">
    20     <div class="themeName">{$theme.name}{if $theme.is_default} <em>({'default'|@translate})</em>{/if} {if $theme.mobile} <em>({'Mobile'|@translate})</em>{/if}</div>
    21     <div class="themeShot"><a href="{$theme.screenshot}" class="preview-box" title="{$theme.name}"><img src="{$theme.screenshot}" alt=""></a></div>
     24{assign var='field_name' value='null'} {* <!-- 'counter' for fieldset management --> *}
     25{foreach from=$tpl_themes item=theme}
     26   
     27{if $field_name != $theme.STATE}
     28  {if $field_name != 'null'}
     29    </div>
     30  </fieldset>
     31  {/if}
     32 
     33  <fieldset>
     34    <legend>
     35    {if $theme.STATE == 'active'}
     36      {'Active Themes'|@translate}
     37    {else}
     38      {'Inactive Themes'|@translate}
     39    {/if}
     40    </legend>
     41    <div class="themeBoxes">
     42  {assign var='field_name' value=$theme.STATE}
     43{/if}
     44
     45  {if not empty($theme.AUTHOR)}
     46    {if not empty($theme.AUTHOR_URL)}
     47      {assign var='author' value="<a href='%s'>%s</a>"|@sprintf:$theme.AUTHOR_URL:$theme.AUTHOR}
     48    {else}
     49      {assign var='author' value='<u>'|cat:$theme.AUTHOR|cat:'</u>'}
     50    {/if}
     51  {/if}
     52  {if not empty($theme.VISIT_URL)}
     53    {assign var='version' value="<a class='externalLink' href='"|cat:$theme.VISIT_URL|cat:"'>"|cat:$theme.VERSION|cat:"</a>"}
     54  {else}
     55    {assign var='version' value=$theme.VERSION}
     56  {/if}
     57 
     58  <div class="themeBox{if $theme.IS_DEFAULT} themeDefault{/if}">
     59    <div class="themeName">
     60      {$theme.NAME} {if $theme.IS_DEFAULT}<em>({'default'|@translate})</em>{/if} {if $theme.IS_MOBILE}<em>({'Mobile'|@translate})</em>{/if}
     61      <a class="showInfo" title="{if !empty($author)}{'By %s'|@translate|@sprintf:$author} | {/if}{'Version'|@translate} {$version}<br/>{$theme.DESC|@escape:'html'}">i</a>
     62    </div>
     63    <div class="themeShot"><a href="{$theme.SCREENSHOT}" class="preview-box" title="{$theme.NAME}"><img src="{$theme.SCREENSHOT}" alt=""></a></div>
    2264    <div class="themeActions">
    2365      <div>
    24 {if $theme.deactivable}
    25       <a href="{$deactivate_baseurl}{$theme.id}" class="tiptip" title="{'Forbid this theme to users'|@translate}">{'Deactivate'|@translate}</a>
     66{if $theme.STATE == 'active'}
     67  {if $theme.DEACTIVABLE}
     68      <a href="{$deactivate_baseurl}{$theme.ID}" class="tiptip" title="{'Forbid this theme to users'|@translate}">{'Deactivate'|@translate}</a>
     69  {else}
     70      <span title="{$theme.DEACTIVATE_TOOLTIP}" class="tiptip">{'Deactivate'|@translate}</span>
     71  {/if}
     72
     73  {if not $theme.IS_DEFAULT}
     74      | <a href="{$set_default_baseurl}{$theme.ID}" class="tiptip" title="{'Set as default theme for unregistered and new users'|@translate}">{'Default'|@translate}</a>
     75  {/if}
     76  {if $theme.ADMIN_URI}
     77      <br><a href="{$theme.ADMIN_URI}" class="tiptip" title="{'Configuration'|@translate}">{'Configuration'|@translate}</a>
     78  {/if}
    2679{else}
    27       <span title="{$theme.deactivate_tooltip}" class="tiptip">{'Deactivate'|@translate}</span>
    28 {/if}
    29      
    30 {if not $theme.is_default}
    31       | <a href="{$set_default_baseurl}{$theme.id}" class="tiptip" title="{'Set as default theme for unregistered and new users'|@translate}">{'Default'|@translate}</a>
    32 {/if}
    33 {if isset($theme.admin_uri)}
    34       <br><a href="{$theme.admin_uri}" class="tiptip" title="{'Configuration'|@translate}">{'Configuration'|@translate}</a>
     80  {if $theme.ACTIVABLE}
     81      <a href="{$activate_baseurl}{$theme.ID}" title="{'Make this theme available to users'|@translate}" class="tiptip">{'Activate'|@translate}</a>
     82  {else}
     83      <span title="{$theme.ACTIVATE_TOOLTIP}" class="tiptip">{'Activate'|@translate}</span>
     84  {/if}
     85      |
     86  {if $theme.DELETABLE}
     87      <a href="{$delete_baseurl}{$theme.ID}" onclick="return confirm('{'Are you sure?'|@translate|@escape:javascript}');" title="{'Delete this theme'|@translate}">{'Delete'|@translate}</a>
     88  {else}
     89      <span title="{$theme.DELETE_TOOLTIP}" class="tiptip">{'Delete'|@translate}</span>
     90  {/if}
    3591{/if}
    3692      </div>
    3793    </div> <!-- themeActions -->
    3894  </div>
    39 {/foreach}
    40 </div> <!-- themeBoxes -->
    41 {/if}
    42 </fieldset>
    43 
    44 {if isset($inactive_themes)}
    45 <fieldset>
    46 <legend>{'Inactive Themes'|@translate}</legend>
    47 <div class="themeBoxes">
    48 {foreach from=$inactive_themes item=theme}
    49   <div class="themeBox">
    50     <div class="themeName">{$theme.name}{if $theme.mobile} <em>({'Mobile'|@translate})</em>{/if}</div>
    51     <div class="themeShot"><a href="{$theme.screenshot}" class="preview-box" title="{$theme.name}"><img src="{$theme.screenshot}" alt=""></a></div>
    52     <div class="themeActions">
    53       <div>
    54   {if $theme.activable}
    55       <a href="{$activate_baseurl}{$theme.id}" title="{'Make this theme available to users'|@translate}" class="tiptip">{'Activate'|@translate}</a>
    56   {else}
    57       <span title="{$theme.activate_tooltip}" class="tiptip">{'Activate'|@translate}</span>
    58   {/if}
    59 
    60       |
    61 
    62   {if $theme.deletable}
    63       <a href="{$delete_baseurl}{$theme.id}" onclick="return confirm('{'Are you sure?'|@translate|@escape:javascript}');" title="{'Delete this theme'|@translate}">{'Delete'|@translate}</a>
    64   {else}
    65       <span title="{$theme.delete_tooltip}" class="tiptip">{'Delete'|@translate}</span>
    66   {/if}
    67       </div>
    68     </div>
    69    
    70   </div>
     95 
    7196{/foreach}
    7297</div> <!-- themeBoxes -->
    7398</fieldset>
    74 {/if}
    7599
    76100</div> <!-- themesContent -->
Note: See TracChangeset for help on using the changeset viewer.