source: trunk/admin/themes/default/template/element_set_ranks.tpl @ 13013

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

feature 2561: redesign on album administration screen.

  • only one form on the screen and several tabs
  • simpler URL pattern : page=album-123-properties / page=album-123-sort_order / page=album-123-permissions
  • action to associate all photos of an album to another (new) virtual album was removed. This can be easily done with the new Batch Manager
  • notification by email on an album still has to be moved on a new dedicated tab
  • action icons (jump to album, manage photos, manage sub-albums, delete album...) replaced by plain text links
  • Property svn:eol-style set to LF
File size: 3.9 KB
Line 
1{footer_script require='jquery.ui.sortable'}{literal}
2jQuery(document).ready(function() {
3  function checkOrderOptions() {
4    jQuery("#image_order_user_define_options").hide();
5    if (jQuery("input[name=image_order_choice]:checked").val() == "user_define") {
6      jQuery("#image_order_user_define_options").show();
7    }       
8  }
9
10  jQuery('ul.thumbnails').sortable( {
11    revert: true, opacity: 0.7,
12    handle: jQuery('.rank-of-image').add('.rank-of-image img'),
13    update: function() {
14      jQuery(this).find('li').each(function(i) {
15        jQuery(this).find("input[name^=rank_of_image]").each(function() {
16          jQuery(this).attr('value', (i+1)*10)
17        });
18      });
19
20      jQuery('#image_order_rank').attr('checked', true);
21      checkOrderOptions();
22    }
23  });
24
25  jQuery("input[name=image_order_choice]").click(function () {
26    checkOrderOptions();
27  });
28
29  checkOrderOptions();
30});
31jQuery(document).ready(function() {
32jQuery('.clipwrapper').tipTip({
33'delay' : 0,
34'fadeIn' : 200,
35'fadeOut' : 200
36});
37});
38{/literal}{/footer_script}
39
40<div class="titrePage">
41  <h2><span style="letter-spacing:0">{$CATEGORIES_NAV}</span> &#8250; {'Edit album'|@translate} {$TABSHEET_TITLE}</h2>
42</div>
43
44<form action="{$F_ACTION}" method="post">
45{if !empty($thumbnails)}
46  <p><input class="submit" type="submit" value="{'Submit'|@translate}" name="submit"></p>
47  <fieldset>
48    <legend>{'Manual order'|@translate}</legend>
49    {if !empty($thumbnails)}
50    <p>{'Drag to re-order'|@translate}</p>
51    <ul class="thumbnails">
52      {foreach from=$thumbnails item=thumbnail}
53      <li class="rank-of-image" style="width:{$thumbnail.CLIPING_li}px; height:{$thumbnail.CLIPING_li}px; ">
54        <div class="clipwrapper" style="width:{$thumbnail.CLIPING}px; height:{$thumbnail.CLIPING}px; " title="{$thumbnail.NAME|@replace:'"':' '}">
55          <div class="clip" style="clip:rect({$thumbnail.CLIP_TOP}px {$thumbnail.CLIP_RIGHT}px {$thumbnail.CLIP_BOTTOM}px {$thumbnail.CLIP_LEFT}px);top:-{$thumbnail.CLIP_TOP}px;left:-{$thumbnail.CLIP_LEFT}px">
56            <img src="{$thumbnail.TN_SRC}" class="thumbnail" alt="{$thumbnail.NAME|@replace:'"':' '}">
57          </div>
58        </div>
59        <input type="text" name="rank_of_image[{$thumbnail.ID}]" value="{$thumbnail.RANK}" style="display:none">
60      </li>
61      {/foreach}
62    </ul>
63    {/if}
64  </fieldset>
65{/if}
66
67  <fieldset>
68    <legend>{'Sort order'|@translate}</legend>
69    <p class="field">
70      <input type="radio" name="image_order_choice" id="image_order_default" value="default"{if $image_order_choice=='default'} checked="checked"{/if}>
71      <label for="image_order_default">{'Use the default photo sort order (defined in the configuration file)'|@translate}</label>
72    </p>
73    <p class="field">
74      <input type="radio" name="image_order_choice" id="image_order_rank" value="rank"{if $image_order_choice=='rank'} checked="checked"{/if}>
75      <label for="image_order_rank">{'manual order'|@translate}</label>
76    </p>
77    <p class="field">
78      <input type="radio" name="image_order_choice" id="image_order_user_define" value="user_define"{if $image_order_choice=='user_define'} checked="checked"{/if}>
79      <label for="image_order_user_define">{'automatic order'|@translate}</label>
80      <div id="image_order_user_define_options">
81      {foreach from=$image_orders item=order}
82      <p class="field">
83        <select name="order_field_{$order.ID}">
84          {html_options options=$image_order_field_options selected=$order.FIELD }
85        </select>
86        <select name="order_direction_{$order.ID}">
87          {html_options options=$image_order_direction_options selected=$order.DIRECTION }
88        </select>     
89      </p>
90      {/foreach}
91      </div>
92  </fieldset>
93  <p>
94    <input class="submit" type="submit" value="{'Submit'|@translate}" name="submit">
95
96    <label>
97      <input type="checkbox" name="image_order_subcats" id="image_order_subcats">
98      {'Apply to sub-albums'|@translate}
99    </label>
100  </p>
101</form>
Note: See TracBrowser for help on using the repository browser.