1 | {known_script id="jquery.ui" src=$ROOT_URL|@cat:"themes/default/js/ui/packed/ui.core.packed.js" } |
---|
2 | {known_script id="jquery.ui.sortable" src=$ROOT_URL|@cat:"themes/default/js/ui/packed/ui.sortable.packed.js" } |
---|
3 | |
---|
4 | {html_head} |
---|
5 | {literal} |
---|
6 | <style type="text/css"> |
---|
7 | #categoryOrdering li { |
---|
8 | height: 60px; |
---|
9 | } |
---|
10 | #categoryOrdering p { |
---|
11 | margin-bottom: 0 !important; |
---|
12 | margin-top: 0.5em !important; |
---|
13 | } |
---|
14 | .stuffs_line { |
---|
15 | margin: 0 10px; |
---|
16 | } |
---|
17 | .MainBlock { |
---|
18 | color: #ff3363; |
---|
19 | } |
---|
20 | </style> |
---|
21 | {/literal} |
---|
22 | {/html_head} |
---|
23 | |
---|
24 | <script type="text/javascript"> |
---|
25 | jQuery().ready(function(){ldelim} |
---|
26 | jQuery(".catPos").hide(); |
---|
27 | jQuery(".drag_button").show(); |
---|
28 | jQuery(".categoryLi").css("cursor","move"); |
---|
29 | jQuery(".categoryUl").sortable({ldelim} |
---|
30 | axis: "y", |
---|
31 | opacity: 0.8 |
---|
32 | }); |
---|
33 | jQuery("#categoryOrdering").submit(function(){ldelim} |
---|
34 | ar = jQuery('.categoryUl').sortable('toArray'); |
---|
35 | for(i=0;i<ar.length;i++) {ldelim} |
---|
36 | module = ar[i].split('module_'); |
---|
37 | document.getElementsByName('position[' + module[1] + ']')[0].value = i; |
---|
38 | } |
---|
39 | }); |
---|
40 | }); |
---|
41 | </script> |
---|
42 | |
---|
43 | <div class="titrePage"> |
---|
44 | <h2>PWG Stuffs</h2> |
---|
45 | </div> |
---|
46 | |
---|
47 | <form id="categoryOrdering" method="post" action=""> |
---|
48 | |
---|
49 | <ul class="categoryUl"> |
---|
50 | {foreach from=$modules item=module} |
---|
51 | |
---|
52 | <li class="categoryLi virtual_cat" id="module_{$module.ID}"> |
---|
53 | {if $module.TYPE != 'MainBlock'} |
---|
54 | <ul class="categoryActions"> |
---|
55 | {if $module.TYPE != 'MainBlock'} |
---|
56 | <li class="stuffs_line"> |
---|
57 | {'stuffs_id_ligne'|@translate} |
---|
58 | <select name="id_line[{$module.ID}]"> |
---|
59 | {html_options options=$module.ID_LINE_OPTIONS selected=$module.ID_LINE_SELECTED} |
---|
60 | </select> |
---|
61 | </li> |
---|
62 | <li class="stuffs_line"> |
---|
63 | {'stuffs_width'|@translate} |
---|
64 | <input type="text" size="2" maxlength="2" value="{$module.WIDTH}" name="width[{$module.ID}]" > % |
---|
65 | </li> |
---|
66 | {/if} |
---|
67 | <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> |
---|
68 | {if !empty($module.U_DELETE) } |
---|
69 | <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> |
---|
70 | {/if} |
---|
71 | </ul> |
---|
72 | {/if} |
---|
73 | |
---|
74 | <p> |
---|
75 | <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}"/> |
---|
76 | <strong>{if $module.TYPE == 'MainBlock'}<span class="MainBlock">{$module.NAME}</span>{else}<a href="{$module.U_EDIT}">{$module.NAME}</a>{/if}</strong> |
---|
77 | {if $module.TYPE != 'MainBlock'} - {$module.TYPE_NAME}{/if} |
---|
78 | </p> |
---|
79 | |
---|
80 | {if !empty($module.DESC)} |
---|
81 | <p style="margin-left: 30px;"><i>{$module.DESC}</i></p> |
---|
82 | {/if} |
---|
83 | |
---|
84 | <p class="catPos"> |
---|
85 | <label> |
---|
86 | {'Position'|@translate} |
---|
87 | <input type="text" size="4" name="position[{$module.ID}]" maxlength="4" value="{$module.POS}" /> |
---|
88 | </label> |
---|
89 | </p> |
---|
90 | </li> |
---|
91 | {/foreach} |
---|
92 | </ul> |
---|
93 | |
---|
94 | <p style="text-align: center;"> |
---|
95 | <br /> |
---|
96 | <input class="submit" name="submitOrder" type="submit" value="{'Save order'|@translate}" {$TAG_INPUT_ENABLED} /> |
---|
97 | </p> |
---|
98 | </form> |
---|
99 | |
---|
100 | |
---|
101 | |
---|
102 | {* |
---|
103 | <legend>{'stuffs_mods_management'|@translate}</legend> |
---|
104 | <table class="table2"> |
---|
105 | <thead> |
---|
106 | <tr class="throw"> |
---|
107 | <td>{'stuffs_module_title'|@translate}</td> |
---|
108 | <td>{'stuffs_desc'|@translate}</td> |
---|
109 | <td>{'stuffs_type'|@translate}</td> |
---|
110 | <td>{'stuffs_position'|@translate}</td> |
---|
111 | <td>{'stuffs_id_ligne'|@translate}</td> |
---|
112 | <td>{'stuffs_width'|@translate}</td> |
---|
113 | <td>{'stuffs_action'|@translate}</td> |
---|
114 | </tr> |
---|
115 | </thead> |
---|
116 | |
---|
117 | {foreach from=$modules item=module} |
---|
118 | <tr class="{$module.CLASS}" height="28"> |
---|
119 | <td align="center">{$module.NAME}</td> |
---|
120 | <td align="center">{$module.DESC}</td> |
---|
121 | <td align="center">{$module.TYPE}</td> |
---|
122 | <td align="center"><input type="text" size="2" maxlength="2" value="{$module.POS}" name="position[{$module.ID}]"/></td> |
---|
123 | <td align="center">{$module.ID_LINE}</td> |
---|
124 | <td align="center">{$module.WIDTH}</td> |
---|
125 | <td align="center">{$module.ACTION}</td> |
---|
126 | </tr> |
---|
127 | {/foreach} |
---|
128 | *} |
---|