1 | {include file='include/autosize.inc.tpl'} |
---|
2 | {include file='include/datepicker.inc.tpl'} |
---|
3 | {include file='include/colorbox.inc.tpl'} |
---|
4 | |
---|
5 | {combine_script id='LocalStorageCache' load='footer' path='admin/themes/default/js/LocalStorageCache.js'} |
---|
6 | |
---|
7 | {combine_script id='jquery.selectize' load='footer' path='themes/default/js/plugins/selectize.min.js'} |
---|
8 | {combine_css id='jquery.selectize' path="themes/default/js/plugins/selectize.default.css"} |
---|
9 | |
---|
10 | {footer_script} |
---|
11 | (function(){ |
---|
12 | {* <!-- TAGS --> *} |
---|
13 | var tagsCache = new LocalStorageCache('tagsAdminList', 5*60, function(callback) { |
---|
14 | jQuery.getJSON('{$ROOT_URL}ws.php?format=json&method=pwg.tags.getAdminList', function(data) { |
---|
15 | var tags = data.result.tags; |
---|
16 | |
---|
17 | for (var i=0, l=tags.length; i<l; i++) { |
---|
18 | tags[i].id = '~~' + tags[i].id + '~~'; |
---|
19 | } |
---|
20 | |
---|
21 | callback(tags); |
---|
22 | }); |
---|
23 | }); |
---|
24 | |
---|
25 | jQuery('[data-selectize=tags]').selectize({ |
---|
26 | valueField: 'id', |
---|
27 | labelField: 'name', |
---|
28 | searchField: ['name'], |
---|
29 | plugins: ['remove_button'], |
---|
30 | create: function(input, callback) { |
---|
31 | tagsCache.clear(); |
---|
32 | |
---|
33 | callback({ |
---|
34 | id: input, |
---|
35 | name: input |
---|
36 | }); |
---|
37 | } |
---|
38 | }); |
---|
39 | |
---|
40 | tagsCache.get(function(tags) { |
---|
41 | jQuery('[data-selectize=tags]').each(function() { |
---|
42 | this.selectize.load(function(callback) { |
---|
43 | callback(tags); |
---|
44 | }); |
---|
45 | |
---|
46 | jQuery.each(jQuery(this).data('value'), jQuery.proxy(function(i, tag) { |
---|
47 | this.selectize.addItem(tag.id); |
---|
48 | }, this)); |
---|
49 | }); |
---|
50 | }); |
---|
51 | |
---|
52 | {* <!-- DATEPICKER --> *} |
---|
53 | jQuery(function(){ {* <!-- onLoad needed to wait localization loads --> *} |
---|
54 | jQuery('[data-datepicker]').pwgDatepicker(); |
---|
55 | }); |
---|
56 | |
---|
57 | {* <!-- THUMBNAILS --> *} |
---|
58 | $(".elementEdit img") |
---|
59 | .css("opacity", 0.6) // Opacity on page load |
---|
60 | .hover(function(){ |
---|
61 | $(this).fadeTo("slow", 1.0); // Opacity on hover |
---|
62 | },function(){ |
---|
63 | $(this).fadeTo("slow", 0.6); // Opacity on mouseout |
---|
64 | }); |
---|
65 | }()); |
---|
66 | {/footer_script} |
---|
67 | |
---|
68 | <h2>{'Batch Manager'|@translate}</h2> |
---|
69 | |
---|
70 | <form action="{$F_ACTION}" method="POST"> |
---|
71 | <fieldset> |
---|
72 | <legend>{'Display options'|@translate}</legend> |
---|
73 | <p>{'photos per page'|@translate} : |
---|
74 | <a href="{$U_ELEMENTS_PAGE}&display=5">5</a> |
---|
75 | | <a href="{$U_ELEMENTS_PAGE}&display=10">10</a> |
---|
76 | | <a href="{$U_ELEMENTS_PAGE}&display=50">50</a> |
---|
77 | | <a href="{$U_ELEMENTS_PAGE}&display=all">{'all'|@translate}</a> |
---|
78 | </p> |
---|
79 | |
---|
80 | </fieldset> |
---|
81 | |
---|
82 | {if !empty($navbar) }{include file='navigation_bar.tpl'|@get_extent:'navbar'}{/if} |
---|
83 | |
---|
84 | {if !empty($elements) } |
---|
85 | <div><input type="hidden" name="element_ids" value="{$ELEMENT_IDS}"></div> |
---|
86 | {foreach from=$elements item=element} |
---|
87 | <fieldset class="elementEdit"> |
---|
88 | <legend>{$element.LEGEND}</legend> |
---|
89 | |
---|
90 | <span class="thumb"> |
---|
91 | <a href="{$element.FILE_SRC}" class="preview-box" title="{$element.LEGEND|@htmlspecialchars}"><img src="{$element.TN_SRC}" alt=""></a> |
---|
92 | <br/> |
---|
93 | <a href="{$element.U_EDIT}">{'Edit'|@translate}</a> |
---|
94 | </span> |
---|
95 | |
---|
96 | <table> |
---|
97 | |
---|
98 | <tr> |
---|
99 | <td><strong>{'Title'|@translate}</strong></td> |
---|
100 | <td><input type="text" class="large" name="name-{$element.id}" value="{$element.NAME}"></td> |
---|
101 | </tr> |
---|
102 | |
---|
103 | <tr> |
---|
104 | <td><strong>{'Author'|@translate}</strong></td> |
---|
105 | <td><input type="text" class="large" name="author-{$element.id}" value="{$element.AUTHOR}"></td> |
---|
106 | </tr> |
---|
107 | |
---|
108 | <tr> |
---|
109 | <td><strong>{'Creation date'|@translate}</strong></td> |
---|
110 | <td> |
---|
111 | <input type="hidden" name="date_creation-{$element.id}" value="{$element.DATE_CREATION}"> |
---|
112 | <label> |
---|
113 | <i class="icon-calendar"></i> |
---|
114 | <input type="text" data-datepicker="date_creation-{$element.id}" data-datepicker-unset="date_creation_unset-{$element.id}" readonly> |
---|
115 | </label> |
---|
116 | <a href="#" class="icon-cancel-circled" id="date_creation_unset-{$element.id}">{'unset'|translate}</a> |
---|
117 | </td> |
---|
118 | </tr> |
---|
119 | <tr> |
---|
120 | <td><strong>{'Who can see this photo?'|@translate}</strong></td> |
---|
121 | <td> |
---|
122 | <select name="level-{$element.id}"> |
---|
123 | {html_options options=$level_options selected=$element.LEVEL} |
---|
124 | </select> |
---|
125 | </td> |
---|
126 | </tr> |
---|
127 | |
---|
128 | <tr> |
---|
129 | <td><strong>{'Tags'|@translate}</strong></td> |
---|
130 | <td> |
---|
131 | <select data-selectize="tags" data-value="{$element.TAGS|@json_encode|escape:html}" |
---|
132 | name="tags-{$element.id}[]" multiple style="width:500px;" ></select> |
---|
133 | </td> |
---|
134 | </tr> |
---|
135 | |
---|
136 | <tr> |
---|
137 | <td><strong>{'Description'|@translate}</strong></td> |
---|
138 | <td><textarea cols="50" rows="5" name="description-{$element.id}" id="description-{$element.id}" class="description">{$element.DESCRIPTION}</textarea></td> |
---|
139 | </tr> |
---|
140 | |
---|
141 | </table> |
---|
142 | |
---|
143 | </fieldset> |
---|
144 | {/foreach} |
---|
145 | |
---|
146 | {if !empty($navbar)}{include file='navigation_bar.tpl'|@get_extent:'navbar'}{/if} |
---|
147 | |
---|
148 | <p> |
---|
149 | <input type="submit" value="{'Submit'|@translate}" name="submit"> |
---|
150 | <input type="reset" value="{'Reset'|@translate}"> |
---|
151 | </p> |
---|
152 | {/if} |
---|
153 | |
---|
154 | </form> |
---|