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

Revision 12175, 28.1 KB checked in by plg, 8 years ago (diff)

feature 2441 added: no need to have the HD to regenerate the websize if the
current websize is bigger than resize settings. When it occurs, we move the
current websize as HD and create the new websize from it.

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