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

Revision 28613, 4.6 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/dbselect.inc.tpl'}
3{include file='include/datepicker.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{* <!-- CATEGORIES --> *}
13var categoriesCache = new CategoriesCache({
14  serverKey: '{$CACHE_KEYS.categories}',
15  serverId: '{$CACHE_KEYS._hash}',
16  rootUrl: '{$ROOT_URL}'
17});
18
19categoriesCache.selectize(jQuery('[data-selectize=categories]'));
20
21{* <!-- TAGS --> *}
22var tagsCache = new TagsCache({
23  serverKey: '{$CACHE_KEYS.tags}',
24  serverId: '{$CACHE_KEYS._hash}',
25  rootUrl: '{$ROOT_URL}'
26});
27
28tagsCache.selectize(jQuery('[data-selectize=tags]'), { lang: {
29  'Add': '{'Create'|translate}'
30}});
31
32{* <!-- DATEPICKER --> *}
33jQuery(function(){ {* <!-- onLoad needed to wait localization loads --> *}
34  jQuery('[data-datepicker]').pwgDatepicker({ showTimepicker: true });
35});
36}());
37{/footer_script}
38
39<h2>{$TITLE} &#8250; {'Edit photo'|@translate} {$TABSHEET_TITLE}</h2>
40
41<form action="{$F_ACTION}" method="post" id="catModify">
42
43  <fieldset>
44    <legend>{'Informations'|@translate}</legend>
45
46    <table>
47
48      <tr>
49        <td id="albumThumbnail">
50          <img src="{$TN_SRC}" alt="{'Thumbnail'|@translate}" class="Thumbnail">
51        </td>
52        <td id="albumLinks" style="width:400px;vertical-align:top;">
53          <ul style="padding-left:15px;margin:0;">
54            <li>{$INTRO.file}</li>
55            <li>{$INTRO.add_date}</li>
56            <li>{$INTRO.added_by}</li>
57            <li>{$INTRO.size}</li>
58            <li>{$INTRO.stats}</li>
59            <li>{$INTRO.id}</li>
60          </ul>
61        </td>
62        <td class="photoLinks">
63          <ul>
64          {if isset($U_JUMPTO) }
65            <li><a class="icon-eye" href="{$U_JUMPTO}">{'jump to photo'|@translate} →</a></li>
66          {/if}
67          {if !url_is_remote($PATH)}
68            <li><a class="icon-arrows-cw" href="{$U_SYNC}">{'Synchronize metadata'|@translate}</a></li>
69
70            <li><a class="icon-trash" href="{$U_DELETE}" onclick="return confirm('{'Are you sure?'|@translate|@escape:javascript}');">{'delete photo'|@translate}</a></li>
71          {/if}
72          </ul>
73        </td>
74      </tr>
75    </table>
76
77  </fieldset>
78
79  <fieldset>
80    <legend>{'Properties'|@translate}</legend>
81
82    <p>
83      <strong>{'Title'|@translate}</strong>
84      <br>
85      <input type="text" class="large" name="name" value="{$NAME|@escape}">
86    </p>
87
88    <p>
89      <strong>{'Author'|@translate}</strong>
90      <br>
91      <input type="text" class="large" name="author" value="{$AUTHOR}">
92    </p>
93
94    <p>
95      <strong>{'Creation date'|@translate}</strong>
96      <br>
97      <input type="hidden" name="date_creation" value="{$DATE_CREATION}">
98      <label>
99        <i class="icon-calendar"></i>
100        <input type="text" data-datepicker="date_creation" data-datepicker-unset="date_creation_unset" readonly>
101      </label>
102      <a href="#" class="icon-cancel-circled" id="date_creation_unset">{'unset'|translate}</a>
103    </p>
104
105    <p>
106      <strong>{'Linked albums'|@translate}</strong>
107      <br>
108      <select data-selectize="categories" data-value="{$associated_albums|@json_encode|escape:html}"
109        placeholder="{'Type in a search term'|translate}"
110        data-default="{$STORAGE_ALBUM}" name="associate[]" multiple style="width:600px;"></select>
111    </p>
112
113    <p>
114      <strong>{'Representation of albums'|@translate}</strong>
115      <br>
116      <select data-selectize="categories" data-value="{$represented_albums|@json_encode|escape:html}"
117        placeholder="{'Type in a search term'|translate}"
118        name="represent[]" multiple style="width:600px;"></select>
119    </p>
120
121    <p>
122      <strong>{'Tags'|@translate}</strong>
123      <br>
124      <select data-selectize="tags" data-value="{$tag_selection|@json_encode|escape:html}"
125        placeholder="{'Type in a search term'|translate}"
126        data-create="true" name="tags[]" multiple style="width:600px;"</select>
127    </p>
128
129    <p>
130      <strong>{'Description'|@translate}</strong>
131      <br>
132      <textarea name="description" id="description" class="description">{$DESCRIPTION}</textarea>
133    </p>
134
135    <p>
136      <strong>{'Who can see this photo?'|@translate}</strong>
137      <br>
138      <select name="level" size="1">
139        {html_options options=$level_options selected=$level_options_selected}
140      </select>
141   </p>
142
143  <p style="margin:40px 0 0 0">
144    <input class="submit" type="submit" value="{'Save Settings'|@translate}" name="submit">
145  </p>
146</fieldset>
147
148</form>
Note: See TracBrowser for help on using the repository browser.