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

Revision 9586, 4.7 KB checked in by patdenice, 9 years ago (diff)

feature:2114
Simplify all admin templates.

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