source: branches/2.3/admin/themes/default/template/batch_manager_global.tpl @ 12475

Last change on this file since 12475 was 12475, checked in by mistic100, 13 years ago

Merged r12474 from trunk: feature:2471 [Batch Manager] "zoom" and "edit" links over each thumbnail

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