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