Changeset 31390


Ignore:
Timestamp:
03/02/16 19:41:08 (4 years ago)
Author:
plg
Message:

move admin links into a dedicated switchbox (to save space)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • extensions/stripped/template/picture.tpl

    r31389 r31390  
    2121                        {include file='picture_nav_buttons.tpl'|@get_extent:'picture_nav_buttons'} 
    2222                </li> 
     23 
     24{if isset($U_PHOTO_ADMIN) or isset($U_CADDIE) or !empty($U_SET_AS_REPRESENTATIVE)} 
     25    <li><a id="adminSwitchLink" href="#">{'Administration'|translate}</a></li> 
     26 
     27{footer_script require='jquery'}{literal} 
     28jQuery().ready(function() { 
     29  (window.SwitchBox=window.SwitchBox||[]).push("#adminSwitchLink", "#adminSwitchBox"); 
     30}); 
     31{/literal}{/footer_script} 
     32  
     33<div id="adminSwitchBox" class="switchBox"> 
     34  <ul> 
     35  {if isset($U_PHOTO_ADMIN)} 
     36    <li><a href="{$U_PHOTO_ADMIN}" title="{'Modify information'|@translate}">{'edit'|@translate}</a></li> 
     37  {/if} 
     38  {if isset($U_CADDIE)} 
     39    <li><a href="{$U_CADDIE}" onclick="addToCadie(this, '{$ROOT_URL}', {$current.id}); return false;" title="{'add to caddie'|@translate}" rel="nofollow">{'caddie'|@translate}</a></li> 
     40  {/if} 
     41  {if !empty($U_SET_AS_REPRESENTATIVE) } 
     42    <li><a href="{$U_SET_AS_REPRESENTATIVE}" title="{'set as album representative'|@translate}">{'representative'|@translate}</a></li> 
     43  {/if} 
     44  </ul> 
     45</div> 
     46{/if} 
     47 
    2348                {strip}{if isset($U_SLIDESHOW_START) } 
    2449                        <li><a href="{$U_SLIDESHOW_START}" title="{'slideshow'|@translate}" rel="nofollow">{'slideshow'|@translate}</a></li> 
    2550                {/if}{/strip} 
    26         {strip}{if isset($U_PHOTO_ADMIN) } 
    27                         <li><a href="{$U_PHOTO_ADMIN}" title="{'Modify information'|@translate}">{'edit'|@translate}</a></li> 
    28         {/if}{/strip} 
    29                 {strip}{if isset($U_CADDIE)} 
    30                         <li><a href="{$U_CADDIE}" onclick="addToCadie(this, '{$ROOT_URL}', {$current.id}); return false;" title="{'add to caddie'|@translate}" rel="nofollow">{'caddie'|@translate}</a></li> 
    31         {/if}{/strip} 
    3251                {strip}{if isset($favorite) } 
    3352                        <li><a href="{$favorite.U_FAVORITE}" title="{$favorite.FAVORITE_HINT}">{'Favorites'|@translate}</a></li> 
    34         {/if}{/strip} 
    35         {strip}{if !empty($U_SET_AS_REPRESENTATIVE) } 
    36                         <li><a href="{$U_SET_AS_REPRESENTATIVE}" title="{'set as album representative'|@translate}">{'representative'|@translate}</a></li> 
    3753        {/if}{/strip} 
    3854                {strip}{if isset($current.U_DOWNLOAD)} 
Note: See TracChangeset for help on using the changeset viewer.