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

Last change on this file since 28500 was 28500, checked in by mistic100, 10 years ago

feature 2679 : allow to change creation time

  • Property svn:eol-style set to LF
File size: 5.6 KB
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 LocalStorageCache('categoriesAdminList', 5*60, function(callback) {
14  jQuery.getJSON('{$ROOT_URL}ws.php?format=json&method=pwg.categories.getAdminList', function(data) {
15    callback(data.result.categories);
16  });
17});
18
19jQuery('[data-selectize=categories]').selectize({
20  valueField: 'id',
21  labelField: 'fullname',
22  searchField: ['fullname'],
23  plugins: ['remove_button']
24});
25
26categoriesCache.get(function(categories) {
27  jQuery('[data-selectize=categories]').each(function() {
28    this.selectize.load(function(callback) {
29      callback(categories);
30    });
31
32    jQuery.each(jQuery(this).data('value'), jQuery.proxy(function(i, id) {
33      this.selectize.addItem(id);
34    }, this));
35  });
36});
37
38{* <!-- TAGS --> *}
39var tagsCache = new LocalStorageCache('tagsAdminList', 5*60, function(callback) {
40  jQuery.getJSON('{$ROOT_URL}ws.php?format=json&method=pwg.tags.getAdminList', function(data) {
41    var tags = data.result.tags;
42   
43    for (var i=0, l=tags.length; i<l; i++) {
44      tags[i].id = '~~' + tags[i].id + '~~';
45    }
46   
47    callback(tags);
48  });
49});
50
51jQuery('[data-selectize=tags]').selectize({
52  valueField: 'id',
53  labelField: 'name',
54  searchField: ['name'],
55  plugins: ['remove_button'],
56  create: function(input, callback) {
57    tagsCache.clear();
58   
59    callback({
60      id: input,
61      name: input
62    });
63  }
64});
65
66tagsCache.get(function(tags) {
67  jQuery('[data-selectize=tags]').each(function() {
68    this.selectize.load(function(callback) {
69      callback(tags);
70    });
71
72    jQuery.each(jQuery(this).data('value'), jQuery.proxy(function(i, tag) {
73      this.selectize.addItem(tag.id);
74    }, this));
75  });
76});
77
78{* <!-- DATEPICKER --> *}
79jQuery(function(){ {* <!-- onLoad needed to wait localization loads --> *}
80  jQuery('[data-datepicker]').pwgDatepicker({ showTimepicker: true });
81});
82}());
83{/footer_script}
84
85<h2>{$TITLE} &#8250; {'Edit photo'|@translate} {$TABSHEET_TITLE}</h2>
86
87<form action="{$F_ACTION}" method="post" id="catModify">
88
89  <fieldset>
90    <legend>{'Informations'|@translate}</legend>
91
92    <table>
93
94      <tr>
95        <td id="albumThumbnail">
96          <img src="{$TN_SRC}" alt="{'Thumbnail'|@translate}" class="Thumbnail">
97        </td>
98        <td id="albumLinks" style="width:400px;vertical-align:top;">
99          <ul style="padding-left:15px;margin:0;">
100            <li>{$INTRO.file}</li>
101            <li>{$INTRO.add_date}</li>
102            <li>{$INTRO.added_by}</li>
103            <li>{$INTRO.size}</li>
104            <li>{$INTRO.stats}</li>
105            <li>{$INTRO.id}</li>
106          </ul>
107        </td>
108        <td class="photoLinks">
109          <ul>
110          {if isset($U_JUMPTO) }
111            <li><a class="icon-eye" href="{$U_JUMPTO}">{'jump to photo'|@translate} →</a></li>
112          {/if}
113          {if !url_is_remote($PATH)}
114            <li><a class="icon-arrows-cw" href="{$U_SYNC}">{'Synchronize metadata'|@translate}</a></li>
115
116            <li><a class="icon-trash" href="{$U_DELETE}" onclick="return confirm('{'Are you sure?'|@translate|@escape:javascript}');">{'delete photo'|@translate}</a></li>
117          {/if}
118          </ul>
119        </td>
120      </tr>
121    </table>
122
123  </fieldset>
124
125  <fieldset>
126    <legend>{'Properties'|@translate}</legend>
127
128    <p>
129      <strong>{'Title'|@translate}</strong>
130      <br>
131      <input type="text" class="large" name="name" value="{$NAME|@escape}">
132    </p>
133
134    <p>
135      <strong>{'Author'|@translate}</strong>
136      <br>
137      <input type="text" class="large" name="author" value="{$AUTHOR}">
138    </p>
139
140    <p>
141      <strong>{'Creation date'|@translate}</strong>
142      <br>
143      <input type="hidden" name="date_creation" value="{$DATE_CREATION}">
144      <label>
145        <i class="icon-calendar"></i>
146        <input type="text" data-datepicker="date_creation" data-datepicker-unset="date_creation_unset" readonly>
147      </label>
148      <a href="#" class="icon-cancel-circled" id="date_creation_unset">{'unset'|translate}</a>
149    </p>
150
151    <p>
152      <strong>{'Linked albums'|@translate}</strong>
153      <br>
154      <select data-selectize="categories" data-value="{$associate_options_selected|@json_encode|escape:html}"
155        name="associate[]" multiple style="width:600px;" ></select>
156    </p>
157
158    <p>
159      <strong>{'Representation of albums'|@translate}</strong>
160      <br>
161      <select data-selectize="categories" data-value="{$represent_options_selected|@json_encode|escape:html}"
162        name="represent[]" multiple style="width:600px;" ></select>
163    </p>
164
165    <p>
166      <strong>{'Tags'|@translate}</strong>
167      <br>
168      <select data-selectize="tags" data-value="{$tag_selection|@json_encode|escape:html}"
169        name="tags[]" multiple style="width:600px;" ></select>
170    </p>
171
172    <p>
173      <strong>{'Description'|@translate}</strong>
174      <br>
175      <textarea name="description" id="description" class="description">{$DESCRIPTION}</textarea>
176    </p>
177
178    <p>
179      <strong>{'Who can see this photo?'|@translate}</strong>
180      <br>
181      <select name="level" size="1">
182        {html_options options=$level_options selected=$level_options_selected}
183      </select>
184   </p>
185
186  <p style="margin:40px 0 0 0">
187    <input class="submit" type="submit" value="{'Save Settings'|@translate}" name="submit">
188  </p>
189</fieldset>
190
191</form>
Note: See TracBrowser for help on using the repository browser.