source: extensions/BatchDownloader/template/download_button.tpl @ 25931

Last change on this file since 25931 was 25931, checked in by mistic100, 10 years ago

allow to configure only one downloadable size

File size: 1.6 KB
Line 
1<a href="{$BATCH_DWN_URL}{$BATCH_DWN_SIZE}" id="batchDownloadLink" title="{'Download all pictures of this selection'|@translate}" class="pwg-state-default pwg-button" rel="nofollow">
2  <span class="pwg-icon batch-downloader-icon" style="background:url('{$ROOT_URL}{$BATCH_DOWNLOAD_PATH}template/images/zip.png') center center no-repeat;">&nbsp;</span><span class="pwg-button-text">{'Download'|@translate}</span>
3</a>
4
5{if isset($BATCH_DWN_SIZES)}
6{combine_script id='core.switchbox' load='async' require='jquery' path='themes/default/js/switchbox.js'}
7
8<div id="batchDownloadBox" class="switchBox" style="display:none">
9  <div class="switchBoxTitle">{'Download'|@translate} - {'Photo sizes'|@translate}</div>
10  {foreach from=$BATCH_DWN_SIZES item=size name=loop}{if !$smarty.foreach.loop.first}<br>{/if}
11  <a href="{$BATCH_DWN_URL}{$size.TYPE}" rel="nofollow">
12    {$size.DISPLAY} {if $size.SIZE}<span class="downloadSizeDetails">({$size.SIZE})</span>{/if}
13  </a>
14  {/foreach}
15</div>
16{/if}
17
18{footer_script require='jquery'}
19var batchdown_count = {$BATCH_DWN_COUNT};
20var batchdown_string = "{'Confirm the download of %d pictures?'|@translate}";
21
22{if isset($BATCH_DWN_SIZES)}
23  (SwitchBox=window.SwitchBox||[]).push("#batchDownloadLink", "#batchDownloadBox");
24 
25  jQuery("#batchDownloadBox a").click(function() {
26    return confirm(batchdown_string.replace('%d', batchdown_count));
27  });
28{else}
29  jQuery("#batchDownloadLink").click(function() {
30    return confirm(batchdown_string.replace('%d', batchdown_count));
31  });
32{/if}
33{/footer_script}
34
35{html_style}{literal}
36.downloadSizeDetails {font-style:italic; font-size:80%;}
37{/literal}{/html_style}
Note: See TracBrowser for help on using the repository browser.