Ignore:
Timestamp:
04/26/16 16:25:28 (4 years ago)
Author:
plg
Message:

equivalent to stripped r31389

compatibility with formats in Piwigo 2.8

File:
1 edited

Legend:

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

    r30101 r31575  
     1{combine_script id='core.switchbox' load='async' require='jquery' path='themes/default/js/switchbox.js'} 
     2 
    13{assign var=derivative value=$pwg->derivative($stripped_responsive.imageSize, $current.src_image)} 
    24{assign var='size' value=$derivative->get_size()} 
     
    3739                {strip}{if isset($current.U_DOWNLOAD)} 
    3840          <li> 
    39             <a href="{$current.U_DOWNLOAD}" title="{'download this file'|@translate}"> 
     41            <a id="downloadSwitchLink" href="{$current.U_DOWNLOAD}" title="{'Download this file'|@translate}"> 
    4042              <span class="pwg-icon pwg-icon-download"></span> 
    4143              <span class="pwg-button-text">{'Download'|@translate}</span> 
     
    4345          </li> 
    4446                {/if}{/strip} 
     47 
     48{if !empty($current.formats)} 
     49{footer_script require='jquery'}{literal} 
     50jQuery().ready(function() { 
     51  jQuery("#downloadSwitchLink").removeAttr("href"); 
     52  
     53  (window.SwitchBox=window.SwitchBox||[]).push("#downloadSwitchLink", "#downloadSwitchBox"); 
     54}); 
     55{/literal}{/footer_script} 
     56  
     57<div id="downloadSwitchBox" class="switchBox"> 
     58  <div class="switchBoxTitle">{'Download'|translate} - {'Formats'|translate}</div> 
     59  <ul> 
     60  {foreach from=$current.formats item=format} 
     61    <li><a href="{$format.download_url}" rel="nofollow">{$format.label}<span class="downloadformatDetails"> ({$format.filesize})</span></a></li> 
     62  {/foreach} 
     63  </ul> 
     64</div> 
     65{/if} {* has formats *} 
     66 
    4567                {strip}{if isset($PLUGIN_PICTURE_ACTIONS)} 
    4668                        <li class="plugin_buttons plugin_buttons_group1">{$PLUGIN_PICTURE_ACTIONS}</li> 
Note: See TracChangeset for help on using the changeset viewer.