source: extensions/download_by_size/picture.tpl @ 27451

Last change on this file since 27451 was 23162, checked in by plg, 11 years ago

bug fixed: avoid "Access denied e" if HD is forbidden and XXL is as big as original.

bug fixed: in template use $derivative_type instead of $derivative->get_type() to avoid size=Original

File size: 1.1 KB
Line 
1{footer_script require='jquery'}{literal}
2jQuery().ready(function() {
3  jQuery("#downloadSizeLink").click(function() {
4          var elt = jQuery("#downloadSizeBox");
5
6    elt.css("left", Math.min( jQuery(this).offset().left, jQuery(window).width() - elt.outerWidth(true) - 5))
7      .css("top", jQuery(this).offset().top + jQuery(this).outerHeight(true))
8      .toggle();
9
10    return false;
11  });
12
13  jQuery("#downloadSizeBox").on("mouseleave click", function() {
14    jQuery(this).hide();
15  });
16});
17{/literal}{/footer_script}
18
19{literal}
20<style>
21.downloadSizeDetails {font-style:italic; font-size:80%;}
22</style>
23{/literal}
24
25<div id="downloadSizeBox" class="switchBox" style="display:none">
26  <div class="switchBoxTitle">{'Download'|@translate} - {'Photo sizes'|@translate}</div>
27  {foreach from=$current.unique_derivatives item=derivative key=derivative_type}
28  <a href="{$DLSIZE_URL}{$derivative_type}" rel="nofollow">
29    {$derivative->get_type()|@translate}<span class="downloadSizeDetails"> ({$derivative->get_size_hr()})</span>
30  </a><br>
31  {/foreach}
32  {if isset($DLSIZE_ORIGINAL)}
33  <a href="{$DLSIZE_ORIGINAL}" rel="nofollow">{'Original'|@translate}</a>
34  {/if}
35</div>
Note: See TracBrowser for help on using the repository browser.