source: trunk/admin/themes/default/template/batch_manager_unit.tpl @ 28613

Revision 28613, 3.8 KB checked in by mistic100, 5 years ago (diff)

redefine selectize templates without escaping + translate "Add"

  • Property svn:eol-style set to LF
Line 
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 --> *}
13var tagsCache = new TagsCache({
14  serverKey: '{$CACHE_KEYS.tags}',
15  serverId: '{$CACHE_KEYS._hash}',
16  rootUrl: '{$ROOT_URL}'
17});
18
19tagsCache.selectize(jQuery('[data-selectize=tags]'), { lang: {
20  'Add': '{'Create'|translate}'
21}});
22
23{* <!-- DATEPICKER --> *}
24jQuery(function(){ {* <!-- onLoad needed to wait localization loads --> *}
25  jQuery('[data-datepicker]').pwgDatepicker({ showTimepicker: true });
26});
27
28{* <!-- THUMBNAILS --> *}
29jQuery("a.preview-box").colorbox();
30}());
31{/footer_script}
32
33<h2>{'Batch Manager'|@translate}</h2>
34
35<form action="{$F_ACTION}" method="POST">
36<fieldset>
37  <legend>{'Display options'|@translate}</legend>
38  <p>{'photos per page'|@translate} :
39      <a href="{$U_ELEMENTS_PAGE}&amp;display=5">5</a>
40    | <a href="{$U_ELEMENTS_PAGE}&amp;display=10">10</a>
41    | <a href="{$U_ELEMENTS_PAGE}&amp;display=50">50</a>
42    | <a href="{$U_ELEMENTS_PAGE}&amp;display=all">{'all'|@translate}</a>
43  </p>
44
45</fieldset>
46
47{if !empty($navbar) }{include file='navigation_bar.tpl'|@get_extent:'navbar'}{/if}
48
49{if !empty($elements) }
50<div><input type="hidden" name="element_ids" value="{$ELEMENT_IDS}"></div>
51{foreach from=$elements item=element}
52<fieldset class="elementEdit">
53  <legend>{$element.LEGEND}</legend>
54
55  <span class="thumb">
56    <a href="{$element.FILE_SRC}" class="preview-box" title="{$element.LEGEND|@htmlspecialchars}"><img src="{$element.TN_SRC}" alt=""></a>
57    <br/>
58    <a href="{$element.U_EDIT}">{'Edit'|@translate}</a>
59  </span>
60
61  <table>
62
63    <tr>
64      <td><strong>{'Title'|@translate}</strong></td>
65      <td><input type="text" class="large" name="name-{$element.id}" value="{$element.NAME}"></td>
66    </tr>
67
68    <tr>
69      <td><strong>{'Author'|@translate}</strong></td>
70      <td><input type="text" class="large" name="author-{$element.id}" value="{$element.AUTHOR}"></td>
71    </tr>
72
73    <tr>
74      <td><strong>{'Creation date'|@translate}</strong></td>
75      <td>
76        <input type="hidden" name="date_creation-{$element.id}" value="{$element.DATE_CREATION}">
77        <label>
78          <i class="icon-calendar"></i>
79          <input type="text" data-datepicker="date_creation-{$element.id}" data-datepicker-unset="date_creation_unset-{$element.id}" readonly>
80        </label>
81        <a href="#" class="icon-cancel-circled" id="date_creation_unset-{$element.id}">{'unset'|translate}</a>
82      </td>
83    </tr>
84    <tr>
85      <td><strong>{'Who can see this photo?'|@translate}</strong></td>
86      <td>
87        <select name="level-{$element.id}">
88          {html_options options=$level_options selected=$element.LEVEL}
89        </select>
90      </td>
91    </tr>
92
93    <tr>
94      <td><strong>{'Tags'|@translate}</strong></td>
95      <td>
96        <select data-selectize="tags" data-value="{$element.TAGS|@json_encode|escape:html}"
97          placeholder="{'Type in a search term'|translate}"
98          data-create="true" name="tags-{$element.id}[]" multiple style="width:500px;"></select>
99      </td>
100    </tr>
101
102    <tr>
103      <td><strong>{'Description'|@translate}</strong></td>
104      <td><textarea cols="50" rows="5" name="description-{$element.id}" id="description-{$element.id}" class="description">{$element.DESCRIPTION}</textarea></td>
105    </tr>
106
107  </table>
108
109</fieldset>
110{/foreach}
111
112{if !empty($navbar)}{include file='navigation_bar.tpl'|@get_extent:'navbar'}{/if}
113
114<p>
115  <input type="submit" value="{'Submit'|@translate}" name="submit">
116  <input type="reset" value="{'Reset'|@translate}">
117</p>
118{/if}
119
120</form>
Note: See TracBrowser for help on using the repository browser.