source: extensions/BatchDownloader/admin/template/config.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: 7.0 KB
Line 
1{combine_css path=$BATCH_DOWNLOAD_PATH|@cat:"admin/template/style.css"}
2
3{combine_script id='jquery.ui.slider' require='jquery.ui' load='footer' path='themes/default/js/ui/jquery.ui.slider.js'}
4{combine_css path="themes/default/js/ui/theme/jquery.ui.slider.css"}
5{combine_script id='jquery.chosen' load='footer' path='themes/default/js/plugins/chosen.jquery.min.js'}
6{combine_css path="themes/default/js/plugins/chosen.css"}
7
8{footer_script}
9jQuery(".chzn-select").chosen();
10
11$("#max_size").slider({ldelim}
12  range: "min",
13  value: {$batch_download.max_size},
14  min: 10,
15  max: {$batch_download.max_size_value},
16  slide: function(event, ui) {ldelim}
17    $("input[name='max_size']").val(ui.value);
18  }
19});
20$("input[name='max_size']").change(function() {ldelim}
21  $("#max_size").slider("value", $(this).val());
22});
23
24$("#max_elements").slider({ldelim}
25  range: "min",
26  value: {$batch_download.max_elements},
27  min: 10,
28  max: {$batch_download.max_elements_value},
29  slide: function(event, ui) {ldelim}
30    $("input[name='max_elements']").val(ui.value);
31  }
32});
33
34$("input[name='max_elements']").change(function() {
35  $("#max_elements").slider("value", $(this).val());
36});
37
38jQuery(".showInfo").tipTip({
39  delay: 0,
40  fadeIn: 200,
41  fadeOut: 200,
42  maxWidth: '300px',
43  defaultPosition: 'bottom'
44});
45
46$(".show_advanced").click(function() {
47  $(this).slideUp();
48  $(".advanced").slideDown();
49});
50
51$('input[name="multisize"]').on('change', function() {
52  if ($(this).val() == 'true') {
53    $('#multisize_title').text('{'Maximum photo size'|@translate|escape:javascript}');
54  }
55  else {
56    $('#multisize_title').text('{'Photo size'|@translate|escape:javascript}');
57  }
58})
59.filter(':checked').trigger('change');
60{/footer_script}
61
62
63<div class="titrePage">
64        <h2>Batch Downloader</h2>
65</div>
66
67<form method="post" action="" class="properties">
68<fieldset>
69  <legend>{'Download permissions'|@translate}</legend>
70 
71  <ul>
72    <li>
73      <i>{'Warning: Only registered users can use Batch Downloader.'|@translate}</i>
74    </li>
75    <li>
76      <label>
77      {if $group_options}
78        <b>{'User groups'|@translate}</b>
79        <select name="groups[]" data-placeholder="{'Everybody'|@translate}" class="chzn-select" multiple="multiple" style="width:370px;">
80          {html_options options=$group_options selected=$batch_download.groups}
81        </select>
82      {else}
83        {'There is no group in this gallery.'|@translate} <a href="admin.php?page=group_list">{'Group management'|@translate}</a>
84      {/if}
85      </label>
86    </li>
87    <li>
88      <label>
89        <b>{'Privacy level'|@translate}</b>
90        <select name="level">
91          {html_options options=$level_options selected=$batch_download.level}
92        </select>
93      </label>
94    </li>
95    <li>
96      <b>{'What can be downloaded?'|@translate}</b>
97      <label><input type="checkbox" name="what[categories]" {if in_array('categories',$batch_download.what)}checked="checked"{/if}/> {'Albums'|@translate}</label>
98      {if $USER_COLLEC_LOADED}<label><input type="checkbox" name="what[collections]" {if in_array('collections',$batch_download.what)}checked="checked"{/if}/> {'Collections'|@translate}</label>{/if}
99      <label><input type="checkbox" name="what[specials]" {if in_array('specials',$batch_download.what)}checked="checked"{/if}/> {'Specials'|@translate}</label>
100      <a class="icon-info-circled-1 showInfo" title="{'Most visited'|@translate}, {'Random photos'|@translate}, {'Best rated'|@translate}..."></a>
101    </li>
102    <li>
103      <b>{'Photo size choices'|translate}</b>
104      <label><input type="radio" name="multisize" value="true" {if $batch_download.multisize}checked{/if}> {'Any size'|translate}</label>
105      <label><input type="radio" name="multisize" value="false" {if !$batch_download.multisize}checked{/if}> {'One size'|translate}</label>
106
107      <label>
108        <b id="multisize_title">{'Maximum photo size'|@translate}</b>
109        <select name="photo_size">
110          {html_options options=$sizes_options selected=$batch_download.photo_size}
111        </select>
112      </label>
113    </li>
114  </ul>
115</fieldset>
116
117<fieldset>
118  <legend>{'Archives'|@translate}</legend>
119 
120  <ul>
121    <li>
122      <label>
123        <b>{'Delete downloads after'|@translate}</b>
124        <input type="text" name="archive_timeout" value="{$batch_download.archive_timeout}" size="3"> {'hours'|@translate}
125      </label>
126    </li>
127    <li>
128      <label>
129        <b>{'Maximum number of photos per download set'|@translate}</b>
130        <div id="max_elements"></div>
131        <input type="text" name="max_elements" value="{$batch_download.max_elements}" size="5">
132      </label>
133    </li>
134    <li>
135      <label>
136        <b>{'Maximum size of each archive (in Megabytes)'|@translate}</b>
137        <div id="max_size"></div>
138        <input type="text" name="max_size" value="{$batch_download.max_size}" size="5">
139      </label>
140    </li>
141    <li>
142      <label>
143        <b>{'Archive prefix'|@translate}</b>
144        <input type="text" name="archive_prefix" value="{$batch_download.archive_prefix}">
145      </label>
146    </li>
147    <li>
148      <label>
149        <input type="checkbox" name="one_archive" {if $batch_download.one_archive}checked{/if}>
150        <b>{'Delete previous archive when starting to download another one'|@translate}</b>
151      </label>
152      <a class="icon-info-circled-1 showInfo" title="{'It saves space on the server but doesn\'t allow to restart failed downloads.'|@translate}"></a>
153    </li>
154    <li>
155      <label>
156        <input type="checkbox" name="force_pclzip" {if $batch_download.force_pclzip}checked{/if}>
157        <b>{'Force the usage of PclZip instead of ZipArchive as ZIP library'|@translate}</b>
158      </label>
159      <a class="icon-info-circled-1 showInfo" title="{'Only check if you are experiencing corrupted archives with ZipArchive.'|@translate}"></a>
160    </li>
161    <li>
162      <label>
163        <input type="checkbox" name="direct" {if $batch_download.direct}checked{/if}>
164        <b>{'Don\'t download archives through PHP'|@translate}</b>
165      </label>
166      <a class="icon-info-circled-1 showInfo" title="{'Only check if your host complains about high PHP usage.'|@translate}"></a>
167    </li>
168  {if $use_ziparchive}
169    <li>
170      <label>
171        <b>{'Archive comment'|@translate} :</b><br>
172        <textarea name="archive_comment" rows="5" style="width:450px;">{$batch_download_comment}</textarea>
173      </label>
174      <br>
175      <i>{'Warning: ZipArchive doesn\'t accept special characters like accentuated ones, angle quotes (») and non-latin alphabets.'|@translate}</i>
176    </li>
177  {else}
178    <input type="hidden" name="archive_comment" value="">
179  {/if}
180  </ul>
181</fieldset>
182
183<p class="formButtons"><input type="submit" name="save_config" value="{'Save Settings'|@translate}"></p> 
184
185<fieldset>
186  <legend>{'Environment'|@translate}</legend>
187 
188  <b>PHP</b> {$PHP_VERSION}<br>
189{if $use_ziparchive}
190  <b>ZipArchive</b> {$PHP_VERSION}
191{else}
192  <b>PclZip</b> 2.8.2
193{/if}
194</fieldset>
195
196<fieldset>
197  <legend>{'Advanced features'|@translate}</legend>
198 
199  <dl class="advanced" style="display:none;">
200    {$ADVANCED_CONF}
201  </dl>
202 
203  <span class="show_advanced buttonLike">{'Display'|@translate}</span>
204</fieldset>
205
206</form>
Note: See TracBrowser for help on using the repository browser.