Ignore:
Timestamp:
Dec 17, 2013, 11:11:17 PM (10 years ago)
Author:
Miklfe
Message:
 
File:
1 edited

Legend:

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

    r21058 r25994  
    1 {* Example of resizeable *}
    2 {*
    3 {include file='include/autosize.inc.tpl'}
    4 *}
    5 
     1{combine_script id='core.switchbox' load='async' require='jquery' path='themes/default/js/switchbox.js'}
    62{combine_script id='tinyscrollbar' load='header' require='jquery' path='themes/PwgCarbon_dft/js/tinyscrollbar.js'}
    73
    8 
    9 
    10 {if isset($MENUBAR)}{$MENUBAR}{/if}
    11 {if isset($errors)}
    12 <div class="errors">
    13   <ul>
    14     {foreach from=$errors item=error}
    15     <li>{$error}</li>
    16     {/foreach}
    17   </ul>
    18 </div>
    19 {/if}
    20 
    21 
    22 
    23 {if isset($infos)}
    24 <div class="infos">
    25   <ul>
    26     {foreach from=$infos item=info}
    27     <li>{$info}</li>
    28     {/foreach}
    29   </ul>
    30 </div>
     4 {if isset($MENUBAR)}{$MENUBAR}{/if}
     5 
     6{if isset($errors) or not empty($infos)}
     7{include file='infos_errors.tpl'}
    318{/if}
    329
     
    3411
    3512<div id="imageHeaderBar">
    36   <div class="browsePath">
    37     {$SECTION_TITLE}
    38     {$LEVEL_SEPARATOR}{$current.TITLE}
    39   </div>
     13        <div class="browsePath">
     14                {$SECTION_TITLE}<span class="browsePathSeparator">{$LEVEL_SEPARATOR}</span>{$current.TITLE}
     15        </div>
    4016  <div class="imageNumber"> {$PHOTO}</div>
    4117
    4218</div>
    4319
    44 
    45 
    4620<div id="theImage">
    47 
    48 
    4921        <div id="imgContainer">
    5022
     
    7547                       
    7648                        {if $comment_add.SHOW_AUTHOR}
    77                                 <label>{'Author'|@translate}<input type="text" name="author"></label>
    78                         {/if}
    79                                 <label class="addcom"><textarea name="content" id="contentid" rows="6" cols="100">{$comment_add.CONTENT}</textarea></label>
    80                                 <input type="hidden" name="key" value="{$comment_add.KEY}">
    81                                 <input type="submit" value="{'Submit'|@translate}">
     49                                        <p><label for="author">{'Author'|@translate}{if $comment_add.AUTHOR_MANDATORY} ({'mandatory'|@translate}){/if} :</label></p>
     50                                        <p><input type="text" name="author" id="author" value="{$comment_add.AUTHOR}"></p>
     51                                {/if}
     52                                {if $comment_add.SHOW_EMAIL}
     53                                        <p><label for="email">{'Email'|@translate}{if $comment_add.EMAIL_MANDATORY} ({'mandatory'|@translate}){/if} :</label></p>
     54                                        <p><input type="text" name="email" id="email" value="{$comment_add.EMAIL}"></p>
     55                                {/if}
     56                                <p><label for="website_url">{'Website'|@translate} :</label></p>
     57                                <p><input type="text" name="website_url" id="website_url" value="{$comment_add.WEBSITE_URL}"></p>
     58                                <p><label for="contentid">{'Comment'|@translate} ({'mandatory'|@translate}) :</label></p>
     59                                <p><textarea name="content" id="contentid" rows="5" cols="50">{$comment_add.CONTENT}</textarea></p>
     60                                <p><input type="hidden" name="key" value="{$comment_add.KEY}">
     61                                        <input type="submit" value="{'Submit'|@translate}"></p>
    8262                </fieldset>
    8363        </form>
     
    120100</p>
    121101{/if}
    122 
    123 
    124 
    125 
    126 
    127 
    128 
    129 
    130102<div class="panel">
    131103
    132104<div id="imageToolBar">
     105
    133106<div class="actionButtons">
    134 {if count($current.unique_derivatives)>1}
     107{if isset($current.unique_derivatives) && count($current.unique_derivatives)>1}
    135108{footer_script require='jquery'}{literal}
    136109function changeImgSrc(url,typeSave,typeMap)
     
    144117        }
    145118        jQuery('#derivativeSwitchBox .switchCheck').css('visibility','hidden');
    146         jQuery('#derivativeChecked'+typeSave).css('visibility','visible');
     119        jQuery('#derivativeChecked'+typeMap).css('visibility','visible');
    147120        document.cookie = 'picture_deriv='+typeSave+';path={/literal}{$COOKIE_PATH}{literal}';
    148121}
    149 jQuery("#derivativeSwitchLink").click(function() {
    150         var elt = jQuery("#derivativeSwitchBox");
    151         elt.css("left", Math.min( jQuery(this).offset().left, jQuery(window).width() - elt.outerWidth(true) - 5))
    152                 .toggle();
    153 });
    154 jQuery("#derivativeSwitchBox").on("mouseleave click", function() {
    155         jQuery(this).hide();
    156 });
     122(SwitchBox=window.SwitchBox||[]).push("#derivativeSwitchLink", "#derivativeSwitchBox");
    157123{/literal}{/footer_script}
    158124{strip}<a id="derivativeSwitchLink" title="{'Photo sizes'|@translate}" class="pwg-state-default pwg-button" rel="nofollow">
    159   <span class="pwg-icon pwg-icon-sizes">&nbsp;</span><span class="pwg-button-text">{'Photo sizes'|@translate}</span>
     125  <span class="pwg-icon pwg-icon-sizes"></span><span class="pwg-button-text">{'Photo sizes'|@translate}</span>
    160126</a>
    161127<div id="derivativeSwitchBox" class="switchBox">
    162128  <div class="switchBoxTitle">{'Photo sizes'|@translate}</div>
    163129  {foreach from=$current.unique_derivatives item=derivative key=derivative_type}
    164   <span class="switchCheck" id="derivativeChecked{$derivative_type}"{if $derivative->get_type() ne $current.selected_derivative->get_type()} style="visibility:hidden"{/if}>&#x2714; </span>
     130  <span class="switchCheck" id="derivativeChecked{$derivative->get_type()}"{if $derivative->get_type() ne $current.selected_derivative->get_type()} style="visibility:hidden"{/if}>&#x2714; </span>
    165131  <a href="javascript:changeImgSrc('{$derivative->get_url()|@escape:javascript}','{$derivative_type}','{$derivative->get_type()}')">
    166132    {$derivative->get_type()|@translate}<span class="derivativeSizeDetails"> ({$derivative->get_size_hr()})</span>
     
    168134  {/foreach}
    169135  {if isset($U_ORIGINAL)}
     136    {combine_script id='core.scripts' load='async' path='themes/default/js/scripts.js'}
    170137  <a href="javascript:phpWGOpenWindow('{$U_ORIGINAL}','xxx','scrollbars=yes,toolbar=no,status=no,resizable=yes')" rel="nofollow">{'Original'|@translate}</a>
    171138  {/if}
     
    175142{strip}{if isset($U_SLIDESHOW_START)}
    176143        <a href="{$U_SLIDESHOW_START}" title="{'slideshow'|@translate}" class="pwg-state-default pwg-button" rel="nofollow">
    177                 <span class="pwg-icon pwg-icon-slideshow"> </span><span class="pwg-button-text">{'slideshow'|@translate}</span>
     144                <span class="pwg-icon pwg-icon-slideshow"></span><span class="pwg-button-text">{'slideshow'|@translate}</span>
    178145        </a>
    179146{/if}{/strip}
    180147{strip}{if isset($U_METADATA)}
    181148        <a href="{$U_METADATA}" title="{'Show file metadata'|@translate}" class="pwg-state-default pwg-button" rel="nofollow">
    182                 <span class="pwg-icon pwg-icon-camera-info"> </span><span class="pwg-button-text">{'Show file metadata'|@translate}</span>
     149                <span class="pwg-icon pwg-icon-camera-info"></span><span class="pwg-button-text">{'Show file metadata'|@translate}</span>
    183150        </a>
    184151{/if}{/strip}
    185152{strip}{if isset($current.U_DOWNLOAD)}
    186153        <a href="{$current.U_DOWNLOAD}" title="{'Download this file'|@translate}" class="pwg-state-default pwg-button" rel="nofollow">
    187                 <span class="pwg-icon pwg-icon-save"> </span><span class="pwg-button-text">{'Download'|@translate}</span>
    188         </a>
    189 {/if}{/strip}
     154                <span class="pwg-icon pwg-icon-save"></span><span class="pwg-button-text">{'Download'|@translate}</span>
     155        </a>
     156{/if}{/strip}
     157{if isset($PLUGIN_PICTURE_BUTTONS)}{foreach from=$PLUGIN_PICTURE_BUTTONS item=button}{$button}{/foreach}{/if}
    190158{if isset($PLUGIN_PICTURE_ACTIONS)}{$PLUGIN_PICTURE_ACTIONS}{/if}
    191159{strip}{if isset($favorite)}
    192160        <a href="{$favorite.U_FAVORITE}" title="{if $favorite.IS_FAVORITE}{'delete this photo from your favorites'|@translate}{else}{'add this photo to your favorites'|@translate}{/if}" class="pwg-state-default pwg-button" rel="nofollow">
    193                 <span class="pwg-icon pwg-icon-favorite-{if $favorite.IS_FAVORITE}del{else}add{/if}"> </span><span class="pwg-button-text">{'Favorites'|@translate}</span>
     161                <span class="pwg-icon pwg-icon-favorite-{if $favorite.IS_FAVORITE}del{else}add{/if}"></span><span class="pwg-button-text">{'Favorites'|@translate}</span>
    194162        </a>
    195163{/if}{/strip}
    196164{strip}{if isset($U_SET_AS_REPRESENTATIVE)}
    197         <a href="{$U_SET_AS_REPRESENTATIVE}" title="{'set as album representative'|@translate}" class="pwg-state-default pwg-button" rel="nofollow">
    198                 <span class="pwg-icon pwg-icon-representative"> </span><span class="pwg-button-text">{'representative'|@translate}</span>
    199         </a>
    200 {/if}{/strip}
    201 {strip}{if isset($U_ADMIN)}
    202         <a href="{$U_ADMIN}" title="{'Modify information'|@translate}" class="pwg-state-default pwg-button" rel="nofollow">
    203                 <span class="pwg-icon pwg-icon-edit"> </span><span class="pwg-button-text">{'Edit'|@translate}</span>
     165        <a id="cmdSetRepresentative" href="{$U_SET_AS_REPRESENTATIVE}" title="{'set as album representative'|@translate}" class="pwg-state-default pwg-button" rel="nofollow">
     166                <span class="pwg-icon pwg-icon-representative"></span><span class="pwg-button-text">{'representative'|@translate}</span>
     167        </a>
     168{/if}{/strip}
     169{strip}{if isset($U_PHOTO_ADMIN)}
     170        <a id="cmdEditPhoto" href="{$U_PHOTO_ADMIN}" title="{'Modify information'|@translate}" class="pwg-state-default pwg-button" rel="nofollow">
     171                <span class="pwg-icon pwg-icon-edit"></span><span class="pwg-button-text">{'Edit'|@translate}</span>
    204172        </a>
    205173{/if}{/strip}
Note: See TracChangeset for help on using the changeset viewer.