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

Revision 5529, 4.9 KB checked in by plg, 10 years ago (diff)

Fix missing keys: some keys have been removed by mistake during the massive
key conversion.

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