1 | {include file='include/datepicker.inc.tpl' load_mode='async'} |
---|
2 | {include file='include/colorbox.inc.tpl' load_mode='async'} |
---|
3 | {include file='include/add_album.inc.tpl' load_mode='async'} |
---|
4 | |
---|
5 | {combine_script id='common' load='footer' path='admin/themes/default/js/common.js'} |
---|
6 | |
---|
7 | {combine_script id='jquery.ui.slider' require='jquery.ui' load='async' path='themes/default/js/ui/minified/jquery.ui.slider.min.js'} |
---|
8 | {combine_css path="themes/default/js/ui/theme/jquery.ui.slider.css"} |
---|
9 | {combine_script id='doubleSlider' load='async' require='jquery.ui.slider' path='admin/themes/default/js/doubleSlider.js'} |
---|
10 | |
---|
11 | {combine_script id='LocalStorageCache' load='footer' path='admin/themes/default/js/LocalStorageCache.js'} |
---|
12 | |
---|
13 | {combine_script id='jquery.selectize' load='footer' path='themes/default/js/plugins/selectize.min.js'} |
---|
14 | {combine_css id='jquery.selectize' path="themes/default/js/plugins/selectize.{$themeconf.colorscheme}.css"} |
---|
15 | |
---|
16 | {combine_script id='jquery.progressBar' load='async' path='themes/default/js/plugins/jquery.progressbar.min.js'} |
---|
17 | {combine_script id='jquery.ajaxmanager' load='async' path='themes/default/js/plugins/jquery.ajaxmanager.js'} |
---|
18 | |
---|
19 | {combine_script id='batchManagerGlobal' load='async' require='jquery,datepicker,jquery.colorbox,addAlbum,doubleSlider' path='admin/themes/default/js/batchManagerGlobal.js'} |
---|
20 | |
---|
21 | {footer_script} |
---|
22 | var lang = { |
---|
23 | Cancel: '{'Cancel'|translate|escape:'javascript'}', |
---|
24 | AreYouSure: "{'Are you sure?'|translate|escape:'javascript'}" |
---|
25 | }; |
---|
26 | |
---|
27 | jQuery(document).ready(function() { |
---|
28 | |
---|
29 | {* <!-- TAGS --> *} |
---|
30 | var tagsCache = new TagsCache({ |
---|
31 | serverKey: '{$CACHE_KEYS.tags}', |
---|
32 | serverId: '{$CACHE_KEYS._hash}', |
---|
33 | rootUrl: '{$ROOT_URL}' |
---|
34 | }); |
---|
35 | |
---|
36 | tagsCache.selectize(jQuery('[data-selectize=tags]'), { lang: { |
---|
37 | 'Add': '{'Create'|translate}' |
---|
38 | }}); |
---|
39 | |
---|
40 | {* <!-- CATEGORIES --> *} |
---|
41 | window.categoriesCache = new CategoriesCache({ |
---|
42 | serverKey: '{$CACHE_KEYS.categories}', |
---|
43 | serverId: '{$CACHE_KEYS._hash}', |
---|
44 | rootUrl: '{$ROOT_URL}' |
---|
45 | }); |
---|
46 | |
---|
47 | categoriesCache.selectize(jQuery('[data-selectize=categories]'), { |
---|
48 | filter: function(categories, options) { |
---|
49 | if (this.name == 'dissociate') { |
---|
50 | var filtered = jQuery.grep(categories, function(cat) { |
---|
51 | return !cat.dir; |
---|
52 | }); |
---|
53 | |
---|
54 | if (filtered.length > 0) { |
---|
55 | jQuery('.albumDissociate').show(); |
---|
56 | options.default = filtered[0].id; |
---|
57 | } |
---|
58 | |
---|
59 | return filtered; |
---|
60 | } |
---|
61 | else { |
---|
62 | return categories; |
---|
63 | } |
---|
64 | } |
---|
65 | }); |
---|
66 | |
---|
67 | }); |
---|
68 | |
---|
69 | var nb_thumbs_page = {$nb_thumbs_page}; |
---|
70 | var nb_thumbs_set = {$nb_thumbs_set}; |
---|
71 | var applyOnDetails_pattern = "{'on the %d selected photos'|@translate}"; |
---|
72 | var all_elements = [{if !empty($all_elements)}{','|@implode:$all_elements}{/if}]; |
---|
73 | |
---|
74 | var selectedMessage_pattern = "{'%d of %d photos selected'|@translate}"; |
---|
75 | var selectedMessage_none = "{'No photo selected, %d photos in current set'|@translate}"; |
---|
76 | var selectedMessage_all = "{'All %d photos are selected'|@translate}"; |
---|
77 | |
---|
78 | $(document).ready(function() { |
---|
79 | function checkPermitAction() { |
---|
80 | var nbSelected = 0; |
---|
81 | if ($("input[name=setSelected]").is(':checked')) { |
---|
82 | nbSelected = nb_thumbs_set; |
---|
83 | } |
---|
84 | else { |
---|
85 | nbSelected = $(".thumbnails input[type=checkbox]").filter(':checked').length; |
---|
86 | } |
---|
87 | |
---|
88 | if (nbSelected == 0) { |
---|
89 | $("#permitAction").hide(); |
---|
90 | $("#forbidAction").show(); |
---|
91 | } |
---|
92 | else { |
---|
93 | $("#permitAction").show(); |
---|
94 | $("#forbidAction").hide(); |
---|
95 | } |
---|
96 | |
---|
97 | $("#applyOnDetails").text( |
---|
98 | sprintf( |
---|
99 | applyOnDetails_pattern, |
---|
100 | nbSelected |
---|
101 | ) |
---|
102 | ); |
---|
103 | |
---|
104 | // display the number of currently selected photos in the "Selection" fieldset |
---|
105 | if (nbSelected == 0) { |
---|
106 | $("#selectedMessage").text( |
---|
107 | sprintf( |
---|
108 | selectedMessage_none, |
---|
109 | nb_thumbs_set |
---|
110 | ) |
---|
111 | ); |
---|
112 | } |
---|
113 | else if (nbSelected == nb_thumbs_set) { |
---|
114 | $("#selectedMessage").text( |
---|
115 | sprintf( |
---|
116 | selectedMessage_all, |
---|
117 | nb_thumbs_set |
---|
118 | ) |
---|
119 | ); |
---|
120 | } |
---|
121 | else { |
---|
122 | $("#selectedMessage").text( |
---|
123 | sprintf( |
---|
124 | selectedMessage_pattern, |
---|
125 | nbSelected, |
---|
126 | nb_thumbs_set |
---|
127 | ) |
---|
128 | ); |
---|
129 | } |
---|
130 | } |
---|
131 | |
---|
132 | $("[id^=action_]").hide(); |
---|
133 | |
---|
134 | $("select[name=selectAction]").change(function () { |
---|
135 | $("[id^=action_]").hide(); |
---|
136 | $("#action_"+$(this).prop("value")).show(); |
---|
137 | |
---|
138 | if ($(this).val() != -1) { |
---|
139 | $("#applyActionBlock").show(); |
---|
140 | } |
---|
141 | else { |
---|
142 | $("#applyActionBlock").hide(); |
---|
143 | } |
---|
144 | }); |
---|
145 | |
---|
146 | $(".wrap1 label").click(function (event) { |
---|
147 | $("input[name=setSelected]").prop('checked', false); |
---|
148 | |
---|
149 | var wrap2 = $(this).children(".wrap2"); |
---|
150 | var checkbox = $(this).children("input[type=checkbox]"); |
---|
151 | |
---|
152 | checkbox.triggerHandler("shclick",event); |
---|
153 | |
---|
154 | if ($(checkbox).is(':checked')) { |
---|
155 | $(wrap2).addClass("thumbSelected"); |
---|
156 | } |
---|
157 | else { |
---|
158 | $(wrap2).removeClass('thumbSelected'); |
---|
159 | } |
---|
160 | |
---|
161 | checkPermitAction(); |
---|
162 | }); |
---|
163 | |
---|
164 | $("#selectAll").click(function () { |
---|
165 | $("input[name=setSelected]").prop('checked', false); |
---|
166 | selectPageThumbnails(); |
---|
167 | checkPermitAction(); |
---|
168 | return false; |
---|
169 | }); |
---|
170 | |
---|
171 | function selectPageThumbnails() { |
---|
172 | $(".thumbnails label").each(function() { |
---|
173 | var wrap2 = $(this).children(".wrap2"); |
---|
174 | var checkbox = $(this).children("input[type=checkbox]"); |
---|
175 | |
---|
176 | $(checkbox).prop('checked', true); |
---|
177 | $(wrap2).addClass("thumbSelected"); |
---|
178 | }); |
---|
179 | } |
---|
180 | |
---|
181 | $("#selectNone").click(function () { |
---|
182 | $("input[name=setSelected]").prop('checked', false); |
---|
183 | |
---|
184 | $(".thumbnails label").each(function() { |
---|
185 | var wrap2 = $(this).children(".wrap2"); |
---|
186 | var checkbox = $(this).children("input[type=checkbox]"); |
---|
187 | |
---|
188 | $(checkbox).prop('checked', false); |
---|
189 | $(wrap2).removeClass("thumbSelected"); |
---|
190 | }); |
---|
191 | checkPermitAction(); |
---|
192 | return false; |
---|
193 | }); |
---|
194 | |
---|
195 | $("#selectInvert").click(function () { |
---|
196 | $("input[name=setSelected]").prop('checked', false); |
---|
197 | |
---|
198 | $(".thumbnails label").each(function() { |
---|
199 | var wrap2 = $(this).children(".wrap2"); |
---|
200 | var checkbox = $(this).children("input[type=checkbox]"); |
---|
201 | |
---|
202 | $(checkbox).prop('checked', !$(checkbox).is(':checked')); |
---|
203 | |
---|
204 | if ($(checkbox).is(':checked')) { |
---|
205 | $(wrap2).addClass("thumbSelected"); |
---|
206 | } |
---|
207 | else { |
---|
208 | $(wrap2).removeClass('thumbSelected'); |
---|
209 | } |
---|
210 | }); |
---|
211 | checkPermitAction(); |
---|
212 | return false; |
---|
213 | }); |
---|
214 | |
---|
215 | $("#selectSet").click(function () { |
---|
216 | selectPageThumbnails(); |
---|
217 | $("input[name=setSelected]").prop('checked', true); |
---|
218 | checkPermitAction(); |
---|
219 | return false; |
---|
220 | }); |
---|
221 | |
---|
222 | |
---|
223 | jQuery('#applyAction').click(function() { |
---|
224 | var action = jQuery('[name="selectAction"]').val(); |
---|
225 | if (action == 'delete_derivatives') { |
---|
226 | var d_count = $('#action_delete_derivatives input[type=checkbox]').filter(':checked').length |
---|
227 | , e_count = $('input[name="setSelected"]').is(':checked') ? nb_thumbs_set : $('.thumbnails input[type=checkbox]').filter(':checked').length; |
---|
228 | if (d_count*e_count > 500) |
---|
229 | return confirm(lang.AreYouSure); |
---|
230 | } |
---|
231 | |
---|
232 | if (action != 'generate_derivatives' |
---|
233 | || derivatives.finished() ) |
---|
234 | { |
---|
235 | return true; |
---|
236 | } |
---|
237 | |
---|
238 | jQuery('.bulkAction').hide(); |
---|
239 | |
---|
240 | var queuedManager = jQuery.manageAjax.create('queued', { |
---|
241 | queue: true, |
---|
242 | cacheResponse: false, |
---|
243 | maxRequests: 1 |
---|
244 | }); |
---|
245 | |
---|
246 | derivatives.elements = []; |
---|
247 | if (jQuery('input[name="setSelected"]').is(':checked')) |
---|
248 | derivatives.elements = all_elements; |
---|
249 | else |
---|
250 | jQuery('.thumbnails input[type=checkbox]').each(function() { |
---|
251 | if (jQuery(this).is(':checked')) { |
---|
252 | derivatives.elements.push(jQuery(this).val()); |
---|
253 | } |
---|
254 | }); |
---|
255 | |
---|
256 | jQuery('#applyActionBlock').hide(); |
---|
257 | jQuery('select[name="selectAction"]').hide(); |
---|
258 | jQuery('#regenerationMsg').show(); |
---|
259 | |
---|
260 | progress(); |
---|
261 | getDerivativeUrls(); |
---|
262 | return false; |
---|
263 | }); |
---|
264 | |
---|
265 | checkPermitAction(); |
---|
266 | |
---|
267 | jQuery("select[name=filter_prefilter]").change(function() { |
---|
268 | jQuery("#empty_caddie").toggle(jQuery(this).val() == "caddie"); |
---|
269 | jQuery("#duplicates_options").toggle(jQuery(this).val() == "duplicates"); |
---|
270 | }); |
---|
271 | }); |
---|
272 | |
---|
273 | {*<!-- sliders config -->*} |
---|
274 | var sliders = { |
---|
275 | widths: { |
---|
276 | values: [{$dimensions.widths}], |
---|
277 | selected: { |
---|
278 | min: {$dimensions.selected.min_width}, |
---|
279 | max: {$dimensions.selected.max_width}, |
---|
280 | }, |
---|
281 | text: '{'between %d and %d pixels'|translate|escape:'javascript'}' |
---|
282 | }, |
---|
283 | |
---|
284 | heights: { |
---|
285 | values: [{$dimensions.heights}], |
---|
286 | selected: { |
---|
287 | min: {$dimensions.selected.min_height}, |
---|
288 | max: {$dimensions.selected.max_height}, |
---|
289 | }, |
---|
290 | text: '{'between %d and %d pixels'|translate|escape:'javascript'}' |
---|
291 | }, |
---|
292 | |
---|
293 | ratios: { |
---|
294 | values: [{$dimensions.ratios}], |
---|
295 | selected: { |
---|
296 | min: {$dimensions.selected.min_ratio}, |
---|
297 | max: {$dimensions.selected.max_ratio}, |
---|
298 | }, |
---|
299 | text: '{'between %.2f and %.2f'|translate|escape:'javascript'}' |
---|
300 | }, |
---|
301 | |
---|
302 | filesizes: { |
---|
303 | values: [{$filesize.list}], |
---|
304 | selected: { |
---|
305 | min: {$filesize.selected.min}, |
---|
306 | max: {$filesize.selected.max}, |
---|
307 | }, |
---|
308 | text: '{'between %s and %s MB'|translate|escape:'javascript'}' |
---|
309 | } |
---|
310 | }; |
---|
311 | |
---|
312 | {/footer_script} |
---|
313 | |
---|
314 | <div id="batchManagerGlobal"> |
---|
315 | |
---|
316 | <h2>{'Batch Manager'|@translate}</h2> |
---|
317 | |
---|
318 | <form action="{$F_ACTION}" method="post"> |
---|
319 | <input type="hidden" name="start" value="{$START}"> |
---|
320 | |
---|
321 | <fieldset> |
---|
322 | <legend>{'Filter'|@translate}</legend> |
---|
323 | |
---|
324 | <ul id="filterList"> |
---|
325 | <li id="filter_prefilter" {if !isset($filter.prefilter)}style="display:none"{/if}> |
---|
326 | <a href="#" class="removeFilter" title="{'remove this filter'|@translate}"><span>[x]</span></a> |
---|
327 | <input type="checkbox" name="filter_prefilter_use" class="useFilterCheckbox" {if isset($filter.prefilter)}checked="checked"{/if}> |
---|
328 | {'Predefined filter'|@translate} |
---|
329 | <select name="filter_prefilter"> |
---|
330 | {foreach from=$prefilters item=prefilter} |
---|
331 | <option value="{$prefilter.ID}" {if isset($filter.prefilter) && $filter.prefilter eq $prefilter.ID}selected="selected"{/if}>{$prefilter.NAME}</option> |
---|
332 | {/foreach} |
---|
333 | </select> |
---|
334 | <a id="empty_caddie" href="admin.php?page=batch_manager&action=empty_caddie" style="{if !isset($filter.prefilter) or $filter.prefilter ne 'caddie'}display:none{/if}">{'Empty caddie'|translate}</a> |
---|
335 | |
---|
336 | <span id="duplicates_options" style="{if !isset($filter.prefilter) or $filter.prefilter ne 'duplicates'}display:none{/if}"> |
---|
337 | {'based on'|translate} |
---|
338 | <input type="checkbox" checked="checked" disabled="disabled"> {'file name'|translate} |
---|
339 | <label><input type="checkbox" name="filter_duplicates_date" {if isset($filter.duplicates_date) or (isset($filter.prefilter) and $filter.prefilter ne 'duplicates')}checked="checked"{/if}> {'date & time'|translate}</label> |
---|
340 | <label><input type="checkbox" name="filter_duplicates_dimensions" {if isset($filter.duplicates_dimensions)}checked="checked"{/if}> {'width & height'|translate}</label> |
---|
341 | </span> |
---|
342 | </li> |
---|
343 | |
---|
344 | <li id="filter_category" {if !isset($filter.category)}style="display:none"{/if}> |
---|
345 | <a href="#" class="removeFilter" title="remove this filter"><span>[x]</span></a> |
---|
346 | <input type="checkbox" name="filter_category_use" class="useFilterCheckbox" {if isset($filter.category)}checked="checked"{/if}> |
---|
347 | {'Album'|@translate} |
---|
348 | <select data-selectize="categories" data-value="{$filter_category_selected|@json_encode|escape:html}" |
---|
349 | data-default="first" name="filter_category" style="width:400px"></select> |
---|
350 | <label><input type="checkbox" name="filter_category_recursive" {if isset($filter.category_recursive)}checked="checked"{/if}> {'include child albums'|@translate}</label> |
---|
351 | </li> |
---|
352 | |
---|
353 | <li id="filter_tags" {if !isset($filter.tags)}style="display:none"{/if}> |
---|
354 | <a href="#" class="removeFilter" title="remove this filter"><span>[x]</span></a> |
---|
355 | <input type="checkbox" name="filter_tags_use" class="useFilterCheckbox" {if isset($filter.tags)}checked="checked"{/if}> |
---|
356 | {'Tags'|@translate} |
---|
357 | <select data-selectize="tags" data-value="{$filter_tags|@json_encode|escape:html}" |
---|
358 | placeholder="{'Type in a search term'|translate}" |
---|
359 | name="filter_tags[]" multiple style="width:400px;"></select> |
---|
360 | <label><span><input type="radio" name="tag_mode" value="AND" {if !isset($filter.tag_mode) or $filter.tag_mode eq 'AND'}checked="checked"{/if}> {'All tags'|@translate}</span></label> |
---|
361 | <label><span><input type="radio" name="tag_mode" value="OR" {if isset($filter.tag_mode) and $filter.tag_mode eq 'OR'}checked="checked"{/if}> {'Any tag'|@translate}</span></label> |
---|
362 | </li> |
---|
363 | |
---|
364 | <li id="filter_level" {if !isset($filter.level)}style="display:none"{/if}> |
---|
365 | <a href="#" class="removeFilter" title="remove this filter"><span>[x]</span></a> |
---|
366 | <input type="checkbox" name="filter_level_use" class="useFilterCheckbox" {if isset($filter.level)}checked="checked"{/if}> |
---|
367 | {'Privacy level'|@translate} |
---|
368 | <select name="filter_level" size="1"> |
---|
369 | {html_options options=$filter_level_options selected=$filter_level_options_selected} |
---|
370 | </select> |
---|
371 | <label><input type="checkbox" name="filter_level_include_lower" {if isset($filter.level_include_lower)}checked="checked"{/if}> {'include photos with lower privacy level'|@translate}</label> |
---|
372 | </li> |
---|
373 | |
---|
374 | <li id="filter_dimension" {if !isset($filter.dimension)}style="display:none"{/if}> |
---|
375 | <a href="#" class="removeFilter" title="remove this filter"><span>[x]</span></a> |
---|
376 | <input type="checkbox" name="filter_dimension_use" class="useFilterCheckbox" {if isset($filter.dimension)}checked="checked"{/if}> |
---|
377 | {'Dimensions'|translate} |
---|
378 | |
---|
379 | <blockquote> |
---|
380 | <div data-slider="widths"> |
---|
381 | {'Width'|translate} <span class="slider-info">{'between %d and %d pixels'|translate:$dimensions.selected.min_width:$dimensions.selected.max_width}</span> |
---|
382 | | <a class="slider-choice" data-min="{$dimensions.bounds.min_width}" data-max="{$dimensions.bounds.max_width}">{'Reset'|translate}</a> |
---|
383 | <div class="slider-slider"></div> |
---|
384 | |
---|
385 | <input type="hidden" data-input="min" name="filter_dimension_min_width" value="{$dimensions.selected.min_width}"> |
---|
386 | <input type="hidden" data-input="max" name="filter_dimension_max_width" value="{$dimensions.selected.max_width}"> |
---|
387 | </div> |
---|
388 | |
---|
389 | <div data-slider="heights"> |
---|
390 | {'Height'|translate} <span class="slider-info">{'between %d and %d pixels'|translate:$dimensions.selected.min_height:$dimensions.selected.max_height}</span> |
---|
391 | | <a class="slider-choice" data-min="{$dimensions.bounds.min_height}" data-max="{$dimensions.bounds.max_height}">{'Reset'|translate}</a> |
---|
392 | <div class="slider-slider"></div> |
---|
393 | |
---|
394 | <input type="hidden" data-input="min" name="filter_dimension_min_height" value="{$dimensions.selected.min_height}"> |
---|
395 | <input type="hidden" data-input="max" name="filter_dimension_max_height" value="{$dimensions.selected.max_height}"> |
---|
396 | </div> |
---|
397 | |
---|
398 | <div data-slider="ratios"> |
---|
399 | {'Ratio'|translate} ({'Width'|@translate}/{'Height'|@translate}) <span class="slider-info">{'between %.2f and %.2f'|translate:$dimensions.selected.min_ratio:$dimensions.selected.max_ratio}</span> |
---|
400 | {if isset($dimensions.ratio_portrait)}| <a class="slider-choice" data-min="{$dimensions.ratio_portrait.min}" data-max="{$dimensions.ratio_portrait.max}">{'Portrait'|translate}</a>{/if} |
---|
401 | {if isset($dimensions.ratio_square)}| <a class="slider-choice" data-min="{$dimensions.ratio_square.min}" data-max="{$dimensions.ratio_square.max}">{'square'|translate}</a>{/if} |
---|
402 | {if isset($dimensions.ratio_landscape)}| <a class="slider-choice" data-min="{$dimensions.ratio_landscape.min}" data-max="{$dimensions.ratio_landscape.max}">{'Landscape'|translate}</a>{/if} |
---|
403 | {if isset($dimensions.ratio_panorama)}| <a class="slider-choice" data-min="{$dimensions.ratio_panorama.min}" data-max="{$dimensions.ratio_panorama.max}">{'Panorama'|translate}</a>{/if} |
---|
404 | | <a class="slider-choice" data-min="{$dimensions.bounds.min_ratio}" data-max="{$dimensions.bounds.max_ratio}">{'Reset'|translate}</a> |
---|
405 | <div class="slider-slider"></div> |
---|
406 | |
---|
407 | <input type="hidden" data-input="min" name="filter_dimension_min_ratio" value="{$dimensions.selected.min_ratio}"> |
---|
408 | <input type="hidden" data-input="max" name="filter_dimension_max_ratio" value="{$dimensions.selected.max_ratio}"> |
---|
409 | </div> |
---|
410 | </blockquote> |
---|
411 | </li> |
---|
412 | |
---|
413 | <li id="filter_search"{if !isset($filter.search)} style="display:none"{/if}> |
---|
414 | <a href="#" class="removeFilter" title="remove this filter"><span>[x]</span></a> |
---|
415 | <input type="checkbox" name="filter_search_use" class="useFilterCheckbox"{if isset($filter.search)} checked="checked"{/if}> |
---|
416 | {'Search'|@translate} |
---|
417 | <input name="q" size=40 value="{$filter.search.q|stripslashes|htmlspecialchars}"> |
---|
418 | {combine_script id='core.scripts' load='async' path='themes/default/js/scripts.js'} |
---|
419 | <a href="admin/popuphelp.php?page=quick_search" onclick="popuphelp(this.href);return false;" title="{'Help'|@translate}"><span class="icon-help-circled"></span></a> |
---|
420 | </li> |
---|
421 | |
---|
422 | <li id="filter_filesize" {if !isset($filter.filesize)}style="display:none"{/if}> |
---|
423 | <a href="#" class="removeFilter" title="remove this filter"><span>[x]</span></a> |
---|
424 | <input type="checkbox" name="filter_filesize_use" class="useFilterCheckbox" {if isset($filter.filesize)}checked="checked"{/if}> |
---|
425 | {'Filesize'|translate} |
---|
426 | |
---|
427 | <blockquote> |
---|
428 | <div data-slider="filesizes"> |
---|
429 | <span class="slider-info">{'between %s and %s MB'|translate:$filesize.selected.min:$filesize.selected.max}</span> |
---|
430 | | <a class="slider-choice" data-min="{$filesize.bounds.min}" data-max="{$filesize.bounds.max}">{'Reset'|translate}</a> |
---|
431 | <div class="slider-slider"></div> |
---|
432 | |
---|
433 | <input type="hidden" data-input="min" name="filter_filesize_min" value="{$filesize.selected.min}"> |
---|
434 | <input type="hidden" data-input="max" name="filter_filesize_max" value="{$filesize.selected.max}"> |
---|
435 | </div> |
---|
436 | </blockquote> |
---|
437 | </li> |
---|
438 | </ul> |
---|
439 | |
---|
440 | <p class="actionButtons"> |
---|
441 | <select id="addFilter"> |
---|
442 | <option value="-1">{'Add a filter'|@translate}</option> |
---|
443 | <option disabled="disabled">------------------</option> |
---|
444 | <option value="filter_prefilter" {if isset($filter.prefilter)}disabled="disabled"{/if}>{'Predefined filter'|@translate}</option> |
---|
445 | <option value="filter_category" {if isset($filter.category)}disabled="disabled"{/if}>{'Album'|@translate}</option> |
---|
446 | <option value="filter_tags" {if isset($filter.tags)}disabled="disabled"{/if}>{'Tags'|@translate}</option> |
---|
447 | <option value="filter_level" {if isset($filter.level)}disabled="disabled"{/if}>{'Privacy level'|@translate}</option> |
---|
448 | <option value="filter_dimension" {if isset($filter.dimension)}disabled="disabled"{/if}>{'Dimensions'|@translate}</option> |
---|
449 | <option value="filter_filesize" {if isset($filter.filesize)}disabled="disabled"{/if}>{'Filesize'|@translate}</option> |
---|
450 | <option value="filter_search"{if isset($filter.search)} disabled="disabled"{/if}>{'Search'|@translate}</option> |
---|
451 | </select> |
---|
452 | <a id="removeFilters">{'Remove all filters'|@translate}</a> |
---|
453 | </p> |
---|
454 | |
---|
455 | <p class="actionButtons" id="applyFilterBlock"> |
---|
456 | <input id="applyFilter" class="submit" type="submit" value="{'Refresh photo set'|@translate}" name="submitFilter"> |
---|
457 | </p> |
---|
458 | |
---|
459 | </fieldset> |
---|
460 | |
---|
461 | <fieldset> |
---|
462 | |
---|
463 | <legend>{'Selection'|@translate}</legend> |
---|
464 | |
---|
465 | {if !empty($thumbnails)} |
---|
466 | <p id="checkActions"> |
---|
467 | {'Select:'|@translate} |
---|
468 | {if $nb_thumbs_set > $nb_thumbs_page} |
---|
469 | <a href="#" id="selectAll">{'The whole page'|@translate}</a>, |
---|
470 | <a href="#" id="selectSet">{'The whole set'|@translate}</a>, |
---|
471 | {else} |
---|
472 | <a href="#" id="selectAll">{'All'|@translate}</a>, |
---|
473 | {/if} |
---|
474 | <a href="#" id="selectNone">{'None'|@translate}</a>, |
---|
475 | <a href="#" id="selectInvert">{'Invert'|@translate}</a> |
---|
476 | |
---|
477 | <span id="selectedMessage"></span> |
---|
478 | |
---|
479 | <input type="checkbox" name="setSelected" style="display:none" {if count($selection) == $nb_thumbs_set}checked="checked"{/if}> |
---|
480 | </p> |
---|
481 | |
---|
482 | <ul class="thumbnails"> |
---|
483 | {html_style} |
---|
484 | UL.thumbnails SPAN.wrap2{ldelim} |
---|
485 | width: {$thumb_params->max_width()+2}px; |
---|
486 | } |
---|
487 | UL.thumbnails SPAN.wrap2 {ldelim} |
---|
488 | height: {$thumb_params->max_height()+25}px; |
---|
489 | } |
---|
490 | {/html_style} |
---|
491 | {foreach from=$thumbnails item=thumbnail} |
---|
492 | {assign var='isSelected' value=$thumbnail.id|@in_array:$selection} |
---|
493 | <li> |
---|
494 | <span class="wrap1"> |
---|
495 | <label> |
---|
496 | <input type="checkbox" name="selection[]" value="{$thumbnail.id}" {if $isSelected}checked="checked"{/if}> |
---|
497 | <span class="wrap2{if $isSelected} thumbSelected{/if}"> |
---|
498 | <div class="actions"><a href="{$thumbnail.FILE_SRC}" class="preview-box">{'Zoom'|@translate}</a> · <a href="{$thumbnail.U_EDIT}" target="_blank">{'Edit'|@translate}</a></div> |
---|
499 | {if $thumbnail.level > 0} |
---|
500 | <em class="levelIndicatorB">{'Level %d'|@sprintf:$thumbnail.level|@translate}</em> |
---|
501 | <em class="levelIndicatorF" title="{'Who can see these photos?'|@translate} : ">{'Level %d'|@sprintf:$thumbnail.level|@translate}</em> |
---|
502 | {/if} |
---|
503 | <img src="{$thumbnail.thumb->get_url()}" alt="{$thumbnail.file}" title="{$thumbnail.TITLE|@escape:'html'}" {$thumbnail.thumb->get_size_htm()}> |
---|
504 | </span> |
---|
505 | </label> |
---|
506 | </span> |
---|
507 | </li> |
---|
508 | {/foreach} |
---|
509 | </ul> |
---|
510 | |
---|
511 | {if !empty($navbar) } |
---|
512 | <div style="clear:both;"> |
---|
513 | |
---|
514 | <div style="float:left"> |
---|
515 | {include file='navigation_bar.tpl'|@get_extent:'navbar'} |
---|
516 | </div> |
---|
517 | |
---|
518 | <div style="float:right;margin-top:10px;">{'display'|@translate} |
---|
519 | <a href="{$U_DISPLAY}&display=20">20</a> |
---|
520 | · <a href="{$U_DISPLAY}&display=50">50</a> |
---|
521 | · <a href="{$U_DISPLAY}&display=100">100</a> |
---|
522 | · <a href="{$U_DISPLAY}&display=all">{'all'|@translate}</a> |
---|
523 | {'photos per page'|@translate} |
---|
524 | </div> |
---|
525 | </div> |
---|
526 | {/if} |
---|
527 | |
---|
528 | {else} |
---|
529 | <div>{'No photo in the current set.'|@translate}</div> |
---|
530 | {/if} |
---|
531 | </fieldset> |
---|
532 | |
---|
533 | <fieldset id="action"> |
---|
534 | |
---|
535 | <legend>{'Action'|@translate}</legend> |
---|
536 | <div id="forbidAction"{if count($selection) != 0} style="display:none"{/if}>{'No photo selected, no action possible.'|@translate}</div> |
---|
537 | <div id="permitAction"{if count($selection) == 0} style="display:none"{/if}> |
---|
538 | |
---|
539 | <select name="selectAction"> |
---|
540 | <option value="-1">{'Choose an action'|@translate}</option> |
---|
541 | <option disabled="disabled">------------------</option> |
---|
542 | <option value="delete" class="icon-trash">{'Delete selected photos'|@translate}</option> |
---|
543 | <option value="associate">{'Associate to album'|@translate}</option> |
---|
544 | <option value="move">{'Move to album'|@translate}</option> |
---|
545 | <option value="dissociate" class="albumDissociate" style="display:none">{'Dissociate from album'|@translate}</option> |
---|
546 | <option value="add_tags">{'Add tags'|@translate}</option> |
---|
547 | {if !empty($associated_tags)} |
---|
548 | <option value="del_tags">{'remove tags'|@translate}</option> |
---|
549 | {/if} |
---|
550 | <option value="author">{'Set author'|@translate}</option> |
---|
551 | <option value="title">{'Set title'|@translate}</option> |
---|
552 | <option value="date_creation">{'Set creation date'|@translate}</option> |
---|
553 | <option value="level" class="icon-lock">{'Who can see these photos?'|@translate}</option> |
---|
554 | <option value="metadata">{'Synchronize metadata'|@translate}</option> |
---|
555 | {if ($IN_CADDIE)} |
---|
556 | <option value="remove_from_caddie">{'Remove from caddie'|@translate}</option> |
---|
557 | {else} |
---|
558 | <option value="add_to_caddie">{'Add to caddie'|@translate}</option> |
---|
559 | {/if} |
---|
560 | <option value="delete_derivatives">{'Delete multiple size images'|@translate}</option> |
---|
561 | <option value="generate_derivatives">{'Generate multiple size images'|@translate}</option> |
---|
562 | {if !empty($element_set_global_plugins_actions)} |
---|
563 | {foreach from=$element_set_global_plugins_actions item=action} |
---|
564 | <option value="{$action.ID}">{$action.NAME}</option> |
---|
565 | {/foreach} |
---|
566 | {/if} |
---|
567 | </select> |
---|
568 | |
---|
569 | <!-- delete --> |
---|
570 | <div id="action_delete" class="bulkAction"> |
---|
571 | <p><label><input type="checkbox" name="confirm_deletion" value="1"> {'Are you sure?'|@translate}</label></p> |
---|
572 | </div> |
---|
573 | |
---|
574 | <!-- associate --> |
---|
575 | <div id="action_associate" class="bulkAction"> |
---|
576 | <select data-selectize="categories" data-default="first" name="associate" style="width:400px"></select> |
---|
577 | <br>{'... or '|@translate} |
---|
578 | <a href="#" data-add-album="associate" title="{'create a new album'|@translate}">{'create a new album'|@translate}</a> |
---|
579 | </div> |
---|
580 | |
---|
581 | <!-- move --> |
---|
582 | <div id="action_move" class="bulkAction"> |
---|
583 | <select data-selectize="categories" data-default="first" name="move" style="width:400px"></select> |
---|
584 | <br>{'... or '|@translate} |
---|
585 | <a href="#" data-add-album="move" title="{'create a new album'|@translate}">{'create a new album'|@translate}</a> |
---|
586 | </div> |
---|
587 | |
---|
588 | |
---|
589 | <!-- dissociate --> |
---|
590 | <div id="action_dissociate" class="bulkAction albumDissociate" style="display:none"> |
---|
591 | <select data-selectize="categories" placeholder="{'Type in a search term'|translate}" |
---|
592 | name="dissociate" style="width:400px"></select> |
---|
593 | </div> |
---|
594 | |
---|
595 | |
---|
596 | <!-- add_tags --> |
---|
597 | <div id="action_add_tags" class="bulkAction"> |
---|
598 | <select data-selectize="tags" data-create="true" placeholder="{'Type in a search term'|translate}" |
---|
599 | name="add_tags[]" multiple style="width:400px;"></select> |
---|
600 | </div> |
---|
601 | |
---|
602 | <!-- del_tags --> |
---|
603 | <div id="action_del_tags" class="bulkAction"> |
---|
604 | {if !empty($associated_tags)} |
---|
605 | <select data-selectize="tags" name="del_tags[]" multiple style="width:400px;" |
---|
606 | placeholder="{'Type in a search term'|translate}"> |
---|
607 | {foreach from=$associated_tags item=tag} |
---|
608 | <option value="{$tag.id}">{$tag.name}</option> |
---|
609 | {/foreach} |
---|
610 | </select> |
---|
611 | {/if} |
---|
612 | </div> |
---|
613 | |
---|
614 | <!-- author --> |
---|
615 | <div id="action_author" class="bulkAction"> |
---|
616 | <label><input type="checkbox" name="remove_author"> {'remove author'|@translate}</label><br> |
---|
617 | {assign var='authorDefaultValue' value='Type here the author name'|@translate} |
---|
618 | <input type="text" class="large" name="author" value="{$authorDefaultValue}" onfocus="this.value=(this.value=='{$authorDefaultValue|@escape:javascript}') ? '' : this.value;" onblur="this.value=(this.value=='') ? '{$authorDefaultValue|@escape:javascript}' : this.value;"> |
---|
619 | </div> |
---|
620 | |
---|
621 | <!-- title --> |
---|
622 | <div id="action_title" class="bulkAction"> |
---|
623 | <label><input type="checkbox" name="remove_title"> {'remove title'|@translate}</label><br> |
---|
624 | {assign var='titleDefaultValue' value='Type here the title'|@translate} |
---|
625 | <input type="text" class="large" name="title" value="{$titleDefaultValue}" onfocus="this.value=(this.value=='{$titleDefaultValue|@escape:javascript}') ? '' : this.value;" onblur="this.value=(this.value=='') ? '{$titleDefaultValue|@escape:javascript}' : this.value;"> |
---|
626 | </div> |
---|
627 | |
---|
628 | <!-- date_creation --> |
---|
629 | <div id="action_date_creation" class="bulkAction"> |
---|
630 | <label><input type="checkbox" name="remove_date_creation"> {'remove creation date'|@translate}</label><br> |
---|
631 | <div id="set_date_creation"> |
---|
632 | <input type="hidden" name="date_creation" value="{$DATE_CREATION}"> |
---|
633 | <label> |
---|
634 | <i class="icon-calendar"></i> |
---|
635 | <input type="text" data-datepicker="date_creation" readonly> |
---|
636 | </label> |
---|
637 | </div> |
---|
638 | </div> |
---|
639 | |
---|
640 | <!-- level --> |
---|
641 | <div id="action_level" class="bulkAction"> |
---|
642 | <select name="level" size="1"> |
---|
643 | {html_options options=$level_options selected=$level_options_selected} |
---|
644 | </select> |
---|
645 | </div> |
---|
646 | |
---|
647 | <!-- metadata --> |
---|
648 | <div id="action_metadata" class="bulkAction"> |
---|
649 | </div> |
---|
650 | |
---|
651 | <!-- generate derivatives --> |
---|
652 | <div id="action_generate_derivatives" class="bulkAction"> |
---|
653 | <a href="javascript:selectGenerateDerivAll()">{'All'|@translate}</a>, |
---|
654 | <a href="javascript:selectGenerateDerivNone()">{'None'|@translate}</a> |
---|
655 | <br> |
---|
656 | {foreach from=$generate_derivatives_types key=type item=disp} |
---|
657 | <label><input type="checkbox" name="generate_derivatives_type[]" value="{$type}"> {$disp}</label> |
---|
658 | {/foreach} |
---|
659 | </div> |
---|
660 | |
---|
661 | <!-- delete derivatives --> |
---|
662 | <div id="action_delete_derivatives" class="bulkAction"> |
---|
663 | <a href="javascript:selectDelDerivAll()">{'All'|@translate}</a>, |
---|
664 | <a href="javascript:selectDelDerivNone()">{'None'|@translate}</a> |
---|
665 | <br> |
---|
666 | {foreach from=$del_derivatives_types key=type item=disp} |
---|
667 | <label><input type="checkbox" name="del_derivatives_type[]" value="{$type}"> {$disp}</label> |
---|
668 | {/foreach} |
---|
669 | </div> |
---|
670 | |
---|
671 | <!-- progress bar --> |
---|
672 | <div id="regenerationMsg" class="bulkAction" style="display:none"> |
---|
673 | <p id="regenerationText" style="margin-bottom:10px;">{'Generate multiple size images'|@translate}</p> |
---|
674 | <span class="progressBar" id="progressBar"></span> |
---|
675 | <input type="hidden" name="regenerateSuccess" value="0"> |
---|
676 | <input type="hidden" name="regenerateError" value="0"> |
---|
677 | </div> |
---|
678 | |
---|
679 | <!-- plugins --> |
---|
680 | {if !empty($element_set_global_plugins_actions)} |
---|
681 | {foreach from=$element_set_global_plugins_actions item=action} |
---|
682 | <div id="action_{$action.ID}" class="bulkAction"> |
---|
683 | {if !empty($action.CONTENT)}{$action.CONTENT}{/if} |
---|
684 | </div> |
---|
685 | {/foreach} |
---|
686 | {/if} |
---|
687 | |
---|
688 | <p id="applyActionBlock" style="display:none" class="actionButtons"> |
---|
689 | <input id="applyAction" class="submit" type="submit" value="{'Apply action'|@translate}" name="submit"> <span id="applyOnDetails"></span></p> |
---|
690 | |
---|
691 | </div> <!-- #permitAction --> |
---|
692 | </fieldset> |
---|
693 | |
---|
694 | </form> |
---|
695 | |
---|
696 | </div> <!-- #batchManagerGlobal --> |
---|