[9737] | 1 | {html_head}{literal} |
---|
[3609] | 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> |
---|
[9737] | 17 | {/literal}{/html_head} |
---|
[3609] | 18 | |
---|
[9737] | 19 | {footer_script require='jquery.ui.sortable} |
---|
| 20 | |
---|
| 21 | {literal} |
---|
| 22 | jQuery().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 |
---|
[3609] | 29 | }); |
---|
[9737] | 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} |
---|
[3609] | 39 | |
---|
[9737] | 40 | {/footer_script} |
---|
| 41 | |
---|
[3609] | 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}"> |
---|
[9369] | 52 | {if !empty($module.PATH)} |
---|
[3609] | 53 | <ul class="categoryActions"> |
---|
| 54 | <li class="stuffs_line"> |
---|
| 55 | {'stuffs_id_ligne'|@translate} |
---|
| 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} |
---|
| 62 | <input type="text" size="2" maxlength="2" value="{$module.WIDTH}" name="width[{$module.ID}]" > % |
---|
| 63 | </li> |
---|
[9449] | 64 | {if empty($module.MISSING)} |
---|
[3609] | 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> |
---|
[9369] | 66 | {/if} |
---|
[3609] | 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> |
---|
[7855] | 71 | {/if} |
---|
[3609] | 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}"/> |
---|
[9369] | 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)} - {$module.TYPE_NAME}{/if} |
---|
[3609] | 77 | </p> |
---|
| 78 | |
---|
[9449] | 79 | {if !empty($module.MISSING)} |
---|
| 80 | <p style="margin-left: 30px;">{$module.MISSING}</p> |
---|
[9369] | 81 | {elseif !empty($module.DESC)} |
---|
[7340] | 82 | <p style="margin-left: 30px;"><i>{$module.DESC}</i></p> |
---|
[9369] | 83 | {elseif empty($module.PATH)} |
---|
[7855] | 84 | <p style="margin-left: 30px;"><input name="hidemb" type="checkbox" {if $HIDEMB}checked="checked"{/if}> {'Hide on home page'|@translate}</p> |
---|
[3609] | 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 /> |
---|
[9737] | 99 | <input class="submit" name="submitOrder" type="submit" value="{'Save order'|@translate}" /> |
---|
[3609] | 100 | </p> |
---|
| 101 | </form> |
---|