source: trunk/admin/themes/default/template/cat_list.tpl @ 8727

Revision 8727, 4.9 KB checked in by plg, 9 years ago (diff)

feature 2102: add a few language keys to remove all image/picture/element and replace by photo

  • Property svn:eol-style set to LF
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'}
4jQuery(document).ready(function(){ldelim}
5        jQuery(".catPos").hide();
6        jQuery(".drag_button").show();
7        jQuery(".categoryLi").css("cursor","move");
8        jQuery(".categoryUl").sortable({ldelim}
9                axis: "y",
10                opacity: 0.8
11        });
12        jQuery("#categoryOrdering").submit(function(){ldelim}
13                ar = jQuery('.categoryUl').sortable('toArray');
14                for(i=0;i<ar.length;i++) {ldelim}
15                        cat = ar[i].split('cat_');
16                        document.getElementsByName('catOrd[' + cat[1] + ']')[0].value = i;
17                }
18        });
19
20        jQuery("input[name=order_type]").click(function () {ldelim}
21                jQuery("#automatic_order_params").hide();
22                if (jQuery("input[name=order_type]:checked").val() == "automatic") {ldelim}
23                        jQuery("#automatic_order_params").show();
24                }
25        });
26});
27{/footer_script}
28
29<h2>{'Album list management'|@translate}</h2>
30
31<h3>{$CATEGORIES_NAV}</h3>
32
33<form id="addVirtual" action="{$F_ACTION}" method="post">
34  <p>
35    <input type="hidden" name="pwg_token" value="{$PWG_TOKEN}">
36    {'Add a virtual album'|@translate} : <input type="text" name="virtual_name">
37    <input class="submit" type="submit" value="{'Submit'|@translate}" name="submitAdd">
38    {if count($categories)>9 }
39    <a href="#EoP" class="button" style="border:0;">
40                <img src="{$themeconf.admin_icon_dir}/page_end.png" title="{'Page end'|@translate}" class="button" alt="page_end" style="margin-bottom:-0.6em;"></a>
41    {/if}
42  </p>
43</form>
44
45{if count($categories) }
46<form id="categoryOrdering" action="{$F_ACTION}" method="post">
47  <input type="hidden" name="pwg_token" value="{$PWG_TOKEN}">
48
49  <div class="orderParams">
50    <input class="submit" name="submitOrder" type="submit" value="{'Save order'|@translate}">
51    <label><input type="radio" name="order_type" value="manual" checked="checked"> {'manual order'|@translate}</label>
52    <label><input type="radio" name="order_type" value="automatic"> {'automatic order'|@translate}</label>
53    <span id="automatic_order_params" style="display:none">
54      <select name="ascdesc">
55        <option value="asc">{'ascending'|@translate}</option>
56        <option value="desc">{'descending'|@translate}</option>
57      </select>
58      <label><input type="checkbox" name="recursive"> {'Apply to sub-albums'|@translate}</label>
59    </span>
60  </div>
61
62  <ul class="categoryUl">
63
64    {foreach from=$categories item=category}
65    <li class="categoryLi{if $category.IS_VIRTUAL} virtual_cat{/if}" id="cat_{$category.ID}">
66      <!-- category {$category.ID} -->
67      <ul class="categoryActions">
68        {if cat_admin_access($category.ID)}
69        <li><a href="{$category.U_JUMPTO}" title="{'jump to album'|@translate}"><img src="{$themeconf.admin_icon_dir}/category_jump-to.png" class="button" alt="{'jump to album'|@translate}"></a></li>
70        {/if}
71        <li><a href="{$category.U_EDIT}" title="{'edit album'|@translate}"><img src="{$themeconf.admin_icon_dir}/category_edit.png" class="button" alt="{'edit'|@translate}"></a></li>
72        {if isset($category.U_MANAGE_ELEMENTS) }
73        <li><a href="{$category.U_MANAGE_ELEMENTS}" title="{'manage album photos'|@translate}"><img src="{$themeconf.admin_icon_dir}/category_elements.png" class="button" alt="{'Photos'|@translate}"></a></li>
74        {/if}
75        <li><a href="{$category.U_CHILDREN}" title="{'manage sub-albums'|@translate}"><img src="{$themeconf.admin_icon_dir}/category_children.png" class="button" alt="{'sub-albums'|@translate}"></a></li>
76        {if isset($category.U_MANAGE_PERMISSIONS) }
77        <li><a href="{$category.U_MANAGE_PERMISSIONS}" title="{'edit album permissions'|@translate}" ><img src="{$themeconf.admin_icon_dir}/category_permissions.png" class="button" alt="{'Permissions'|@translate}"></a></li>
78        {/if}
79        {if isset($category.U_DELETE) }
80        <li><a href="{$category.U_DELETE}" title="{'delete album'|@translate}" onclick="return confirm('{'Are you sure?'|@translate|@escape:javascript}');"><img src="{$themeconf.admin_icon_dir}/category_delete.png" class="button" alt="{'delete album'|@translate}"></a></li>
81        {/if}
82      </ul>
83
84      <p>
85      <img src="{$themeconf.admin_icon_dir}/cat_move.png" class="button drag_button" style="display:none;" alt="{'Drag to re-order'|@translate}" title="{'Drag to re-order'|@translate}">
86      <strong><a href="{$category.U_CHILDREN}" title="{'manage sub-albums'|@translate}">{$category.NAME}</a></strong>
87      {if $category.IS_VIRTUAL}
88      <img src="{$themeconf.admin_icon_dir}/virt_category.png" class="button" alt="{'Virtual album'|@translate}">
89      {/if}
90      </p>
91
92      <p class="catPos">
93        <label>
94          {'Position'|@translate} :
95          <input type="text" size="4" name="catOrd[{$category.ID}]" maxlength="4" value="{$category.RANK}">
96        </label>
97      </p>
98
99    </li>
100    {/foreach}
101  </ul>
102</form>
103{/if}
Note: See TracBrowser for help on using the repository browser.