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

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

feature 2548, multiple size:

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