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
Line 
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  });
10
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  };
18
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
33<div class="titrePage">
34  <h2>{'Piwigo configuration'|@translate} {$TABSHEET_TITLE}</h2>
35</div>
36
37{if !isset($default)}
38<form method="post" action="{$F_ACTION}" class="properties">
39{/if}
40<div id="configContent">
41{if isset($main)}
42<fieldset id="mainConf">
43  <legend></legend>
44  <ul>
45    <li>
46     
47        <label for="gallery_title">{'Gallery title'|@translate}</label>
48      <br>
49      <input type="text" maxlength="255" size="50" name="gallery_title" id="gallery_title" value="{$main.CONF_GALLERY_TITLE}">
50    </li>
51
52    <li>
53     
54        <label for="page_banner">{'Page banner'|@translate}</label>
55      <br>
56      <textarea rows="5" cols="50" class="description" name="page_banner" id="page_banner">{$main.CONF_PAGE_BANNER}</textarea>
57    </li>
58
59    <li>
60      <label>
61        <input type="checkbox" name="rate" {if ($main.rate)}checked="checked"{/if}>
62        {'Allow rating'|@translate}
63      </label>
64    </li>
65
66    <li id="rate_anonymous">
67      <label>
68        <input type="checkbox" name="rate_anonymous" {if ($main.rate_anonymous)}checked="checked"{/if}>
69        {'Rating by guests'|@translate}
70      </label>
71    </li>
72
73    <li>
74      <label>
75        <input type="checkbox" name="allow_user_registration" {if ($main.allow_user_registration)}checked="checked"{/if}>
76        {'Allow user registration'|@translate}
77      </label>
78    </li>
79
80    <li id="email_admin_on_new_user">
81      <label>
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}
84      </label>
85    </li>
86
87    <li>
88      <label>
89        <input type="checkbox" name="allow_user_customization" {if ($main.allow_user_customization)}checked="checked"{/if}>
90        {'Allow user customization'|@translate}
91      </label>
92    </li>
93
94    <li>
95      <label>
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}
98      </label>
99    </li>
100
101    <li>
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>
104    </li>
105   
106    <li>
107        <label>{'Default photos order'|@translate}</label>
108       
109        {foreach from=$main.order_by item=order}
110        <span class="filter {if $ORDER_BY_IS_CUSTOM}transparent{/if}">         
111          <select name="order_by[]" {if $ORDER_BY_IS_CUSTOM}disabled{/if}>
112            {html_options options=$main.order_by_options selected=$order}
113          </select>
114          <a class="removeFilter">{'delete'|@translate}</a>
115        </span>
116        {/foreach}
117       
118        {if !$ORDER_BY_IS_CUSTOM}
119          <a class="addFilter">{'Add a criteria'|@translate}</a>
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}
123    </li>
124   
125{if !$ORDER_BY_IS_CUSTOM}
126{footer_script require='jquery'}
127// counters for displaying of addFilter link
128fields = {$main.order_by|@count}; max_fields = Math.ceil({$main.order_by_options|@count}/2);
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
147jQuery(document).ready(function () {
148  $('.addFilter').click(function() {
149    $(this).prev('span.filter').clone().insertBefore($(this));
150    $(this).prev('span.filter').children('select[name="order_by[]"]').val('');
151   
152    fields++;
153    updateAddFilterLink(); 
154    updateRemoveFilterTrigger();
155  });
156 
157  updateRemoveFilterTrigger();
158  updateAddFilterLink();
159});
160{/literal}
161{/footer_script}
162{/if}
163
164    <li>
165      <strong>{'Save visits in history for'|@translate}</strong>
166
167      <label>
168        <input type="checkbox" name="history_guest" {if ($main.history_guest)}checked="checked"{/if}>
169        {'simple visitors'|@translate}
170      </label>
171
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>
183  </ul>
184</fieldset>
185{/if}
186
187{if isset($comments)}
188<fieldset id="commentsConf">
189  <legend></legend>
190  <ul>
191    <li>
192      <label>
193        <input type="checkbox" name="activate_comments" id="activate_comments"{if ($comments.activate_comments)}checked="checked"{/if}>
194        {'Activate comments'|@translate}
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>
202        <input type="checkbox" name="comments_forall" {if ($comments.comments_forall)}checked="checked"{/if}>
203        {'Comments for all'|@translate}
204      </label>
205    </li>
206
207    <li>
208      <label>
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}">
211      </label>
212    </li>
213   
214    <li>
215      <label>
216        {'Default comments order'|@translate}
217        <select name="comments_order">
218          {html_options options=$comments.comments_order_options selected=$comments.comments_order}
219        </select>
220      </label>
221    </li>
222
223    <li>
224      <label>
225        <input type="checkbox" name="comments_validation" {if ($comments.comments_validation)}checked="checked"{/if}>
226        {'Validation'|@translate}
227      </label>
228    </li>
229
230    <li>
231      <label>
232        <input type="checkbox" name="user_can_edit_comment" {if ($comments.user_can_edit_comment)}checked="checked"{/if}>
233        {'Allow users to edit their own comments'|@translate}
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}>
239        {'Allow users to delete their own comments'|@translate}
240      </label>
241    </li>
242
243    <li id="notifyAdmin">
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}
248      </label>
249
250      <label>
251        <input type="checkbox" name="email_admin_on_comment" {if ($comments.email_admin_on_comment)}checked="checked"{/if}> {'added'|@translate}
252      </label>
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>
261    </li>
262  </ul>
263</fieldset>
264{/if}
265
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
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}>
319        {'display only recently posted photos'|@translate|@ucfirst|@string_format:$pwg->l10n('Activate icon "%s"')}
320      </label>
321    </li>   
322   
323    <li>
324      <label>
325        <input type="checkbox" name="index_new_icon" {if ($display.index_new_icon)}checked="checked"{/if}>
326        {'Activate icon "new" next to albums and pictures'|@translate}
327      </label>
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}>
333        {'Sort order'|@translate|@string_format:$pwg->l10n('Activate icon "%s"')}
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}>
340        {'display all photos in all sub-albums'|@translate|@ucfirst|@string_format:$pwg->l10n('Activate icon "%s"')}
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}>
347        {'display a calendar by posted date'|@translate|@ucfirst|@string_format:$pwg->l10n('Activate icon "%s"')}
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}>
354        {'display a calendar by creation date'|@translate|@ucfirst|@string_format:$pwg->l10n('Activate icon "%s"')}
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}>
361        {'slideshow'|@translate|@ucfirst|@string_format:$pwg->l10n('Activate icon "%s"')}
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>
372        <input type="checkbox" name="picture_slideshow_icon" {if ($display.picture_slideshow_icon)}checked="checked"{/if}>
373        {'slideshow'|@translate|@ucfirst|@string_format:$pwg->l10n('Activate icon "%s"')}
374      </label>
375    </li>
376
377    <li>
378      <label>
379        <input type="checkbox" name="picture_metadata_icon" {if ($display.picture_metadata_icon)}checked="checked"{/if}>
380        {'Show file metadata'|@translate|@string_format:$pwg->l10n('Activate icon "%s"')}
381      </label>
382    </li>
383
384    <li>
385      <label>
386        <input type="checkbox" name="picture_download_icon" {if ($display.picture_download_icon)}checked="checked"{/if}>
387        {'Download this file'|@translate|@ucfirst|@string_format:$pwg->l10n('Activate icon "%s"')}
388      </label>
389    </li>
390
391    <li>
392      <label>
393        <input type="checkbox" name="picture_favorite_icon" {if ($display.picture_favorite_icon)}checked="checked"{/if}>
394        {'add this photo to your favorites'|@translate|@ucfirst|@string_format:$pwg->l10n('Activate icon "%s"')}
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}>
401        {'Activate Navigation Bar'|@translate}
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}>
408        {'Activate Navigation Thumbnails'|@translate}
409      </label>
410    </li>
411   
412    <li>
413      <label>
414        <input type="checkbox" name="picture_menu" {if ($display.picture_menu)}checked="checked"{/if}>
415        {'Show menubar'|@translate}
416      </label>
417    </li>
418  </ul>
419</fieldset>
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}>
427        {'Author'|@translate}
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}>
434        {'Created on'|@translate}
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}>
441        {'Posted on'|@translate}
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}>
448        {'Dimensions'|@translate}
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}>
455        {'File'|@translate}
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}>
462        {'Filesize'|@translate}
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}>
469        {'Tags'|@translate}
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}>
476        {'Albums'|@translate}
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}>
483        {'Visits'|@translate}
484      </label>
485    </li>
486
487    <li>
488      <label>
489        <input type="checkbox" name="picture_informations[rating_score]" {if ($display.picture_informations.rating_score)}checked="checked"{/if}>
490        {'Rating score'|@translate}
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}>
497        {'Who can see this photo?'|@translate} ({'available for administrators only'|@translate})
498      </label>
499    </li>
500  </ul>
501</fieldset>
502{/if}
503
504{if !isset($default)}
505  <p class="formButtons">
506    <input class="submit" type="submit" name="submit" value="{'Save Settings'|@translate}">
507  </p>
508</form>
509{/if}
510
511</div> <!-- configContent -->
512
513{if isset($default)}
514{$PROFILE_CONTENT}
515{/if}
Note: See TracBrowser for help on using the repository browser.