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