| 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 !empty($module.PATH)} |
|---|
| 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 | {if !$module.MISSING} |
|---|
| 66 | <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> |
|---|
| 67 | {/if} |
|---|
| 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 empty($module.PATH)}<span class="MainBlock">{$module.NAME}</span>{else}<a href="{$module.U_EDIT}">{$module.NAME}</a>{/if}</strong> |
|---|
| 77 | {if !empty($module.TYPE_NAME)} - {$module.TYPE_NAME}{/if} |
|---|
| 78 | </p> |
|---|
| 79 | |
|---|
| 80 | {if $module.MISSING} |
|---|
| 81 | <p style="margin-left: 30px;">{'stuffs_parent_plugin_is_missing'|@translate}</p> |
|---|
| 82 | {elseif !empty($module.DESC)} |
|---|
| 83 | <p style="margin-left: 30px;"><i>{$module.DESC}</i></p> |
|---|
| 84 | {elseif empty($module.PATH)} |
|---|
| 85 | <p style="margin-left: 30px;"><input name="hidemb" type="checkbox" {if $HIDEMB}checked="checked"{/if}> {'Hide on home page'|@translate}</p> |
|---|
| 86 | {/if} |
|---|
| 87 | |
|---|
| 88 | <p class="catPos"> |
|---|
| 89 | <label> |
|---|
| 90 | {'Position'|@translate} |
|---|
| 91 | <input type="text" size="4" name="position[{$module.ID}]" maxlength="4" value="{$module.POS}" /> |
|---|
| 92 | </label> |
|---|
| 93 | </p> |
|---|
| 94 | </li> |
|---|
| 95 | {/foreach} |
|---|
| 96 | </ul> |
|---|
| 97 | |
|---|
| 98 | <p style="text-align: center;"> |
|---|
| 99 | <br /> |
|---|
| 100 | <input class="submit" name="submitOrder" type="submit" value="{'Save order'|@translate}" {$TAG_INPUT_ENABLED} /> |
|---|
| 101 | </p> |
|---|
| 102 | </form> |
|---|