Changeset 31389


Ignore:
Timestamp:
Mar 2, 2016, 4:13:43 PM (5 years ago)
Author:
plg
Message:

compatibility with formats in Piwigo 2.8

Location:
extensions/stripped
Files:
2 edited

Legend:

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

    r27316 r31389  
     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.imageSize, $current.src_image)}
    24{assign var='size' value=$derivative->get_size()}
     
    3537        {/if}{/strip}
    3638                {strip}{if isset($current.U_DOWNLOAD)}
    37                         <li><a href="{$current.U_DOWNLOAD}" title="{'download this file'|@translate}">{'Download'|@translate}</a></li>
     39                        <li><a id="downloadSwitchLink" href="{$current.U_DOWNLOAD}" title="{'download this file'|@translate}">{'Download'|@translate}</a></li>
    3840                {/if}{/strip}
     41
     42{if !empty($current.formats)}
     43{footer_script require='jquery'}{literal}
     44jQuery().ready(function() {
     45  jQuery("#downloadSwitchLink").removeAttr("href");
     46 
     47  (window.SwitchBox=window.SwitchBox||[]).push("#downloadSwitchLink", "#downloadSwitchBox");
     48});
     49{/literal}{/footer_script}
     50 
     51<div id="downloadSwitchBox" class="switchBox">
     52  <div class="switchBoxTitle">{'Download'|translate} - {'Formats'|translate}</div>
     53  <ul>
     54  {foreach from=$current.formats item=format}
     55    <li><a href="{$format.download_url}" rel="nofollow">{$format.label}<span class="downloadformatDetails"> ({$format.filesize})</span></a></li>
     56  {/foreach}
     57  </ul>
     58</div>
     59{/if} {* has formats *}
     60
    3961                {strip}{if isset($PLUGIN_PICTURE_ACTIONS)}
    4062                        <li class="plugin_buttons plugin_buttons_group1">{$PLUGIN_PICTURE_ACTIONS}</li>
  • extensions/stripped/theme.css

    r24444 r31389  
    15531553  border-bottom: 1px solid #444444;
    15541554}
     1555
     1556.switchBox ul {
     1557  padding:0;
     1558  margin:0;
     1559}
     1560
     1561.switchBox ul li {
     1562  display:block;
     1563  float:none;
     1564}
Note: See TracChangeset for help on using the changeset viewer.