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 | <li class="stuffs_line"> |
---|
56 | {'stuffs_id_ligne'|@translate} |
---|
57 | <select name="id_line[{$module.ID}]"> |
---|
58 | {html_options options=$module.ID_LINE_OPTIONS selected=$module.ID_LINE_SELECTED} |
---|
59 | </select> |
---|
60 | </li> |
---|
61 | <li class="stuffs_line"> |
---|
62 | {'stuffs_width'|@translate} |
---|
63 | <input type="text" size="2" maxlength="2" value="{$module.WIDTH}" name="width[{$module.ID}]" > % |
---|
64 | </li> |
---|
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 !empty($module.U_DELETE) } |
---|
67 | <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> |
---|
68 | {/if} |
---|
69 | </ul> |
---|
70 | {/if} |
---|
71 | |
---|
72 | <p> |
---|
73 | <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}"/> |
---|
74 | <strong>{if $module.TYPE == 'MainBlock'}<span class="MainBlock">{$module.NAME}</span>{else}<a href="{$module.U_EDIT}">{$module.NAME}</a>{/if}</strong> |
---|
75 | {if $module.TYPE != 'MainBlock'} - {$module.TYPE_NAME}{/if} |
---|
76 | </p> |
---|
77 | |
---|
78 | {if !empty($module.DESC)} |
---|
79 | <p style="margin-left: 30px;"><i>{$module.DESC}</i></p> |
---|
80 | {elseif $module.TYPE == 'MainBlock'} |
---|
81 | <p style="margin-left: 30px;"><input name="hidemb" type="checkbox" {if $HIDEMB}checked="checked"{/if}> {'Hide on home page'|@translate}</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> |
---|