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='footer' 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 | |
---|
10 | {combine_script id='LocalStorageCache' load='footer' path='admin/themes/default/js/LocalStorageCache.js'} |
---|
11 | |
---|
12 | {assign var="selectizeTheme" value=($themeconf.name=='roma')|ternary:'dark':'default'} |
---|
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.`$selectizeTheme`.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' 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 | {* /* dimensions sliders */ |
---|
268 | /** |
---|
269 | * find the key from a value in the startStopValues array |
---|
270 | */ *} |
---|
271 | function getSliderKeyFromValue(value, values) { |
---|
272 | for (var key in values) { |
---|
273 | if (values[key] == value) { |
---|
274 | return key; |
---|
275 | } |
---|
276 | } |
---|
277 | |
---|
278 | return 0; |
---|
279 | } |
---|
280 | |
---|
281 | var dimension_values = { |
---|
282 | width:[{$dimensions.widths}], |
---|
283 | height:[{$dimensions.heights}], |
---|
284 | ratio:[{$dimensions.ratios}] |
---|
285 | }; |
---|
286 | |
---|
287 | function onSliderChange(type, ui, pattern) { |
---|
288 | $("input[name='filter_dimension_min_"+type+"']").val(dimension_values[type][ui.values[0]]); |
---|
289 | $("input[name='filter_dimension_max_"+type+"']").val(dimension_values[type][ui.values[1]]); |
---|
290 | |
---|
291 | $("#filter_dimension_"+type+"_info").html(sprintf( |
---|
292 | pattern, |
---|
293 | dimension_values[type][ui.values[0]], |
---|
294 | dimension_values[type][ui.values[1]] |
---|
295 | )); |
---|
296 | } |
---|
297 | |
---|
298 | $("#filter_dimension_width_slider").slider({ |
---|
299 | range: true, |
---|
300 | min: 0, |
---|
301 | max: dimension_values['width'].length - 1, |
---|
302 | values: [ |
---|
303 | getSliderKeyFromValue({$dimensions.selected.min_width}, dimension_values['width']), |
---|
304 | getSliderKeyFromValue({$dimensions.selected.max_width}, dimension_values['width']) |
---|
305 | ], |
---|
306 | slide: function(event, ui) { |
---|
307 | onSliderChange('width', ui, "{'between %d and %d pixels'|translate|escape:'javascript'}"); |
---|
308 | }, |
---|
309 | change: function(event, ui) { |
---|
310 | onSliderChange('width', ui, "{'between %d and %d pixels'|translate|escape:'javascript'}"); |
---|
311 | } |
---|
312 | }); |
---|
313 | |
---|
314 | $("#filter_dimension_height_slider").slider({ |
---|
315 | range: true, |
---|
316 | min: 0, |
---|
317 | max: dimension_values['height'].length - 1, |
---|
318 | values: [ |
---|
319 | getSliderKeyFromValue({$dimensions.selected.min_height}, dimension_values['height']), |
---|
320 | getSliderKeyFromValue({$dimensions.selected.max_height}, dimension_values['height']) |
---|
321 | ], |
---|
322 | slide: function(event, ui) { |
---|
323 | onSliderChange('height', ui, "{'between %d and %d pixels'|translate|escape:'javascript'}"); |
---|
324 | }, |
---|
325 | change: function(event, ui) { |
---|
326 | onSliderChange('height', ui, "{'between %d and %d pixels'|translate|escape:'javascript'}"); |
---|
327 | } |
---|
328 | }); |
---|
329 | |
---|
330 | $("#filter_dimension_ratio_slider").slider({ |
---|
331 | range: true, |
---|
332 | min: 0, |
---|
333 | max: dimension_values['ratio'].length - 1, |
---|
334 | values: [ |
---|
335 | getSliderKeyFromValue({$dimensions.selected.min_ratio}, dimension_values['ratio']), |
---|
336 | getSliderKeyFromValue({$dimensions.selected.max_ratio}, dimension_values['ratio']) |
---|
337 | ], |
---|
338 | slide: function(event, ui) { |
---|
339 | onSliderChange('ratio', ui, "{'between %.2f and %.2f'|translate|escape:'javascript'}"); |
---|
340 | }, |
---|
341 | change: function(event, ui) { |
---|
342 | onSliderChange('ratio', ui, "{'between %.2f and %.2f'|translate|escape:'javascript'}"); |
---|
343 | } |
---|
344 | }); |
---|
345 | |
---|
346 | $("a.dimensions-choice").click(function() { |
---|
347 | var type = jQuery(this).data("type"); |
---|
348 | var min = jQuery(this).data("min"); |
---|
349 | var max = jQuery(this).data("max"); |
---|
350 | |
---|
351 | $("#filter_dimension_"+ type +"_slider") |
---|
352 | .slider("values", 0, getSliderKeyFromValue(min, dimension_values[type]) ) |
---|
353 | .slider("values", 1, getSliderKeyFromValue(max, dimension_values[type]) ); |
---|
354 | }); |
---|
355 | }); |
---|
356 | |
---|
357 | {/footer_script} |
---|
358 | |
---|
359 | <div id="batchManagerGlobal"> |
---|
360 | |
---|
361 | <h2>{'Batch Manager'|@translate}</h2> |
---|
362 | |
---|
363 | <form action="{$F_ACTION}" method="post"> |
---|
364 | <input type="hidden" name="start" value="{$START}"> |
---|
365 | |
---|
366 | <fieldset> |
---|
367 | <legend>{'Filter'|@translate}</legend> |
---|
368 | |
---|
369 | <ul id="filterList"> |
---|
370 | <li id="filter_prefilter" {if !isset($filter.prefilter)}style="display:none"{/if}> |
---|
371 | <a href="#" class="removeFilter" title="{'remove this filter'|@translate}"><span>[x]</span></a> |
---|
372 | <input type="checkbox" name="filter_prefilter_use" class="useFilterCheckbox" {if isset($filter.prefilter)}checked="checked"{/if}> |
---|
373 | {'Predefined filter'|@translate} |
---|
374 | <select name="filter_prefilter"> |
---|
375 | {foreach from=$prefilters item=prefilter} |
---|
376 | <option value="{$prefilter.ID}" {if isset($filter.prefilter) && $filter.prefilter eq $prefilter.ID}selected="selected"{/if}>{$prefilter.NAME}</option> |
---|
377 | {/foreach} |
---|
378 | </select> |
---|
379 | </li> |
---|
380 | |
---|
381 | <li id="filter_category" {if !isset($filter.category)}style="display:none"{/if}> |
---|
382 | <a href="#" class="removeFilter" title="remove this filter"><span>[x]</span></a> |
---|
383 | <input type="checkbox" name="filter_category_use" class="useFilterCheckbox" {if isset($filter.category)}checked="checked"{/if}> |
---|
384 | {'Album'|@translate} |
---|
385 | <select data-selectize="categories" data-value="{$filter_category_selected|@json_encode|escape:html}" |
---|
386 | data-default="first" name="filter_category" style="width:400px"></select> |
---|
387 | <label><input type="checkbox" name="filter_category_recursive" {if isset($filter.category_recursive)}checked="checked"{/if}> {'include child albums'|@translate}</label> |
---|
388 | </li> |
---|
389 | |
---|
390 | <li id="filter_tags" {if !isset($filter.tags)}style="display:none"{/if}> |
---|
391 | <a href="#" class="removeFilter" title="remove this filter"><span>[x]</span></a> |
---|
392 | <input type="checkbox" name="filter_tags_use" class="useFilterCheckbox" {if isset($filter.tags)}checked="checked"{/if}> |
---|
393 | {'Tags'|@translate} |
---|
394 | <select data-selectize="tags" data-value="{$filter_tags|@json_encode|escape:html}" |
---|
395 | placeholder="{'Type in a search term'|translate}" |
---|
396 | name="filter_tags[]" multiple style="width:400px;"></select> |
---|
397 | <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> |
---|
398 | <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> |
---|
399 | </li> |
---|
400 | |
---|
401 | <li id="filter_level" {if !isset($filter.level)}style="display:none"{/if}> |
---|
402 | <a href="#" class="removeFilter" title="remove this filter"><span>[x]</span></a> |
---|
403 | <input type="checkbox" name="filter_level_use" class="useFilterCheckbox" {if isset($filter.level)}checked="checked"{/if}> |
---|
404 | {'Privacy level'|@translate} |
---|
405 | <select name="filter_level" size="1"> |
---|
406 | {html_options options=$filter_level_options selected=$filter_level_options_selected} |
---|
407 | </select> |
---|
408 | <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> |
---|
409 | </li> |
---|
410 | |
---|
411 | <li id="filter_dimension" {if !isset($filter.dimension)}style="display:none"{/if}> |
---|
412 | <a href="#" class="removeFilter" title="remove this filter"><span>[x]</span></a> |
---|
413 | <input type="checkbox" name="filter_dimension_use" class="useFilterCheckbox" {if isset($filter.dimension)}checked="checked"{/if}> |
---|
414 | {'Dimensions'|@translate} |
---|
415 | |
---|
416 | <blockquote> |
---|
417 | {'Width'|@translate} <span id="filter_dimension_width_info">{'between %d and %d pixels'|@translate:$dimensions.selected.min_width:$dimensions.selected.max_width}</span> |
---|
418 | | <a class="dimensions-choice" data-type="width" data-min="{$dimensions.bounds.min_width}" data-max="{$dimensions.bounds.max_width}">{'Reset'|@translate}</a> |
---|
419 | <div id="filter_dimension_width_slider"></div> |
---|
420 | |
---|
421 | {'Height'|@translate} <span id="filter_dimension_height_info">{'between %d and %d pixels'|@translate:$dimensions.selected.min_height:$dimensions.selected.max_height}</span> |
---|
422 | | <a class="dimensions-choice" data-type="height" data-min="{$dimensions.bounds.min_height}" data-max="{$dimensions.bounds.max_height}">{'Reset'|@translate}</a> |
---|
423 | <div id="filter_dimension_height_slider"></div> |
---|
424 | |
---|
425 | {'Ratio'|@translate} ({'Width'|@translate}/{'Height'|@translate}) <span id="filter_dimension_ratio_info">{'between %.2f and %.2f'|@translate:$dimensions.selected.min_ratio:$dimensions.selected.max_ratio}</span> |
---|
426 | {if isset($dimensions.ratio_portrait)} |
---|
427 | | <a class="dimensions-choice" data-type="ratio" data-min="{$dimensions.ratio_portrait.min}" data-max="{$dimensions.ratio_portrait.max}">{'Portrait'|@translate}</a> |
---|
428 | {/if} |
---|
429 | {if isset($dimensions.ratio_square)} |
---|
430 | | <a class="dimensions-choice" data-type="ratio" data-min="{$dimensions.ratio_square.min}" data-max="{$dimensions.ratio_square.max}">{'square'|@translate}</a> |
---|
431 | {/if} |
---|
432 | {if isset($dimensions.ratio_landscape)} |
---|
433 | | <a class="dimensions-choice" data-type="ratio" data-min="{$dimensions.ratio_landscape.min}" data-max="{$dimensions.ratio_landscape.max}">{'Landscape'|@translate}</a> |
---|
434 | {/if} |
---|
435 | {if isset($dimensions.ratio_panorama)} |
---|
436 | | <a class="dimensions-choice" data-type="ratio" data-min="{$dimensions.ratio_panorama.min}" data-max="{$dimensions.ratio_panorama.max}">{'Panorama'|@translate}</a> |
---|
437 | {/if} |
---|
438 | | <a class="dimensions-choice" data-type="ratio" data-min="{$dimensions.bounds.min_ratio}" data-max="{$dimensions.bounds.max_ratio}">{'Reset'|@translate}</a> |
---|
439 | <div id="filter_dimension_ratio_slider"></div> |
---|
440 | </blockquote> |
---|
441 | |
---|
442 | <input type="hidden" name="filter_dimension_min_width" value="{$dimensions.selected.min_width}"> |
---|
443 | <input type="hidden" name="filter_dimension_max_width" value="{$dimensions.selected.max_width}"> |
---|
444 | <input type="hidden" name="filter_dimension_min_height" value="{$dimensions.selected.min_height}"> |
---|
445 | <input type="hidden" name="filter_dimension_max_height" value="{$dimensions.selected.max_height}"> |
---|
446 | <input type="hidden" name="filter_dimension_min_ratio" value="{$dimensions.selected.min_ratio}"> |
---|
447 | <input type="hidden" name="filter_dimension_max_ratio" value="{$dimensions.selected.max_ratio}"> |
---|
448 | </li> |
---|
449 | |
---|
450 | <li id="filter_search"{if !isset($filter.search)} style="display:none"{/if}> |
---|
451 | <a href="#" class="removeFilter" title="remove this filter"><span>[x]</span></a> |
---|
452 | <input type="checkbox" name="filter_search_use" class="useFilterCheckbox"{if isset($filter.search)} checked="checked"{/if}> |
---|
453 | {'Search'|@translate} |
---|
454 | <input name="q" size=40 value="{$filter.search.q|stripslashes|htmlspecialchars}"> |
---|
455 | {combine_script id='core.scripts' load='async' path='themes/default/js/scripts.js'} |
---|
456 | <a href="admin/popuphelp.php?page=quick_search" onclick="popuphelp(this.href);return false;" title="{'Help'|@translate}"><span class="icon-help-circled"></span></a> |
---|
457 | </li> |
---|
458 | </ul> |
---|
459 | |
---|
460 | <p class="actionButtons"> |
---|
461 | <select id="addFilter"> |
---|
462 | <option value="-1">{'Add a filter'|@translate}</option> |
---|
463 | <option disabled="disabled">------------------</option> |
---|
464 | <option value="filter_prefilter" {if isset($filter.prefilter)}disabled="disabled"{/if}>{'Predefined filter'|@translate}</option> |
---|
465 | <option value="filter_category" {if isset($filter.category)}disabled="disabled"{/if}>{'Album'|@translate}</option> |
---|
466 | <option value="filter_tags" {if isset($filter.tags)}disabled="disabled"{/if}>{'Tags'|@translate}</option> |
---|
467 | <option value="filter_level" {if isset($filter.level)}disabled="disabled"{/if}>{'Privacy level'|@translate}</option> |
---|
468 | <option value="filter_dimension" {if isset($filter.dimension)}disabled="disabled"{/if}>{'Dimensions'|@translate}</option> |
---|
469 | <option value="filter_search"{if isset($filter.search)} disabled="disabled"{/if}>{'Search'|@translate}</option> |
---|
470 | </select> |
---|
471 | <a id="removeFilters">{'Remove all filters'|@translate}</a> |
---|
472 | </p> |
---|
473 | |
---|
474 | <p class="actionButtons" id="applyFilterBlock"> |
---|
475 | <input id="applyFilter" class="submit" type="submit" value="{'Refresh photo set'|@translate}" name="submitFilter"> |
---|
476 | </p> |
---|
477 | |
---|
478 | </fieldset> |
---|
479 | |
---|
480 | <fieldset> |
---|
481 | |
---|
482 | <legend>{'Selection'|@translate}</legend> |
---|
483 | |
---|
484 | {if !empty($thumbnails)} |
---|
485 | <p id="checkActions"> |
---|
486 | {'Select:'|@translate} |
---|
487 | {if $nb_thumbs_set > $nb_thumbs_page} |
---|
488 | <a href="#" id="selectAll">{'The whole page'|@translate}</a>, |
---|
489 | <a href="#" id="selectSet">{'The whole set'|@translate}</a>, |
---|
490 | {else} |
---|
491 | <a href="#" id="selectAll">{'All'|@translate}</a>, |
---|
492 | {/if} |
---|
493 | <a href="#" id="selectNone">{'None'|@translate}</a>, |
---|
494 | <a href="#" id="selectInvert">{'Invert'|@translate}</a> |
---|
495 | |
---|
496 | <span id="selectedMessage"></span> |
---|
497 | |
---|
498 | <input type="checkbox" name="setSelected" style="display:none" {if count($selection) == $nb_thumbs_set}checked="checked"{/if}> |
---|
499 | </p> |
---|
500 | |
---|
501 | <ul class="thumbnails"> |
---|
502 | {html_style} |
---|
503 | UL.thumbnails SPAN.wrap2{ldelim} |
---|
504 | width: {$thumb_params->max_width()+2}px; |
---|
505 | } |
---|
506 | UL.thumbnails SPAN.wrap2 {ldelim} |
---|
507 | height: {$thumb_params->max_height()+25}px; |
---|
508 | } |
---|
509 | {/html_style} |
---|
510 | {foreach from=$thumbnails item=thumbnail} |
---|
511 | {assign var='isSelected' value=$thumbnail.id|@in_array:$selection} |
---|
512 | <li> |
---|
513 | <span class="wrap1"> |
---|
514 | <label> |
---|
515 | <input type="checkbox" name="selection[]" value="{$thumbnail.id}" {if $isSelected}checked="checked"{/if}> |
---|
516 | <span class="wrap2{if $isSelected} thumbSelected{/if}"> |
---|
517 | <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> |
---|
518 | {if $thumbnail.level > 0} |
---|
519 | <em class="levelIndicatorB">{'Level %d'|@sprintf:$thumbnail.level|@translate}</em> |
---|
520 | <em class="levelIndicatorF" title="{'Who can see these photos?'|@translate} : ">{'Level %d'|@sprintf:$thumbnail.level|@translate}</em> |
---|
521 | {/if} |
---|
522 | <img src="{$thumbnail.thumb->get_url()}" alt="{$thumbnail.file}" title="{$thumbnail.TITLE|@escape:'html'}" {$thumbnail.thumb->get_size_htm()}> |
---|
523 | </span> |
---|
524 | </label> |
---|
525 | </span> |
---|
526 | </li> |
---|
527 | {/foreach} |
---|
528 | </ul> |
---|
529 | |
---|
530 | {if !empty($navbar) } |
---|
531 | <div style="clear:both;"> |
---|
532 | |
---|
533 | <div style="float:left"> |
---|
534 | {include file='navigation_bar.tpl'|@get_extent:'navbar'} |
---|
535 | </div> |
---|
536 | |
---|
537 | <div style="float:right;margin-top:10px;">{'display'|@translate} |
---|
538 | <a href="{$U_DISPLAY}&display=20">20</a> |
---|
539 | · <a href="{$U_DISPLAY}&display=50">50</a> |
---|
540 | · <a href="{$U_DISPLAY}&display=100">100</a> |
---|
541 | · <a href="{$U_DISPLAY}&display=all">{'all'|@translate}</a> |
---|
542 | {'photos per page'|@translate} |
---|
543 | </div> |
---|
544 | </div> |
---|
545 | {/if} |
---|
546 | |
---|
547 | {else} |
---|
548 | <div>{'No photo in the current set.'|@translate}</div> |
---|
549 | {/if} |
---|
550 | </fieldset> |
---|
551 | |
---|
552 | <fieldset id="action"> |
---|
553 | |
---|
554 | <legend>{'Action'|@translate}</legend> |
---|
555 | <div id="forbidAction"{if count($selection) != 0} style="display:none"{/if}>{'No photo selected, no action possible.'|@translate}</div> |
---|
556 | <div id="permitAction"{if count($selection) == 0} style="display:none"{/if}> |
---|
557 | |
---|
558 | <select name="selectAction"> |
---|
559 | <option value="-1">{'Choose an action'|@translate}</option> |
---|
560 | <option disabled="disabled">------------------</option> |
---|
561 | <option value="delete" class="icon-trash">{'Delete selected photos'|@translate}</option> |
---|
562 | <option value="associate">{'Associate to album'|@translate}</option> |
---|
563 | <option value="move">{'Move to album'|@translate}</option> |
---|
564 | <option value="dissociate" class="albumDissociate" style="display:none">{'Dissociate from album'|@translate}</option> |
---|
565 | <option value="add_tags">{'Add tags'|@translate}</option> |
---|
566 | {if !empty($associated_tags)} |
---|
567 | <option value="del_tags">{'remove tags'|@translate}</option> |
---|
568 | {/if} |
---|
569 | <option value="author">{'Set author'|@translate}</option> |
---|
570 | <option value="title">{'Set title'|@translate}</option> |
---|
571 | <option value="date_creation">{'Set creation date'|@translate}</option> |
---|
572 | <option value="level" class="icon-lock">{'Who can see these photos?'|@translate}</option> |
---|
573 | <option value="metadata">{'Synchronize metadata'|@translate}</option> |
---|
574 | {if ($IN_CADDIE)} |
---|
575 | <option value="remove_from_caddie">{'Remove from caddie'|@translate}</option> |
---|
576 | {else} |
---|
577 | <option value="add_to_caddie">{'Add to caddie'|@translate}</option> |
---|
578 | {/if} |
---|
579 | <option value="delete_derivatives">{'Delete multiple size images'|@translate}</option> |
---|
580 | <option value="generate_derivatives">{'Generate multiple size images'|@translate}</option> |
---|
581 | {if !empty($element_set_global_plugins_actions)} |
---|
582 | {foreach from=$element_set_global_plugins_actions item=action} |
---|
583 | <option value="{$action.ID}">{$action.NAME}</option> |
---|
584 | {/foreach} |
---|
585 | {/if} |
---|
586 | </select> |
---|
587 | |
---|
588 | <!-- delete --> |
---|
589 | <div id="action_delete" class="bulkAction"> |
---|
590 | <p><label><input type="checkbox" name="confirm_deletion" value="1"> {'Are you sure?'|@translate}</label></p> |
---|
591 | </div> |
---|
592 | |
---|
593 | <!-- associate --> |
---|
594 | <div id="action_associate" class="bulkAction"> |
---|
595 | <select data-selectize="categories" data-default="first" name="associate" style="width:400px"></select> |
---|
596 | <br>{'... or '|@translate} |
---|
597 | <a href="#" data-add-album="associate" title="{'create a new album'|@translate}">{'create a new album'|@translate}</a> |
---|
598 | </div> |
---|
599 | |
---|
600 | <!-- move --> |
---|
601 | <div id="action_move" class="bulkAction"> |
---|
602 | <select data-selectize="categories" data-default="first" name="move" style="width:400px"></select> |
---|
603 | <br>{'... or '|@translate} |
---|
604 | <a href="#" data-add-album="move" title="{'create a new album'|@translate}">{'create a new album'|@translate}</a> |
---|
605 | </div> |
---|
606 | |
---|
607 | |
---|
608 | <!-- dissociate --> |
---|
609 | <div id="action_dissociate" class="bulkAction albumDissociate" style="display:none"> |
---|
610 | <select data-selectize="categories" placeholder="{'Type in a search term'|translate}" |
---|
611 | name="dissociate" style="width:400px"></select> |
---|
612 | </div> |
---|
613 | |
---|
614 | |
---|
615 | <!-- add_tags --> |
---|
616 | <div id="action_add_tags" class="bulkAction"> |
---|
617 | <select data-selectize="tags" data-create="true" placeholder="{'Type in a search term'|translate}" |
---|
618 | name="add_tags[]" multiple style="width:400px;"></select> |
---|
619 | </div> |
---|
620 | |
---|
621 | <!-- del_tags --> |
---|
622 | <div id="action_del_tags" class="bulkAction"> |
---|
623 | {if !empty($associated_tags)} |
---|
624 | <select data-selectize="tags" name="del_tags[]" multiple style="width:400px;" |
---|
625 | placeholder="{'Type in a search term'|translate}"> |
---|
626 | {foreach from=$associated_tags item=tag} |
---|
627 | <option value="{$tag.id}">{$tag.name}</option> |
---|
628 | {/foreach} |
---|
629 | </select> |
---|
630 | {/if} |
---|
631 | </div> |
---|
632 | |
---|
633 | <!-- author --> |
---|
634 | <div id="action_author" class="bulkAction"> |
---|
635 | <label><input type="checkbox" name="remove_author"> {'remove author'|@translate}</label><br> |
---|
636 | {assign var='authorDefaultValue' value='Type here the author name'|@translate} |
---|
637 | <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;"> |
---|
638 | </div> |
---|
639 | |
---|
640 | <!-- title --> |
---|
641 | <div id="action_title" class="bulkAction"> |
---|
642 | <label><input type="checkbox" name="remove_title"> {'remove title'|@translate}</label><br> |
---|
643 | {assign var='titleDefaultValue' value='Type here the title'|@translate} |
---|
644 | <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;"> |
---|
645 | </div> |
---|
646 | |
---|
647 | <!-- date_creation --> |
---|
648 | <div id="action_date_creation" class="bulkAction"> |
---|
649 | <label><input type="checkbox" name="remove_date_creation"> {'remove creation date'|@translate}</label><br> |
---|
650 | <div id="set_date_creation"> |
---|
651 | <input type="hidden" name="date_creation" value="{$DATE_CREATION}"> |
---|
652 | <label> |
---|
653 | <i class="icon-calendar"></i> |
---|
654 | <input type="text" data-datepicker="date_creation" readonly> |
---|
655 | </label> |
---|
656 | </div> |
---|
657 | </div> |
---|
658 | |
---|
659 | <!-- level --> |
---|
660 | <div id="action_level" class="bulkAction"> |
---|
661 | <select name="level" size="1"> |
---|
662 | {html_options options=$level_options selected=$level_options_selected} |
---|
663 | </select> |
---|
664 | </div> |
---|
665 | |
---|
666 | <!-- metadata --> |
---|
667 | <div id="action_metadata" class="bulkAction"> |
---|
668 | </div> |
---|
669 | |
---|
670 | <!-- generate derivatives --> |
---|
671 | <div id="action_generate_derivatives" class="bulkAction"> |
---|
672 | <a href="javascript:selectGenerateDerivAll()">{'All'|@translate}</a>, |
---|
673 | <a href="javascript:selectGenerateDerivNone()">{'None'|@translate}</a> |
---|
674 | <br> |
---|
675 | {foreach from=$generate_derivatives_types key=type item=disp} |
---|
676 | <label><input type="checkbox" name="generate_derivatives_type[]" value="{$type}"> {$disp}</label> |
---|
677 | {/foreach} |
---|
678 | </div> |
---|
679 | |
---|
680 | <!-- delete derivatives --> |
---|
681 | <div id="action_delete_derivatives" class="bulkAction"> |
---|
682 | <a href="javascript:selectDelDerivAll()">{'All'|@translate}</a>, |
---|
683 | <a href="javascript:selectDelDerivNone()">{'None'|@translate}</a> |
---|
684 | <br> |
---|
685 | {foreach from=$del_derivatives_types key=type item=disp} |
---|
686 | <label><input type="checkbox" name="del_derivatives_type[]" value="{$type}"> {$disp}</label> |
---|
687 | {/foreach} |
---|
688 | </div> |
---|
689 | |
---|
690 | <!-- progress bar --> |
---|
691 | <div id="regenerationMsg" class="bulkAction" style="display:none"> |
---|
692 | <p id="regenerationText" style="margin-bottom:10px;">{'Generate multiple size images'|@translate}</p> |
---|
693 | <span class="progressBar" id="progressBar"></span> |
---|
694 | <input type="hidden" name="regenerateSuccess" value="0"> |
---|
695 | <input type="hidden" name="regenerateError" value="0"> |
---|
696 | </div> |
---|
697 | |
---|
698 | <!-- plugins --> |
---|
699 | {if !empty($element_set_global_plugins_actions)} |
---|
700 | {foreach from=$element_set_global_plugins_actions item=action} |
---|
701 | <div id="action_{$action.ID}" class="bulkAction"> |
---|
702 | {if !empty($action.CONTENT)}{$action.CONTENT}{/if} |
---|
703 | </div> |
---|
704 | {/foreach} |
---|
705 | {/if} |
---|
706 | |
---|
707 | <p id="applyActionBlock" style="display:none" class="actionButtons"> |
---|
708 | <input id="applyAction" class="submit" type="submit" value="{'Apply action'|@translate}" name="submit"> <span id="applyOnDetails"></span></p> |
---|
709 | |
---|
710 | </div> <!-- #permitAction --> |
---|
711 | </fieldset> |
---|
712 | |
---|
713 | </form> |
---|
714 | |
---|
715 | </div> <!-- #batchManagerGlobal --> |
---|