source: trunk/admin/themes/default/template/configuration.tpl @ 13244

Last change on this file since 13244 was 13244, checked in by plg, 12 years ago

change color scheme on submit buttons for clear theme: white text on dark gray
background and orange background on :hover.

On many places, the submit buttons are now left aligned (instead of centered)

On configuration option screens, the "Reset" button was removed: useless and
confusing.

Much simpler "Quick Local Synchronization" button on admin/intro.tpl for admin
theme clear.

  • Property svn:eol-style set to LF
File size: 16.2 KB
RevLine 
[13024]1{footer_script}{literal}
2jQuery(document).ready(function(){
3  jQuery("#activate_comments").change(function(){
4    if ($(this).is(':checked')) {
5      jQuery("#comments_param_warp").show();
6    } else {
7      jQuery("#comments_param_warp").hide();
8    }
9  });
[2614]10
[13024]11  var targets = {
12    'input[name="rate"]' : '#rate_anonymous',
13    'input[name="allow_user_registration"]' : '#email_admin_on_new_user',
14    'input[name="comments_validation"]' : '#email_admin_on_comment_validation',
15    'input[name="user_can_edit_comment"]' : '#email_admin_on_comment_edition',
16    'input[name="user_can_delete_comment"]' : '#email_admin_on_comment_deletion',
17  };
[2614]18
[13024]19  for (selector in targets) {
20    var target = targets[selector];
21
22    jQuery(target).toggle(jQuery(selector).is(':checked'));
23
24    (function(target){
25      jQuery(selector).bind('change', function() {
26        jQuery(target).toggle($(this).is(':checked'));
27      });
28    })(target);
29  };
30});
31{/literal}{/footer_script}
32
[2531]33<div class="titrePage">
[5021]34  <h2>{'Piwigo configuration'|@translate} {$TABSHEET_TITLE}</h2>
[2531]35</div>
36
[3215]37{if !isset($default)}
[2531]38<form method="post" action="{$F_ACTION}" class="properties">
[3215]39{/if}
[5284]40<div id="configContent">
[2531]41{if isset($main)}
42<fieldset id="mainConf">
[3185]43  <legend></legend>
[2531]44  <ul>
45    <li>
[13004]46     
[2531]47        <label for="gallery_title">{'Gallery title'|@translate}</label>
[13004]48      <br>
[3185]49      <input type="text" maxlength="255" size="50" name="gallery_title" id="gallery_title" value="{$main.CONF_GALLERY_TITLE}">
[2531]50    </li>
51
52    <li>
[13004]53     
[2531]54        <label for="page_banner">{'Page banner'|@translate}</label>
[13004]55      <br>
[3185]56      <textarea rows="5" cols="50" class="description" name="page_banner" id="page_banner">{$main.CONF_PAGE_BANNER}</textarea>
[2531]57    </li>
58
59    <li>
60      <label>
[3185]61        <input type="checkbox" name="rate" {if ($main.rate)}checked="checked"{/if}>
[13004]62        {'Allow rating'|@translate}
[2531]63      </label>
64    </li>
65
[13004]66    <li id="rate_anonymous">
[2531]67      <label>
[3185]68        <input type="checkbox" name="rate_anonymous" {if ($main.rate_anonymous)}checked="checked"{/if}>
[13004]69        {'Rating by guests'|@translate}
[2531]70      </label>
71    </li>
72
73    <li>
74      <label>
[3185]75        <input type="checkbox" name="allow_user_registration" {if ($main.allow_user_registration)}checked="checked"{/if}>
[13004]76        {'Allow user registration'|@translate}
[2531]77      </label>
78    </li>
79
[13004]80    <li id="email_admin_on_new_user">
[2531]81      <label>
[13004]82        <input type="checkbox" name="email_admin_on_new_user" {if ($main.email_admin_on_new_user)}checked="checked"{/if}>
83        {'Email admins when a new user registers'|@translate}
[5328]84      </label>
85    </li>
86
87    <li>
88      <label>
[13004]89        <input type="checkbox" name="allow_user_customization" {if ($main.allow_user_customization)}checked="checked"{/if}>
90        {'Allow user customization'|@translate}
[2531]91      </label>
92    </li>
93
94    <li>
95      <label>
[13004]96        <input type="checkbox" name="obligatory_user_mail_address" {if ($main.obligatory_user_mail_address)}checked="checked"{/if}>
97        {'Mail address is obligatory for all users'|@translate}
[2531]98      </label>
99    </li>
[8626]100
101    <li>
[13004]102      <label>{'Week starts on'|@translate}
103      {html_options name="week_starts_on" options=$main.week_starts_on_options selected=$main.week_starts_on_options_selected}</label>
[8626]104    </li>
[11279]105   
[11589]106    <li>
[13004]107        <label>{'Default photos order'|@translate}</label>
[11587]108       
109        {foreach from=$main.order_by item=order}
[11588]110        <span class="filter {if $ORDER_BY_IS_CUSTOM}transparent{/if}">         
[13087]111          <select name="order_by[]" {if $ORDER_BY_IS_CUSTOM}disabled{/if}>
112            {html_options options=$main.order_by_options selected=$order}
[11587]113          </select>
[11588]114          <a class="removeFilter">{'delete'|@translate}</a>
[11587]115        </span>
116        {/foreach}
117       
118        {if !$ORDER_BY_IS_CUSTOM}
[11588]119          <a class="addFilter">{'Add a criteria'|@translate}</a>
[11587]120        {else}
121          <span class="order_by_is_custom">{'You can\'t define a default photo order because you have a custom setting in your local configuration.'|@translate}</span>
122        {/if}
[11279]123    </li>
124   
[11587]125{if !$ORDER_BY_IS_CUSTOM}
[12872]126{footer_script require='jquery'}
127// counters for displaying of addFilter link
[13087]128fields = {$main.order_by|@count}; max_fields = Math.ceil({$main.order_by_options|@count}/2);
[12872]129
130{literal}
131function updateAddFilterLink() {
132  if (fields >= max_fields) {
133    $('.addFilter').css('display', 'none');
134  } else {
135    $('.addFilter').css('display', '');
136  }
137}
138
139function updateRemoveFilterTrigger() {
140  $(".removeFilter").click(function () {
141    $(this).parent('span.filter').remove();
142    fields--;
143    updateAddFilterLink();
144  });
145}
146
[11279]147jQuery(document).ready(function () {
[11587]148  $('.addFilter').click(function() {
149    $(this).prev('span.filter').clone().insertBefore($(this));
[13087]150    $(this).prev('span.filter').children('select[name="order_by[]"]').val('');
[12872]151   
152    fields++;
153    updateAddFilterLink(); 
154    updateRemoveFilterTrigger();
[11279]155  });
[11587]156 
[12872]157  updateRemoveFilterTrigger();
158  updateAddFilterLink();
[11279]159});
[12872]160{/literal}
161{/footer_script}
[11587]162{/if}
[2531]163
[13004]164    <li>
165      <strong>{'Save visits in history for'|@translate}</strong>
[2531]166
[13004]167      <label>
168        <input type="checkbox" name="history_guest" {if ($main.history_guest)}checked="checked"{/if}>
169        {'simple visitors'|@translate}
170      </label>
[2531]171
[13004]172      <label>
173        <input type="checkbox" name="log" {if ($main.log)}checked="checked"{/if}>
174        {'registered users'|@translate}
175      </label>
176
177      <label>
178        <input type="checkbox" name="history_admin" {if ($main.history_admin)}checked="checked"{/if}>
179        {'administrators'|@translate}
180      </label>
181
182    </li>
[2531]183  </ul>
184</fieldset>
185{/if}
186
187{if isset($comments)}
188<fieldset id="commentsConf">
[3215]189  <legend></legend>
[2531]190  <ul>
191    <li>
192      <label>
[12887]193        <input type="checkbox" name="activate_comments" id="activate_comments"{if ($comments.activate_comments)}checked="checked"{/if}>
[13004]194        {'Activate comments'|@translate}
[12887]195      </label>
196    </li>
197  </ul>
198 
199  <ul id="comments_param_warp"{if not ($comments.activate_comments)} style="display:none;"{/if}>
200    <li>
201      <label>
[3185]202        <input type="checkbox" name="comments_forall" {if ($comments.comments_forall)}checked="checked"{/if}>
[13004]203        {'Comments for all'|@translate}
[2531]204      </label>
205    </li>
206
207    <li>
208      <label>
[13004]209        {'Number of comments per page'|@translate}
210        <input type="text" size="3" maxlength="4" name="nb_comment_page" id="nb_comment_page" value="{$comments.NB_COMMENTS_PAGE}">
[2531]211      </label>
212    </li>
[13004]213   
[2531]214    <li>
215      <label>
[13004]216        {'Default comments order'|@translate}
217        <select name="comments_order">
218          {html_options options=$comments.comments_order_options selected=$comments.comments_order}
219        </select>
[2531]220      </label>
221    </li>
222
223    <li>
224      <label>
[13004]225        <input type="checkbox" name="comments_validation" {if ($comments.comments_validation)}checked="checked"{/if}>
226        {'Validation'|@translate}
[2531]227      </label>
228    </li>
[3445]229
230    <li>
231      <label>
232        <input type="checkbox" name="user_can_edit_comment" {if ($comments.user_can_edit_comment)}checked="checked"{/if}>
[13004]233        {'Allow users to edit their own comments'|@translate}
[3445]234      </label>
235    </li>
236    <li>
237      <label>
238        <input type="checkbox" name="user_can_delete_comment" {if ($comments.user_can_delete_comment)}checked="checked"{/if}>
[13004]239        {'Allow users to delete their own comments'|@translate}
[3445]240      </label>
241    </li>
[13004]242
[13024]243    <li id="notifyAdmin">
[13004]244      <strong>{'Notify administrators when a comment is'|@translate}</strong>
245
246      <label id="email_admin_on_comment_validation">
247        <input type="checkbox" name="email_admin_on_comment_validation" {if ($comments.email_admin_on_comment_validation)}checked="checked"{/if}> {'pending validation'|@translate}
[3445]248      </label>
[13004]249
[3445]250      <label>
[13004]251        <input type="checkbox" name="email_admin_on_comment" {if ($comments.email_admin_on_comment)}checked="checked"{/if}> {'added'|@translate}
[3445]252      </label>
[13004]253
254      <label id="email_admin_on_comment_edition">
255        <input type="checkbox" name="email_admin_on_comment_edition" {if ($comments.email_admin_on_comment_edition)}checked="checked"{/if}> {'modified'|@translate}
256      </label>
257
258      <label id="email_admin_on_comment_deletion">
259        <input type="checkbox" name="email_admin_on_comment_deletion" {if ($comments.email_admin_on_comment_deletion)}checked="checked"{/if}> {'deleted'|@translate}
260      </label>
[3445]261    </li>
[2531]262  </ul>
263</fieldset>
264{/if}
265
[12879]266{if isset($sizes)}
267
268{footer_script}{literal}
269jQuery(document).ready(function(){
270  function toggleResizeFields(prefix) {
271    var checkbox = jQuery("#"+prefix+"_resize");
272    var needToggle = jQuery("input[name^="+prefix+"_]").not(checkbox).parents('tr');
273
274    if (jQuery(checkbox).is(':checked')) {
275      needToggle.show();
276    }
277    else {
278      needToggle.hide();
279    }
280  }
281
282  toggleResizeFields("original");
283  jQuery("#original_resize").click(function () {toggleResizeFields("original")});
284});
285{/literal}{/footer_script}
286
287<fieldset id="sizesConf">
288  <legend>{'Original Size'|@translate}</legend>
289
290  <table>
291    <tr>
292      <th><label for="original_resize">{'Resize after upload'|@translate}</label></th>
293      <td><input type="checkbox" name="original_resize" id="original_resize" {if ($sizes.original_resize)}checked="checked"{/if}></td>
294    </tr>
295    <tr>
296      <th>{'Maximum Width'|@translate}</th>
297      <td><input type="text" name="original_resize_maxwidth" value="{$sizes.original_resize_maxwidth}" size="4" maxlength="4"> {'pixels'|@translate}</td>
298    </tr>
299    <tr>
300      <th>{'Maximum Height'|@translate}</th>
301      <td><input type="text" name="original_resize_maxheight" value="{$sizes.original_resize_maxheight}" size="4" maxlength="4"> {'pixels'|@translate}</td>
302    </tr>
303    <tr>
304      <th>{'Image Quality'|@translate}</th>
305      <td><input type="text" name="original_resize_quality" value="{$sizes.original_resize_quality}" size="3" maxlength="3"> %</td>
306    </tr>
307  </table>
308
309</fieldset>
310{/if}
311
[5293]312{if isset($display)}
313<fieldset id="indexDisplayConf">
314  <legend>{'Main Page'|@translate}</legend>
315  <ul>
316    <li>
317      <label>
318        <input type="checkbox" name="menubar_filter_icon" {if ($display.menubar_filter_icon)}checked="checked"{/if}>
[13004]319        {'display only recently posted photos'|@translate|@ucfirst|@string_format:$pwg->l10n('Activate icon "%s"')}
[5293]320      </label>
[11285]321    </li>   
322   
323    <li>
324      <label>
325        <input type="checkbox" name="index_new_icon" {if ($display.index_new_icon)}checked="checked"{/if}>
[13004]326        {'Activate icon "new" next to albums and pictures'|@translate}
[11285]327      </label>
[5293]328    </li>
329
330    <li>
331      <label>
332        <input type="checkbox" name="index_sort_order_input" {if ($display.index_sort_order_input)}checked="checked"{/if}>
[13004]333        {'Sort order'|@translate|@string_format:$pwg->l10n('Activate icon "%s"')}
[5293]334      </label>
335    </li>
336
337    <li>
338      <label>
339        <input type="checkbox" name="index_flat_icon" {if ($display.index_flat_icon)}checked="checked"{/if}>
[13004]340        {'display all photos in all sub-albums'|@translate|@ucfirst|@string_format:$pwg->l10n('Activate icon "%s"')}
[5293]341      </label>
342    </li>
343
344    <li>
345      <label>
346        <input type="checkbox" name="index_posted_date_icon" {if ($display.index_posted_date_icon)}checked="checked"{/if}>
[13004]347        {'display a calendar by posted date'|@translate|@ucfirst|@string_format:$pwg->l10n('Activate icon "%s"')}
[5293]348      </label>
349    </li>
350
351    <li>
352      <label>
353        <input type="checkbox" name="index_created_date_icon" {if ($display.index_created_date_icon)}checked="checked"{/if}>
[13004]354        {'display a calendar by creation date'|@translate|@ucfirst|@string_format:$pwg->l10n('Activate icon "%s"')}
[5293]355      </label>
356    </li>
357
358    <li>
359      <label>
360        <input type="checkbox" name="index_slideshow_icon" {if ($display.index_slideshow_icon)}checked="checked"{/if}>
[13004]361        {'slideshow'|@translate|@ucfirst|@string_format:$pwg->l10n('Activate icon "%s"')}
[5293]362      </label>
363    </li>
364  </ul>
365</fieldset>
366
367<fieldset id="pictureDisplayConf">
368  <legend>{'Photo Page'|@translate}</legend>
369  <ul>
370    <li>
371      <label>
[5298]372        <input type="checkbox" name="picture_slideshow_icon" {if ($display.picture_slideshow_icon)}checked="checked"{/if}>
[13004]373        {'slideshow'|@translate|@ucfirst|@string_format:$pwg->l10n('Activate icon "%s"')}
[5293]374      </label>
375    </li>
376
377    <li>
378      <label>
[5298]379        <input type="checkbox" name="picture_metadata_icon" {if ($display.picture_metadata_icon)}checked="checked"{/if}>
[13004]380        {'Show file metadata'|@translate|@string_format:$pwg->l10n('Activate icon "%s"')}
[5293]381      </label>
382    </li>
383
384    <li>
385      <label>
[5618]386        <input type="checkbox" name="picture_download_icon" {if ($display.picture_download_icon)}checked="checked"{/if}>
[13004]387        {'Download this file'|@translate|@ucfirst|@string_format:$pwg->l10n('Activate icon "%s"')}
[5618]388      </label>
389    </li>
390
391    <li>
392      <label>
[5293]393        <input type="checkbox" name="picture_favorite_icon" {if ($display.picture_favorite_icon)}checked="checked"{/if}>
[13004]394        {'add this photo to your favorites'|@translate|@ucfirst|@string_format:$pwg->l10n('Activate icon "%s"')}
[5293]395      </label>
396    </li>
397
398    <li>
399      <label>
400        <input type="checkbox" name="picture_navigation_icons" {if ($display.picture_navigation_icons)}checked="checked"{/if}>
[13004]401        {'Activate Navigation Bar'|@translate}
[5293]402      </label>
403    </li>
404
405    <li>
406      <label>
407        <input type="checkbox" name="picture_navigation_thumb" {if ($display.picture_navigation_thumb)}checked="checked"{/if}>
[13004]408        {'Activate Navigation Thumbnails'|@translate}
[5293]409      </label>
410    </li>
[10812]411   
412    <li>
413      <label>
414        <input type="checkbox" name="picture_menu" {if ($display.picture_menu)}checked="checked"{/if}>
[13004]415        {'Show menubar'|@translate}
[10812]416      </label>
417    </li>
[5293]418  </ul>
419</fieldset>
[5304]420
421<fieldset id="pictureInfoConf">
422  <legend>{'Photo Properties'|@translate}</legend>
423  <ul>
424    <li>
425      <label>
426        <input type="checkbox" name="picture_informations[author]" {if ($display.picture_informations.author)}checked="checked"{/if}>
[13004]427        {'Author'|@translate}
[5304]428      </label>
429    </li>
430
431    <li>
432      <label>
433        <input type="checkbox" name="picture_informations[created_on]" {if ($display.picture_informations.created_on)}checked="checked"{/if}>
[13004]434        {'Created on'|@translate}
[5304]435      </label>
436    </li>
437
438    <li>
439      <label>
440        <input type="checkbox" name="picture_informations[posted_on]" {if ($display.picture_informations.posted_on)}checked="checked"{/if}>
[13004]441        {'Posted on'|@translate}
[5304]442      </label>
443    </li>
444
445    <li>
446      <label>
447        <input type="checkbox" name="picture_informations[dimensions]" {if ($display.picture_informations.dimensions)}checked="checked"{/if}>
[13004]448        {'Dimensions'|@translate}
[5304]449      </label>
450    </li>
451
452    <li>
453      <label>
454        <input type="checkbox" name="picture_informations[file]" {if ($display.picture_informations.file)}checked="checked"{/if}>
[13004]455        {'File'|@translate}
[5304]456      </label>
457    </li>
458
459    <li>
460      <label>
461        <input type="checkbox" name="picture_informations[filesize]" {if ($display.picture_informations.filesize)}checked="checked"{/if}>
[13004]462        {'Filesize'|@translate}
[5304]463      </label>
464    </li>
465
466    <li>
467      <label>
468        <input type="checkbox" name="picture_informations[tags]" {if ($display.picture_informations.tags)}checked="checked"{/if}>
[13004]469        {'Tags'|@translate}
[5304]470      </label>
471    </li>
472
473    <li>
474      <label>
475        <input type="checkbox" name="picture_informations[categories]" {if ($display.picture_informations.categories)}checked="checked"{/if}>
[13004]476        {'Albums'|@translate}
[5304]477      </label>
478    </li>
479
480    <li>
481      <label>
482        <input type="checkbox" name="picture_informations[visits]" {if ($display.picture_informations.visits)}checked="checked"{/if}>
[13004]483        {'Visits'|@translate}
[5304]484      </label>
485    </li>
486
487    <li>
488      <label>
[11893]489        <input type="checkbox" name="picture_informations[rating_score]" {if ($display.picture_informations.rating_score)}checked="checked"{/if}>
[13004]490        {'Rating score'|@translate}
[5304]491      </label>
492    </li>
493
494    <li>
495      <label>
496        <input type="checkbox" name="picture_informations[privacy_level]" {if ($display.picture_informations.privacy_level)}checked="checked"{/if}>
[13004]497        {'Who can see this photo?'|@translate} ({'available for administrators only'|@translate})
[5304]498      </label>
499    </li>
500  </ul>
501</fieldset>
[5293]502{/if}
503
[2531]504{if !isset($default)}
[13244]505  <p class="formButtons">
[12879]506    <input class="submit" type="submit" name="submit" value="{'Save Settings'|@translate}">
[2531]507  </p>
[3215]508</form>
[2531]509{/if}
[13004]510
511</div> <!-- configContent -->
512
513{if isset($default)}
514{$PROFILE_CONTENT}
515{/if}
Note: See TracBrowser for help on using the repository browser.