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

Last change on this file since 8723 was 8723, checked in by rvelices, 13 years ago

feature 2102 : rename item/image/picture to photo (admin side)
also removed unnecessary/duplicate keys

  • Property svn:eol-style set to LF
File size: 3.0 KB
Line 
1{combine_script id='jquery.ui' load='async' require='jquery' path='themes/default/js/ui/packed/ui.core.packed.js' }
2{combine_script id='jquery.ui.sortable' load='async' require='jquery.ui' path='themes/default/js/ui/packed/ui.sortable.packed.js' }
3{footer_script require='jquery.ui.sortable'}{literal}
4jQuery(document).ready(function() {
5        jQuery('ul.thumbnails').sortable( {
6                revert: true,   opacity: 0.7,
7                handle: $('.rank-of-image').add('.rank-of-image img'),
8                update: function() {
9                        $(this).find('li').each(function(i) {
10                        $(this).find("input[name^=rank_of_image]")
11                        .each(function() { $(this).attr('value', (i+1)*10)});
12                        });
13                        $('#image_order_rank').attr('checked', true);
14                        }
15        });
16});
17{/literal}{/footer_script}
18
19<h2>{'Manage photo ranks'|@translate}</h2>
20
21<h3>{$CATEGORIES_NAV}</h3>
22
23{if !empty($thumbnails)}
24<form action="{$F_ACTION}" method="post">
25  <p><input class="submit" type="submit" value="{'Submit'|@translate}" name="submit"></p>
26  <fieldset>
27    <legend>{'Edit ranks'|@translate}</legend>
28    {if !empty($thumbnails)}
29    <ul class="thumbnails">
30      {foreach from=$thumbnails item=thumbnail}
31      <li class="rank-of-image">
32        <div class="clipwrapper">
33          <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">
34            <img src="{$thumbnail.TN_SRC}" class="thumbnail" alt="">
35          </div>
36        </div>
37        <input type="text" name="rank_of_image[{$thumbnail.ID}]" value="{$thumbnail.RANK}">
38      </li>
39      {/foreach}
40    </ul>
41    {/if}
42  </fieldset>
43
44  <fieldset>
45    <legend>{'Sort order'|@translate}</legend>
46    <p class="field">
47      <input type="radio" name="image_order_choice" id="image_order_default" value="default"{if $image_order_choice=='default'} checked="checked"{/if}>
48      <label for="image_order_default">{'Use the default photo sort order (defined in the configuration file)'|@translate}</label>
49    </p>
50    <p class="field">
51      <input type="radio" name="image_order_choice" id="image_order_rank" value="rank"{if $image_order_choice=='rank'} checked="checked"{/if}>
52      <label for="image_order_rank">{'By rank'|@translate}</label>
53    </p>
54    <p class="field">
55      <input type="radio" name="image_order_choice" id="image_order_user_define" value="user_define"{if $image_order_choice=='user_define'} checked="checked"{/if}>
56      <label for="image_order_user_define">{'Manual order'|@translate}</label>
57      {foreach from=$image_orders item=order}
58      <p class="field">
59        <select name="order_field_{$order.ID}">
60          {html_options options=$image_order_field_options selected=$order.FIELD }
61        </select>
62        <select name="order_direction_{$order.ID}">
63          {html_options options=$image_order_direction_options selected=$order.DIRECTION }
64        </select>     
65      </p>
66      {/foreach}
67  </fieldset>
68  <p><input class="submit" type="submit" value="{'Submit'|@translate}" name="submit"></p>
69</form>
70
71
72{else}
73<div class="infos"><p>{'No photo in this album'|@translate}</p></div>
74{/if}
Note: See TracBrowser for help on using the repository browser.