source: trunk/admin/themes/default/template/batch_manager_global.tpl @ 10686

Last change on this file since 10686 was 10686, checked in by patdenice, 13 years ago

feature:2259
Create two different methods in webservice to create/regenerate thumbnail and to regenerate websize.

File size: 26.8 KB
Line 
1{include file='include/tag_selection.inc.tpl'}
2{include file='include/datepicker.inc.tpl'}
3
4{footer_script}{literal}
5  pwg_initialization_datepicker("#date_creation_day", "#date_creation_month", "#date_creation_year", "#date_creation_linked_date", "#date_creation_action_set");
6{/literal}{/footer_script}
7
8{combine_script id='jquery.fcbkcomplete' load='footer' require='jquery' path='themes/default/js/plugins/jquery.fcbkcomplete.js'}
9{combine_script id='jquery.progressBar' load='footer' path='themes/default/js/plugins/jquery.progressbar.min.js'}
10{combine_script id='jquery.ajaxmanager' load='footer' path='themes/default/js/plugins/jquery.ajaxmanager.js'}
11
12{footer_script require='jquery.fcbkcomplete'}{literal}
13jQuery(document).ready(function() {
14  jQuery("#tags").fcbkcomplete({
15    json_url: "admin.php?fckb_tags=1",
16    cache: false,
17    filter_case: false,
18    filter_hide: true,
19    firstselected: true,
20    filter_selected: true,
21    maxitems: 100,
22    newel: true
23  });
24});
25{/literal}{/footer_script}
26
27{footer_script}
28var nb_thumbs_page = {$nb_thumbs_page};
29var nb_thumbs_set = {$nb_thumbs_set};
30var applyOnDetails_pattern = "{'on the %d selected photos'|@translate}";
31var elements = new Array();
32var all_elements = [{if !empty($all_elements)}{','|@implode:$all_elements}{/if}];
33
34var selectedMessage_pattern = "{'%d of %d photos selected'|@translate}";
35var selectedMessage_none = "{'No photo selected, %d photos in current set'|@translate}";
36var selectedMessage_all = "{'All %d photos are selected'|@translate}";
37var regenerateThumbnailsMessage = "{'Thumbnails generation in progress...'|@translate}";
38var regenerateWebsizeMessage = "{'Photos generation in progress...'|@translate}";
39
40var width_str = '{'Width'|@translate}';
41var height_str = '{'Height'|@translate}';
42var max_width_str = '{'Maximum Width'|@translate}';
43var max_height_str = '{'Maximum Height'|@translate}';
44{literal}
45function str_repeat(i, m) {
46        for (var o = []; m > 0; o[--m] = i);
47        return o.join('');
48}
49
50function sprintf() {
51        var i = 0, a, f = arguments[i++], o = [], m, p, c, x, s = '';
52        while (f) {
53                if (m = /^[^\x25]+/.exec(f)) {
54                        o.push(m[0]);
55                }
56                else if (m = /^\x25{2}/.exec(f)) {
57                        o.push('%');
58                }
59                else if (m = /^\x25(?:(\d+)\$)?(\+)?(0|'[^$])?(-)?(\d+)?(?:\.(\d+))?([b-fosuxX])/.exec(f)) {
60                        if (((a = arguments[m[1] || i++]) == null) || (a == undefined)) {
61                                throw('Too few arguments.');
62                        }
63                        if (/[^s]/.test(m[7]) && (typeof(a) != 'number')) {
64                                throw('Expecting number but found ' + typeof(a));
65                        }
66                        switch (m[7]) {
67                                case 'b': a = a.toString(2); break;
68                                case 'c': a = String.fromCharCode(a); break;
69                                case 'd': a = parseInt(a); break;
70                                case 'e': a = m[6] ? a.toExponential(m[6]) : a.toExponential(); break;
71                                case 'f': a = m[6] ? parseFloat(a).toFixed(m[6]) : parseFloat(a); break;
72                                case 'o': a = a.toString(8); break;
73                                case 's': a = ((a = String(a)) && m[6] ? a.substring(0, m[6]) : a); break;
74                                case 'u': a = Math.abs(a); break;
75                                case 'x': a = a.toString(16); break;
76                                case 'X': a = a.toString(16).toUpperCase(); break;
77                        }
78                        a = (/[def]/.test(m[7]) && m[2] && a >= 0 ? '+'+ a : a);
79                        c = m[3] ? m[3] == '0' ? '0' : m[3].charAt(1) : ' ';
80                        x = m[5] - String(a).length - s.length;
81                        p = m[5] ? str_repeat(c, x) : '';
82                        o.push(s + (m[4] ? a + p : p + a));
83                }
84                else {
85                        throw('Huh ?!');
86                }
87                f = f.substring(m[0].length);
88        }
89        return o.join('');
90}
91
92function progress(val, max, success) {
93  jQuery('#progressBar').progressBar(val, {
94    max: max,
95    textFormat: 'fraction',
96    boxImage: 'themes/default/images/progressbar.gif',
97    barImage: 'themes/default/images/progressbg_orange.gif'
98  });
99  type = success ? 'regenerateSuccess': 'regenerateError'
100  s = jQuery('[name="'+type+'"]').val();
101  jQuery('[name="'+type+'"]').val(++s);
102
103  if (val == max)
104    jQuery('#applyAction').click();
105}
106
107$(document).ready(function() {
108  function checkPermitAction() {
109    var nbSelected = 0;
110    if ($("input[name=setSelected]").is(':checked')) {
111      nbSelected = nb_thumbs_set;
112    }
113    else {
114      $(".thumbnails input[type=checkbox]").each(function() {
115         if ($(this).is(':checked')) {
116           nbSelected++;
117         }
118      });
119    }
120
121    if (nbSelected == 0) {
122      $("#permitAction").hide();
123      $("#forbidAction").show();
124    }
125    else {
126      $("#permitAction").show();
127      $("#forbidAction").hide();
128    }
129
130    $("#applyOnDetails").text(
131      sprintf(
132        applyOnDetails_pattern,
133        nbSelected
134      )
135    );
136
137    // display the number of currently selected photos in the "Selection" fieldset
138    if (nbSelected == 0) {
139      $("#selectedMessage").text(
140        sprintf(
141          selectedMessage_none,
142          nb_thumbs_set
143        )
144      );
145    }
146    else if (nbSelected == nb_thumbs_set) {
147      $("#selectedMessage").text(
148        sprintf(
149          selectedMessage_all,
150          nb_thumbs_set
151        )
152      );
153    }
154    else {
155      $("#selectedMessage").text(
156        sprintf(
157          selectedMessage_pattern,
158          nbSelected,
159          nb_thumbs_set
160        )
161      );
162    }
163  }
164
165  $('img.thumbnail').tipTip({
166    'delay' : 0,
167    'fadeIn' : 200,
168    'fadeOut' : 200
169  });
170
171  $("[id^=action_]").hide();
172
173  $("select[name=selectAction]").change(function () {
174    $("[id^=action_]").hide();
175    $("#action_"+$(this).attr("value")).show();
176
177    if ($(this).val() != -1) {
178      $("#applyActionBlock").show();
179    }
180    else {
181      $("#applyActionBlock").hide();
182    }
183  });
184
185  $(".wrap1 label").click(function () {
186    $("input[name=setSelected]").attr('checked', false);
187
188    var wrap2 = $(this).children(".wrap2");
189    var checkbox = $(this).children("input[type=checkbox]");
190
191    if ($(checkbox).is(':checked')) {
192      $(wrap2).addClass("thumbSelected");
193    }
194    else {
195      $(wrap2).removeClass('thumbSelected');
196    }
197
198    checkPermitAction();
199  });
200
201  $("#selectAll").click(function () {
202    $("input[name=setSelected]").attr('checked', false);
203    selectPageThumbnails();
204    checkPermitAction();
205    return false;
206  });
207
208  function selectPageThumbnails() {
209    $(".thumbnails label").each(function() {
210      var wrap2 = $(this).children(".wrap2");
211      var checkbox = $(this).children("input[type=checkbox]");
212
213      $(checkbox).attr('checked', true);
214      $(wrap2).addClass("thumbSelected");
215    });
216  }
217
218  $("#selectNone").click(function () {
219    $("input[name=setSelected]").attr('checked', false);
220
221    $(".thumbnails label").each(function() {
222      var wrap2 = $(this).children(".wrap2");
223      var checkbox = $(this).children("input[type=checkbox]");
224
225      $(checkbox).attr('checked', false);
226      $(wrap2).removeClass("thumbSelected");
227    });
228    checkPermitAction();
229    return false;
230  });
231
232  $("#selectInvert").click(function () {
233    $("input[name=setSelected]").attr('checked', false);
234
235    $(".thumbnails label").each(function() {
236      var wrap2 = $(this).children(".wrap2");
237      var checkbox = $(this).children("input[type=checkbox]");
238
239      $(checkbox).attr('checked', !$(checkbox).is(':checked'));
240
241      if ($(checkbox).is(':checked')) {
242        $(wrap2).addClass("thumbSelected");
243      }
244      else {
245        $(wrap2).removeClass('thumbSelected');
246      }
247    });
248    checkPermitAction();
249    return false;
250  });
251
252  $("#selectSet").click(function () {
253    selectPageThumbnails();
254    $("input[name=setSelected]").attr('checked', true);
255    checkPermitAction();
256    return false;
257  });
258
259  $("input[name=remove_author]").click(function () {
260    if ($(this).is(':checked')) {
261      $("input[name=author]").hide();
262    }
263    else {
264      $("input[name=author]").show();
265    }
266  });
267
268  $("input[name=remove_title]").click(function () {
269    if ($(this).is(':checked')) {
270      $("input[name=title]").hide();
271    }
272    else {
273      $("input[name=title]").show();
274    }
275  });
276
277  $("input[name=remove_date_creation]").click(function () {
278    if ($(this).is(':checked')) {
279      $("#set_date_creation").hide();
280    }
281    else {
282      $("#set_date_creation").show();
283    }
284  });
285
286  $(".removeFilter").click(function () {
287    var filter = $(this).parent('li').attr("id");
288    filter_disable(filter);
289
290    return false;
291  });
292
293  function filter_enable(filter) {
294    /* show the filter*/
295    $("#"+filter).show();
296
297    /* check the checkbox to declare we use this filter */
298    $("input[type=checkbox][name="+filter+"_use]").attr("checked", true);
299
300    /* forbid to select this filter in the addFilter list */
301    $("#addFilter").children("option[value="+filter+"]").attr("disabled", "disabled");
302  }
303
304  $("#addFilter").change(function () {
305    var filter = $(this).attr("value");
306    filter_enable(filter);
307    $(this).attr("value", -1);
308  });
309
310  function filter_disable(filter) {
311    /* hide the filter line */
312    $("#"+filter).hide();
313
314    /* uncheck the checkbox to declare we do not use this filter */
315    $("input[name="+filter+"_use]").removeAttr("checked");
316
317    /* give the possibility to show it again */
318    $("#addFilter").children("option[value="+filter+"]").removeAttr("disabled");
319  }
320
321  $("#removeFilters").click(function() {
322    $("#filterList li").each(function() {
323      var filter = $(this).attr("id");
324      filter_disable(filter);
325    });
326    return false;
327  });
328
329  jQuery('#applyAction').click(function() {
330    if (elements.length != 0)
331    {
332      return true;
333    }
334    else if (jQuery('[name="selectAction"]').val() == 'regenerateThumbnails')
335    {
336      resizeMethod = 'pwg.images.resizeThumbnail';
337      maxRequests = 3;
338      maxwidth = jQuery('input[name="thumb_maxwidth"]').val();
339      maxheight = jQuery('input[name="thumb_maxheight"]').val();
340      regenerationText = regenerateThumbnailsMessage;
341      crop = jQuery('input[name="thumb_crop"]').is(':checked');
342      follow_orientation = jQuery('input[name="thumb_follow_orientation"]').is(':checked');
343    }
344    else if(jQuery('[name="selectAction"]').val() == 'regenerateWebsize')
345    {
346      resizeMethod = 'pwg.images.resizeWebsize';
347      maxRequests = 1;
348      maxwidth = jQuery('input[name="websize_maxwidth"]').val();
349      maxheight = jQuery('input[name="websize_maxheight"]').val();
350      regenerationText = regenerateWebsizeMessage;
351      crop = false;
352      follow_orientation = false;
353    }
354    else return true;
355
356    jQuery('.bulkAction').hide();
357    jQuery('#regenerationText').html(regenerationText);
358
359    var queuedManager = jQuery.manageAjax.create('queued', {
360      queue: true, 
361      cacheResponse: false,
362      maxRequests: maxRequests
363    });
364
365    if (jQuery('input[name="setSelected"]').attr('checked'))
366      elements = all_elements;
367    else
368      jQuery('input[name="selection[]"]').each(function() {
369        if (jQuery(this).attr('checked')) {
370          elements.push(jQuery(this).val());
371        }
372      });
373
374    progressBar_max = elements.length;
375    todo = 0;
376
377    jQuery('#applyActionBlock').hide();
378    jQuery('select[name="selectAction"]').hide();
379    jQuery('#regenerationMsg').show();
380   
381    jQuery('#progressBar').progressBar(0, {
382      max: progressBar_max,
383      textFormat: 'fraction',
384      boxImage: 'themes/default/images/progressbar.gif',
385      barImage: 'themes/default/images/progressbg_orange.gif'
386    });
387
388    for (i=0;i<elements.length;i++) {
389      queuedManager.add({
390        type: 'GET',
391        url: 'ws.php',
392        data: {
393          method: resizeMethod,
394          maxwidth: maxwidth,
395          maxheight: maxheight,
396          crop: crop,
397          follow_orientation: follow_orientation,
398          image_id: elements[i],
399          format: 'json'
400        },
401        dataType: 'json',
402        success: ( function(data) { progress(++todo, progressBar_max, data['result']) }),
403        error: ( function(data) { progress(++todo, progressBar_max, false) })
404      });
405    }
406    return false;
407  });
408
409  function toggleCropFields(prefix) {
410    if (jQuery("#"+prefix+"_crop").is(':checked')) {
411      jQuery("#"+prefix+"_width_th").text(width_str);
412      jQuery("#"+prefix+"_height_th").text(height_str);
413      jQuery("#"+prefix+"_follow_orientation_tr").show();
414    }
415    else {
416      jQuery("#"+prefix+"_width_th").text(max_width_str);
417      jQuery("#"+prefix+"_height_th").text(max_height_str);
418      jQuery("#"+prefix+"_follow_orientation_tr").hide();
419    }
420  }
421
422  toggleCropFields("thumb");
423  jQuery("#thumb_crop").click(function () {toggleCropFields("thumb")});
424
425  checkPermitAction()
426});
427
428jQuery(window).load(function() {
429  var max_dim = 20;
430  $(".thumbnails img").each(function () {
431    if ($(this).height() > (max_dim-20))
432      max_dim = $(this).height() + 20;
433    if ($(this).width() > (max_dim-20))
434      max_dim = $(this).width() + 20;
435    $("ul.thumbnails span, ul.thumbnails label").css('width', max_dim+'px').css('height', max_dim+'px');
436  });
437});
438{/literal}{/footer_script}
439
440<div id="batchManagerGlobal">
441
442<h2>{'Batch Manager'|@translate}</h2>
443
444  <form action="{$F_ACTION}" method="post">
445
446  <fieldset>
447    <legend>{'Filter'|@translate}</legend>
448
449    <ul id="filterList">
450      <li id="filter_prefilter" {if !isset($filter.prefilter)}style="display:none"{/if}>
451        <a href="#" class="removeFilter" title="{'remove this filter'|@translate}"><span>[x]</span></a>
452        <input type="checkbox" name="filter_prefilter_use" class="useFilterCheckbox" {if isset($filter.prefilter)}checked="checked"{/if}>
453        {'predefined filter'|@translate}
454        <select name="filter_prefilter">
455          {foreach from=$prefilters item=prefilter}
456          <option value="{$prefilter.ID}" {if $filter.prefilter eq $prefilter.ID}selected="selected"{/if}>{$prefilter.NAME}</option>
457          {/foreach}
458        </select>
459      </li>
460      <li id="filter_category" {if !isset($filter.category)}style="display:none"{/if}>
461        <a href="#" class="removeFilter" title="remove this filter"><span>[x]</span></a>
462        <input type="checkbox" name="filter_category_use" class="useFilterCheckbox" {if isset($filter.category)}checked="checked"{/if}>
463        {'album'|@translate}
464        <select style="width:400px" name="filter_category" size="1">
465          {html_options options=$filter_category_options selected=$filter_category_options_selected}
466        </select>
467        <label><input type="checkbox" name="filter_category_recursive" {if isset($filter.category_recursive)}checked="checked"{/if}> {'include child albums'|@translate}</label>
468      </li>
469      <li id="filter_level" {if !isset($filter.level)}style="display:none"{/if}>
470        <a href="#" class="removeFilter" title="remove this filter"><span>[x]</span></a>
471        <input type="checkbox" name="filter_level_use" class="useFilterCheckbox" {if isset($filter.level)}checked="checked"{/if}>
472        {'Who can see these photos?'|@translate}
473        <select name="filter_level" size="1">
474          {html_options options=$filter_level_options selected=$filter_level_options_selected}
475        </select>
476      </li>
477    </ul>
478
479    <p class="actionButtons" style="">
480      <select id="addFilter">
481        <option value="-1">{'Add a filter'|@translate}</option>
482        <option disabled="disabled">------------------</option>
483        <option value="filter_prefilter">{'predefined filter'|@translate}</option>
484        <option value="filter_category">{'album'|@translate}</option>
485        <option value="filter_level">{'Who can see these photos?'|@translate}</option>
486      </select>
487<!--      <input id="removeFilters" class="submit" type="submit" value="Remove all filters" name="removeFilters"> -->
488      <a id="removeFilters" href="">{'Remove all filters'|@translate}</a>
489    </p>
490
491    <p class="actionButtons" id="applyFilterBlock">
492      <input id="applyFilter" class="submit" type="submit" value="{'Refresh photo set'|@translate}" name="submitFilter">
493    </p>
494
495  </fieldset>
496
497  <fieldset>
498
499    <legend>{'Selection'|@translate}</legend>
500
501  {if !empty($thumbnails)}
502  <p id="checkActions">
503    {'Select:'|@translate}
504{if $nb_thumbs_set > $nb_thumbs_page}
505    <a href="#" id="selectAll">{'The whole page'|@translate}</a>,
506    <a href="#" id="selectSet">{'The whole set'|@translate}</a>,
507{else}
508    <a href="#" id="selectAll">{'All'|@translate}</a>,
509{/if}
510    <a href="#" id="selectNone">{'None'|@translate}</a>,
511    <a href="#" id="selectInvert">{'Invert'|@translate}</a>
512
513    <span id="selectedMessage"></span>
514
515    <input type="checkbox" name="setSelected" style="display:none" {if count($selection) == $nb_thumbs_set}checked="checked"{/if}>
516  </p>
517
518    <ul class="thumbnails">
519      {foreach from=$thumbnails item=thumbnail}
520        {if in_array($thumbnail.ID, $selection)}
521          {assign var='isSelected' value=true}
522        {else}
523          {assign var='isSelected' value=false}
524        {/if}
525
526      <li><span class="wrap1">
527          <label>
528            <span class="wrap2{if $isSelected} thumbSelected{/if}">
529        {if $thumbnail.LEVEL > 0}
530        <em class="levelIndicatorB">{$pwg->l10n($pwg->sprintf('Level %d',$thumbnail.LEVEL))}</em>
531        <em class="levelIndicatorF" title="{'Who can see these photos?'|@translate} : ">{$pwg->l10n($pwg->sprintf('Level %d',$thumbnail.LEVEL))}</em>
532        {/if}
533            <span>
534              <img src="{$thumbnail.TN_SRC}"
535                 alt="{$thumbnail.FILE}"
536                 title="{$thumbnail.TITLE|@escape:'html'}"
537                 class="thumbnail">
538            </span></span>
539            <input type="checkbox" name="selection[]" value="{$thumbnail.ID}" {if $isSelected}checked="checked"{/if}>
540          </label>
541          </span>
542      </li>
543      {/foreach}
544    </ul>
545
546  {if !empty($navbar) }
547  <div style="clear:both;">
548
549    <div style="float:left">
550    {include file='navigation_bar.tpl'|@get_extent:'navbar'}
551    </div>
552
553    <div style="float:right;margin-top:10px;">{'display'|@translate}
554      <a href="{$U_DISPLAY}&amp;display=20">20</a>
555      &middot; <a href="{$U_DISPLAY}&amp;display=50">50</a>
556      &middot; <a href="{$U_DISPLAY}&amp;display=100">100</a>
557      &middot; <a href="{$U_DISPLAY}&amp;display=all">{'all'|@translate}</a>
558      {'photos per page'|@translate}
559    </div>
560  </div>
561  {/if}
562
563  {else}
564  <div>{'No photo in the current set.'|@translate}</div>
565  {/if}
566  </fieldset>
567
568  <fieldset id="action">
569
570    <legend>{'Action'|@translate}</legend>
571      <div id="forbidAction"{if count($selection) != 0}style="display:none"{/if}>{'No photo selected, no action possible.'|@translate}</div>
572      <div id="permitAction"{if count($selection) == 0}style="display:none"{/if}>
573
574    <select name="selectAction">
575      <option value="-1">{'Choose an action'|@translate}</option>
576      <option disabled="disabled">------------------</option>
577  {if isset($show_delete_form) }
578      <option value="delete">{'Delete selected photos'|@translate}</option>
579  {/if}
580      <option value="associate">{'Associate to album'|@translate}</option>
581  {if !empty($dissociate_options)}
582      <option value="dissociate">{'Dissociate from album'|@translate}</option>
583  {/if}
584      <option value="add_tags">{'add tags'|@translate}</option>
585  {if !empty($DEL_TAG_SELECTION)}
586      <option value="del_tags">{'remove tags'|@translate}</option>
587  {/if}
588      <option value="author">{'Set author'|@translate}</option>
589      <option value="title">{'Set title'|@translate}</option>
590      <option value="date_creation">{'Set creation date'|@translate}</option>
591      <option value="level">{'Who can see these photos?'|@translate}</option>
592      <option value="metadata">{'synchronize metadata'|@translate}</option>
593  {if ($IN_CADDIE)}
594      <option value="remove_from_caddie">{'Remove from caddie'|@translate}</option>
595  {else}
596      <option value="add_to_caddie">{'add to caddie'|@translate}</option>
597  {/if}
598      <option value="regenerateThumbnails">{'Regenerate Thumbnails'|@translate}</option>
599      <option value="regenerateWebsize">{'Regenerate Websize Photos'|@translate}</option>
600  {if !empty($element_set_global_plugins_actions)}
601    {foreach from=$element_set_global_plugins_actions item=action}
602      <option value="{$action.ID}">{$action.NAME}</option>
603    {/foreach}
604  {/if}
605    </select>
606
607    <!-- delete -->
608    <div id="action_delete" class="bulkAction">
609    <p><label><input type="checkbox" name="confirm_deletion" value="1"> {'Are you sure?'|@translate}</label></p>
610    </div>
611
612    <!-- associate -->
613    <div id="action_associate" class="bulkAction">
614          <select style="width:400px" name="associate" size="1">
615            {html_options options=$associate_options }
616         </select>
617    </div>
618
619    <!-- dissociate -->
620    <div id="action_dissociate" class="bulkAction">
621          <select style="width:400px" name="dissociate" size="1">
622            {if !empty($dissociate_options)}{html_options options=$dissociate_options }{/if}
623          </select>
624    </div>
625
626
627    <!-- add_tags -->
628    <div id="action_add_tags" class="bulkAction">
629<select id="tags" name="add_tags">
630</select>
631    </div>
632
633    <!-- del_tags -->
634    <div id="action_del_tags" class="bulkAction">
635{$DEL_TAG_SELECTION}
636    </div>
637
638    <!-- author -->
639    <div id="action_author" class="bulkAction">
640    <label><input type="checkbox" name="remove_author"> {'remove author'|@translate}</label><br>
641    {assign var='authorDefaultValue' value='Type here the author name'|@translate}
642<input type="text" class="large" name="author" value="{$authorDefaultValue}" onfocus="this.value=(this.value=='{$authorDefaultValue}') ? '' : this.value;" onblur="this.value=(this.value=='') ? '{$authorDefaultValue}' : this.value;">
643    </div>   
644
645    <!-- title -->
646    <div id="action_title" class="bulkAction">
647    <label><input type="checkbox" name="remove_title"> {'remove title'|@translate}</label><br>
648    {assign var='titleDefaultValue' value='Type here the title'|@translate}
649<input type="text" class="large" name="title" value="{$titleDefaultValue}" onfocus="this.value=(this.value=='{$titleDefaultValue}') ? '' : this.value;" onblur="this.value=(this.value=='') ? '{$titleDefaultValue}' : this.value;">
650    </div>
651
652    <!-- date_creation -->
653    <div id="action_date_creation" class="bulkAction">
654      <label><input type="checkbox" name="remove_date_creation"> {'remove creation date'|@translate}</label><br>
655      <div id="set_date_creation">
656          <select id="date_creation_day" name="date_creation_day">
657             <option value="0">--</option>
658            {section name=day start=1 loop=32}
659              <option value="{$smarty.section.day.index}" {if $smarty.section.day.index==$DATE_CREATION_DAY}selected="selected"{/if}>{$smarty.section.day.index}</option>
660            {/section}
661          </select>
662          <select id="date_creation_month" name="date_creation_month">
663            {html_options options=$month_list selected=$DATE_CREATION_MONTH}
664          </select>
665          <input id="date_creation_year"
666                 name="date_creation_year"
667                 type="text"
668                 size="4"
669                 maxlength="4"
670                 value="{$DATE_CREATION_YEAR}">
671          <input id="date_creation_linked_date" name="date_creation_linked_date" type="hidden" size="10" disabled="disabled">
672      </div>
673    </div>
674
675    <!-- level -->
676    <div id="action_level" class="bulkAction">
677        <select name="level" size="1">
678          {html_options options=$level_options selected=$level_options_selected}
679        </select>
680    </div>
681
682    <!-- metadata -->
683    <div id="action_metadata" class="bulkAction">
684    </div>
685
686    <!-- regenerate thumbnails -->
687    <div id="action_regenerateThumbnails" class="bulkAction">
688      <table style="margin-left:20px;">
689        <tr>
690          <th><label for="thumb_crop">{'Crop'|@translate}</label></th>
691          <td><input type="checkbox" name="thumb_crop" id="thumb_crop" {if $upload_form_settings.thumb_crop}checked="checked"{/if}></td>
692        </tr>
693        <tr id="thumb_follow_orientation_tr">
694          <th><label for="thumb_follow_orientation">{'Follow Orientation'|@translate}</label></th>
695          <td><input type="checkbox" name="thumb_follow_orientation" id="thumb_follow_orientation" {if $upload_form_settings.thumb_follow_orientation}checked="checked"{/if}></td>
696        </tr>
697        <tr>
698          <th id="thumb_width_th">{'Maximum Width'|@translate}</th>
699          <td><input type="text" name="thumb_maxwidth" value="{$upload_form_settings.thumb_maxwidth}" size="4" maxlength="4"> {'pixels'|@translate}</td>
700        </tr>
701        <tr>
702          <th id="thumb_height_th">{'Maximum Height'|@translate}</th>
703          <td><input type="text" name="thumb_maxheight" value="{$upload_form_settings.thumb_maxheight}" size="4" maxlength="4"> {'pixels'|@translate}</td>
704        </tr>
705        <tr>
706          <th>{'Image Quality'|@translate}</th>
707          <td><input type="text" name="thumb_quality" value="{$upload_form_settings.thumb_quality}" size="3" maxlength="3"> %</td>
708        </tr>
709      </table>
710    </div>
711
712    <!-- regenerate websize -->
713    <div id="action_regenerateWebsize" class="bulkAction">
714      <p>
715        <img src="admin/themes/default/icon/warning.png" alt="!" style="vertical-align:middle;">
716        {'Only photos with HD can be regenerated!'|@translate}
717      </p>
718
719      <table style="margin:10px 20px;">
720        <tr>
721          <th>{'Maximum Width'|@translate}</th>
722          <td><input type="text" name="websize_maxwidth" value="{$upload_form_settings.websize_maxwidth}" size="4" maxlength="4"> {'pixels'|@translate}</td>
723        </tr>
724        <tr>
725          <th>{'Maximum Height'|@translate}</th>
726          <td><input type="text" name="websize_maxheight" value="{$upload_form_settings.websize_maxheight}" size="4" maxlength="4"> {'pixels'|@translate}</td>
727        </tr>
728        <tr>
729          <th>{'Image Quality'|@translate}</th>
730          <td><input type="text" name="websize_quality" value="{$upload_form_settings.websize_quality}" size="3" maxlength="3"> %</td>
731        </tr>
732      </table>
733    </div>
734
735    <!-- progress bar -->
736    <div id="regenerationMsg" class="bulkAction">
737      <p id="regenerationText" style="margin-bottom:10px;"></p>
738      <span class="progressBar" id="progressBar"></span>
739      <input type="hidden" name="regenerateSuccess" value="0">
740      <input type="hidden" name="regenerateError" value="0">
741    </div>
742
743    <!-- plugins -->
744{if !empty($element_set_global_plugins_actions)}
745  {foreach from=$element_set_global_plugins_actions item=action}
746    <div id="action_{$action.ID}" class="bulkAction">
747    {if !empty($action.CONTENT)}{$action.CONTENT}{/if}
748    </div>
749  {/foreach}
750{/if}
751
752    <p id="applyActionBlock" style="display:none" class="actionButtons">
753      <input id="applyAction" class="submit" type="submit" value="{'Apply action'|@translate}" name="submit"> <span id="applyOnDetails"></span></p>
754
755    </div> <!-- #permitAction -->
756  </fieldset>
757
758  </form>
759
760</div> <!-- #batchManagerGlobal -->
Note: See TracBrowser for help on using the repository browser.