1 | {footer_script require='jquery'} |
---|
2 | jQuery("#addAlbumOpen").click(function(){ |
---|
3 | jQuery("#createAlbum").toggle(); |
---|
4 | jQuery("input[name=virtual_name]").focus(); |
---|
5 | jQuery("#autoOrder").hide(); |
---|
6 | }); |
---|
7 | |
---|
8 | jQuery("#addAlbumClose").click(function(){ |
---|
9 | jQuery("#createAlbum").hide(); |
---|
10 | }); |
---|
11 | {/footer_script} |
---|
12 | |
---|
13 | |
---|
14 | <div class="titrePage"> |
---|
15 | <h2>SmartAlbums</h2> |
---|
16 | </div> |
---|
17 | |
---|
18 | <form id="categoryOrdering" action="{$F_ACTION}" method="post"> |
---|
19 | <input type="hidden" name="pwg_token" value="{$PWG_TOKEN}"> |
---|
20 | |
---|
21 | <p class="showCreateAlbum"> |
---|
22 | <span id="notManualOrder"> |
---|
23 | <a href="#" id="addAlbumOpen">{'create a new SmartAlbum'|translate}</a> |
---|
24 | | <a href="{$F_ACTION}&smart_generate=all">{'Regenerate photos list of all SmartAlbums'|translate}</a> |
---|
25 | </span> |
---|
26 | </p> |
---|
27 | |
---|
28 | <fieldset id="createAlbum" style="display:none;"> |
---|
29 | <legend>{'create a new SmartAlbum'|translate}</legend> |
---|
30 | <input type="hidden" name="pwg_token" value="{$PWG_TOKEN}"> |
---|
31 | |
---|
32 | <p> |
---|
33 | <strong>{'Album name'|translate}</strong> : |
---|
34 | <input type="text" name="virtual_name"> |
---|
35 | </p> |
---|
36 | <p> |
---|
37 | <strong>{'Parent album'|translate}</strong> : |
---|
38 | <select class="categoryDropDown" name="parent_id"> |
---|
39 | <option value="0">------------</option> |
---|
40 | {html_options options=$category_options} |
---|
41 | </select> |
---|
42 | </p> |
---|
43 | <p class="actionButtons"> |
---|
44 | <input class="submit" type="submit" value="{'Create'|translate}" name="submitAdd"> |
---|
45 | <a href="#" id="addAlbumClose">{'Cancel'|translate}</a> |
---|
46 | </p> |
---|
47 | </fieldset> |
---|
48 | |
---|
49 | {if count($categories) } |
---|
50 | |
---|
51 | <ul class="categoryUl"> |
---|
52 | |
---|
53 | {foreach from=$categories item=category} |
---|
54 | <li class="categoryLi virtual_cat" id="cat_{$category.ID}"> |
---|
55 | <!-- category {$category.ID} --> |
---|
56 | <p class="albumTitle"> |
---|
57 | <strong><a href="{$category.U_CHILDREN}" title="{'manage sub-albums'|translate}">{$category.NAME}</a></strong> |
---|
58 | <img src="{$SMART_PATH}admin/template/lightning.png"> |
---|
59 | {'%d photos'|translate:$category.IMG_COUNT} |
---|
60 | </p> |
---|
61 | |
---|
62 | <p class="albumActions"> |
---|
63 | <a href="{$category.U_EDIT}">{'Edit'|translate}</a> |
---|
64 | | <a href="{$category.U_SMART}" title="{$category.LAST_UPDATE}">{'Regenerate photos list of this SmartAlbum'|translate}</a> |
---|
65 | {if isset($category.U_DELETE) } |
---|
66 | | <a href="{$category.U_DELETE}" onclick="return confirm('{'Are you sure?'|translate|escape:javascript}');">{'delete album'|translate}</a> |
---|
67 | {/if} |
---|
68 | {if cat_admin_access($category.ID)} |
---|
69 | | <a href="{$category.U_JUMPTO}">{'jump to album'|translate} ?</a> |
---|
70 | {/if} |
---|
71 | </p> |
---|
72 | </li> |
---|
73 | {/foreach} |
---|
74 | </ul> |
---|
75 | {/if} |
---|
76 | </form> |
---|