source: extensions/PWG_Stuffs/trunk/admin/template/manage.tpl @ 9737

Revision 9737, 3.3 KB checked in by patdenice, 9 years ago (diff)

Compatible 2.2

Line 
1{html_head}{literal}
2<style type="text/css">
3#categoryOrdering li {
4  height: 60px;
5}
6#categoryOrdering p {
7  margin-bottom: 0 !important;
8  margin-top: 0.5em !important;
9}
10.stuffs_line {
11  margin: 0 10px;
12}
13.MainBlock {
14  color: #ff3363;
15}
16</style>
17{/literal}{/html_head}
18
19{footer_script require='jquery.ui.sortable}
20
21{literal}
22jQuery().ready(function(){
23  jQuery(".catPos").hide();
24  jQuery(".drag_button").show();
25  jQuery(".categoryLi").css("cursor","move");
26  jQuery(".categoryUl").sortable({
27    axis: "y",
28    opacity: 0.8
29  });
30  jQuery("#categoryOrdering").submit(function(){
31    ar = jQuery('.categoryUl').sortable('toArray');
32    for(i=0;i<ar.length;i++) {
33      module = ar[i].split('module_');
34      document.getElementsByName('position[' + module[1] + ']')[0].value = i;
35    }
36  });
37});
38{/literal}
39
40{/footer_script}
41
42<div class="titrePage">
43  <h2>PWG Stuffs</h2>
44</div>
45
46<form id="categoryOrdering" method="post" action="">
47
48        <ul class="categoryUl">
49  {foreach from=$modules item=module}
50
51    <li class="categoryLi virtual_cat" id="module_{$module.ID}">
52      {if !empty($module.PATH)}
53      <ul class="categoryActions">
54        <li class="stuffs_line">
55          {'stuffs_id_ligne'|@translate}&nbsp;
56          <select name="id_line[{$module.ID}]">
57          {html_options options=$module.ID_LINE_OPTIONS selected=$module.ID_LINE_SELECTED}
58          </select>
59        </li>
60        <li class="stuffs_line">
61          {'stuffs_width'|@translate}&nbsp;
62          <input type="text" size="2" maxlength="2" value="{$module.WIDTH}" name="width[{$module.ID}]" > %
63        </li>
64        {if empty($module.MISSING)}
65        <li><a href="{$module.U_EDIT}" title="{'stuffs_edit'|@translate}"><img src="{$themeconf.admin_icon_dir}/category_edit.png" class="button" alt="{'stuffs_edit'|@translate}"/></a></li>
66        {/if}
67        {if !empty($module.U_DELETE) }
68        <li><a href="{$module.U_DELETE}" title="{'stuffs_delete'|@translate}" onclick="return confirm('{'Are you sure?'|@translate|@escape:javascript}');"><img src="{$themeconf.admin_icon_dir}/category_delete.png" class="button" alt="{'stuffs_delete'|@translate}" /></a></li>
69        {/if}
70      </ul>
71      {/if}
72
73      <p>
74      <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}"/>
75      <strong>{if empty($module.PATH)}<span class="MainBlock">{$module.NAME}</span>{else}<a href="{$module.U_EDIT}">{$module.NAME}</a>{/if}</strong>
76      {if !empty($module.TYPE_NAME)}&nbsp;-  &nbsp;{$module.TYPE_NAME}{/if}
77      </p>
78
79      {if !empty($module.MISSING)}
80        <p style="margin-left: 30px;">{$module.MISSING}</p>
81      {elseif !empty($module.DESC)}
82        <p style="margin-left: 30px;"><i>{$module.DESC}</i></p>
83      {elseif empty($module.PATH)}
84        <p style="margin-left: 30px;"><input name="hidemb" type="checkbox" {if $HIDEMB}checked="checked"{/if}> &nbsp;{'Hide on home page'|@translate}</p>
85      {/if}
86
87      <p class="catPos">
88        <label>
89          {'Position'|@translate}
90          <input type="text" size="4" name="position[{$module.ID}]" maxlength="4" value="{$module.POS}" />
91        </label>
92      </p>
93    </li>
94    {/foreach}
95  </ul>
96
97  <p style="text-align: center;">
98  <br />
99    <input class="submit" name="submitOrder" type="submit" value="{'Save order'|@translate}" />
100  </p>
101</form>
Note: See TracBrowser for help on using the repository browser.