[7995] | 1 | {combine_script id='jquery.ui' load='async' require='jquery' path='themes/default/js/ui/packed/ui.core.packed.js' } |
---|
| 2 | {combine_script id='jquery.ui.sortable' load='async' require='jquery.ui' path='themes/default/js/ui/packed/ui.sortable.packed.js' } |
---|
| 3 | {footer_script require='jquery.ui.sortable'} |
---|
| 4 | jQuery(document).ready(function(){ldelim} |
---|
| 5 | jQuery(".catPos").hide(); |
---|
| 6 | jQuery(".drag_button").show(); |
---|
| 7 | jQuery(".categoryLi").css("cursor","move"); |
---|
| 8 | jQuery(".categoryUl").sortable({ldelim} |
---|
| 9 | axis: "y", |
---|
| 10 | opacity: 0.8 |
---|
| 11 | }); |
---|
| 12 | jQuery("#categoryOrdering").submit(function(){ldelim} |
---|
| 13 | ar = jQuery('.categoryUl').sortable('toArray'); |
---|
| 14 | for(i=0;i<ar.length;i++) {ldelim} |
---|
| 15 | cat = ar[i].split('cat_'); |
---|
| 16 | document.getElementsByName('catOrd[' + cat[1] + ']')[0].value = i; |
---|
| 17 | } |
---|
| 18 | }); |
---|
[2554] | 19 | |
---|
[7995] | 20 | jQuery("input[name=order_type]").click(function () {ldelim} |
---|
| 21 | jQuery("#automatic_order_params").hide(); |
---|
| 22 | if (jQuery("input[name=order_type]:checked").val() == "automatic") {ldelim} |
---|
| 23 | jQuery("#automatic_order_params").show(); |
---|
| 24 | } |
---|
| 25 | }); |
---|
| 26 | }); |
---|
| 27 | {/footer_script} |
---|
[6698] | 28 | |
---|
[6993] | 29 | <h2>{'Album list management'|@translate}</h2> |
---|
[2531] | 30 | |
---|
| 31 | <h3>{$CATEGORIES_NAV}</h3> |
---|
| 32 | |
---|
| 33 | <form id="addVirtual" action="{$F_ACTION}" method="post"> |
---|
| 34 | <p> |
---|
[5931] | 35 | <input type="hidden" name="pwg_token" value="{$PWG_TOKEN}"> |
---|
[6969] | 36 | {'Add a virtual album'|@translate} : <input type="text" name="virtual_name"> |
---|
[3185] | 37 | <input class="submit" type="submit" value="{'Submit'|@translate}" name="submitAdd" {$TAG_INPUT_ENABLED}> |
---|
[2531] | 38 | {if count($categories)>9 } |
---|
[2948] | 39 | <a href="#EoP" class="button" style="border:0;"> |
---|
[3185] | 40 | <img src="{$themeconf.admin_icon_dir}/page_end.png" title="{'Page end'|@translate}" class="button" alt="page_end" style="margin-bottom:-0.6em;"></a> |
---|
[2531] | 41 | {/if} |
---|
| 42 | </p> |
---|
| 43 | </form> |
---|
| 44 | |
---|
| 45 | {if count($categories) } |
---|
| 46 | <form id="categoryOrdering" action="{$F_ACTION}" method="post"> |
---|
[6698] | 47 | <input type="hidden" name="pwg_token" value="{$PWG_TOKEN}"> |
---|
| 48 | |
---|
| 49 | <div class="orderParams"> |
---|
[3185] | 50 | <input class="submit" name="submitOrder" type="submit" value="{'Save order'|@translate}" {$TAG_INPUT_ENABLED}> |
---|
[6698] | 51 | <label><input type="radio" name="order_type" value="manual" checked="checked"> {'manual order'|@translate}</label> |
---|
| 52 | <label><input type="radio" name="order_type" value="automatic"> {'automatic order'|@translate}</label> |
---|
| 53 | <span id="automatic_order_params" style="display:none"> |
---|
| 54 | <select name="ascdesc"> |
---|
| 55 | <option value="asc">{'ascending'|@translate}</option> |
---|
| 56 | <option value="desc">{'descending'|@translate}</option> |
---|
| 57 | </select> |
---|
[6969] | 58 | <label><input type="checkbox" name="recursive"> {'Apply to sub-albums'|@translate}</label> |
---|
[6698] | 59 | </span> |
---|
| 60 | </div> |
---|
| 61 | |
---|
[2531] | 62 | <ul class="categoryUl"> |
---|
| 63 | |
---|
| 64 | {foreach from=$categories item=category} |
---|
[2554] | 65 | <li class="categoryLi{if $category.IS_VIRTUAL} virtual_cat{/if}" id="cat_{$category.ID}"> |
---|
[2531] | 66 | <!-- category {$category.ID} --> |
---|
| 67 | <ul class="categoryActions"> |
---|
[2777] | 68 | {if cat_admin_access($category.ID)} |
---|
[6988] | 69 | <li><a href="{$category.U_JUMPTO}" title="{'jump to album'|@translate}"><img src="{$themeconf.admin_icon_dir}/category_jump-to.png" class="button" alt="{'jump to album'|@translate}"></a></li> |
---|
[2777] | 70 | {/if} |
---|
[6993] | 71 | <li><a href="{$category.U_EDIT}" title="{'edit album'|@translate}"><img src="{$themeconf.admin_icon_dir}/category_edit.png" class="button" alt="{'edit'|@translate}"></a></li> |
---|
[2531] | 72 | {if isset($category.U_MANAGE_ELEMENTS) } |
---|
[6988] | 73 | <li><a href="{$category.U_MANAGE_ELEMENTS}" title="{'manage album elements'|@translate}"><img src="{$themeconf.admin_icon_dir}/category_elements.png" class="button" alt="{'elements'|@translate}"></a></li> |
---|
[2531] | 74 | {/if} |
---|
[7024] | 75 | <li><a href="{$category.U_CHILDREN}" title="{'manage sub-albums'|@translate}"><img src="{$themeconf.admin_icon_dir}/category_children.png" class="button" alt="{'sub-albums'|@translate}"></a></li> |
---|
[2531] | 76 | {if isset($category.U_MANAGE_PERMISSIONS) } |
---|
[6988] | 77 | <li><a href="{$category.U_MANAGE_PERMISSIONS}" title="{'edit album permissions'|@translate}" ><img src="{$themeconf.admin_icon_dir}/category_permissions.png" class="button" alt="{'Permissions'|@translate}"></a></li> |
---|
[2531] | 78 | {/if} |
---|
| 79 | {if isset($category.U_DELETE) } |
---|
[6988] | 80 | <li><a href="{$category.U_DELETE}" title="{'delete album'|@translate}" onclick="return confirm('{'Are you sure?'|@translate|@escape:javascript}');"><img src="{$themeconf.admin_icon_dir}/category_delete.png" class="button" alt="{'delete album'|@translate}"></a></li> |
---|
[2531] | 81 | {/if} |
---|
| 82 | </ul> |
---|
| 83 | |
---|
| 84 | <p> |
---|
[3185] | 85 | <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}"> |
---|
[6988] | 86 | <strong><a href="{$category.U_CHILDREN}" title="{'manage sub-albums'|@translate}">{$category.NAME}</a></strong> |
---|
[2531] | 87 | {if $category.IS_VIRTUAL} |
---|
[7024] | 88 | <img src="{$themeconf.admin_icon_dir}/virt_category.png" class="button" alt="{'Virtual album'|@translate}"> |
---|
[2531] | 89 | {/if} |
---|
| 90 | </p> |
---|
| 91 | |
---|
[2554] | 92 | <p class="catPos"> |
---|
[2531] | 93 | <label> |
---|
| 94 | {'Position'|@translate} : |
---|
[3185] | 95 | <input type="text" size="4" name="catOrd[{$category.ID}]" maxlength="4" value="{$category.RANK}"> |
---|
[2531] | 96 | </label> |
---|
| 97 | </p> |
---|
| 98 | |
---|
| 99 | </li> |
---|
| 100 | {/foreach} |
---|
| 101 | </ul> |
---|
| 102 | </form> |
---|
| 103 | {/if} |
---|