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

Revision 13077, 4.7 KB checked in by plg, 8 years ago (diff)

feature 2564: redesign on photo administration screen.

  • one screen with several tabs (for now: properties + coi)
  • double select boxes for album associations and representation have been converted to simple multiple select boxes with jQuery Chosen
  • more details about the photo in an introduction text
  • 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='jquery.chosen' load='footer' path='themes/default/js/plugins/chosen.jquery.min.js'}
6{combine_css path="themes/default/js/plugins/chosen.css"}
7
8{footer_script}{literal}
9jQuery(document).ready(function() {
10  jQuery(".chzn-select").chosen();
11});
12{/literal}{/footer_script}
13
14{combine_script id='jquery.tokeninput' load='async' require='jquery' path='themes/default/js/plugins/jquery.tokeninput.js'}
15{footer_script require='jquery.tokeninput'}
16jQuery(document).ready(function() {ldelim}
17  jQuery("#tags").tokenInput(
18    [{foreach from=$tags item=tag name=tags}{ldelim}"name":"{$tag.name|@escape:'javascript'}","id":"{$tag.id}"{rdelim}{if !$smarty.foreach.tags.last},{/if}{/foreach}],
19    {ldelim}
20      hintText: '{'Type in a search term'|@translate}',
21      noResultsText: '{'No results'|@translate}',
22      searchingText: '{'Searching...'|@translate}',
23      newText: ' ({'new'|@translate})',
24      animateDropdown: false,
25      preventDuplicates: true,
26      allowCreation: true
27    }
28  );
29});
30{/footer_script}
31
32{footer_script}
33pwg_initialization_datepicker("#date_creation_day", "#date_creation_month", "#date_creation_year", "#date_creation_linked_date", "#date_creation_action_set");
34{/footer_script}
35
36<h2>{$TITLE} &#8250; {'Edit photo'|@translate} {$TABSHEET_TITLE}</h2>
37
38<form action="{$F_ACTION}" method="post" id="catModify">
39
40  <fieldset>
41    <legend>{'Informations'|@translate}</legend>
42
43    <table>
44
45      <tr>
46        <td id="albumThumbnail">
47<img src="{$TN_SRC}" alt="{'Thumbnail'|@translate}" class="Thumbnail">
48        </td>
49
50        <td id="albumLinks">
51<p style="text-align:left">{$INTRO}</p>
52
53<ul style="padding-left:15px;">
54{if isset($U_JUMPTO) }
55  <li><a href="{$U_JUMPTO}">{'jump to photo'|@translate} →</a></li>
56{/if}
57
58{if !url_is_remote($PATH)}
59  <li><a href="{$U_SYNC}">{'Synchronize metadata'|@translate}</a></li>
60
61  <li><a href="{$U_DELETE}" onclick="return confirm('{'Are you sure?'|@translate|@escape:javascript}');">{'delete photo'|@translate}</a></li>
62  {/if}
63
64</ul>
65        </td>
66      </tr>
67    </table>
68
69  </fieldset>
70
71  <fieldset>
72    <legend>{'Properties'|@translate}</legend>
73
74    <p>
75      <strong>{'Title'|@translate}</strong>
76      <br>
77      <input type="text" class="large" name="name" value="{$NAME}">
78    </p>
79
80    <p>
81      <strong>{'Author'|@translate}</strong>
82      <br>
83      <input type="text" class="large" name="author" value="{$AUTHOR}">
84    </p>
85
86    <p>
87      <strong>{'Creation date'|@translate}</strong>
88      <br>
89      <select id="date_creation_day" name="date_creation_day">
90        <option value="0">--</option>
91{section name=day start=1 loop=32}
92        <option value="{$smarty.section.day.index}" {if $smarty.section.day.index==$DATE_CREATION_DAY_VALUE}selected="selected"{/if}>{$smarty.section.day.index}</option>
93{/section}
94      </select>
95
96      <select id="date_creation_month" name="date_creation_month">
97        {html_options options=$month_list selected=$DATE_CREATION_MONTH_VALUE}
98      </select>
99
100      <input id="date_creation_year" name="date_creation_year" type="text" size="4" maxlength="4" value="{$DATE_CREATION_YEAR_VALUE}">
101      <input id="date_creation_linked_date" name="date_creation_linked_date" type="hidden" size="10" disabled="disabled">
102    <a href="#" id="unset_date_creation" style="display:none">unset</a>
103    </p>
104
105    <p>
106      <strong>{'Linked albums'|@translate}</strong>
107      <br>
108      <select data-placeholder="Select albums..." class="chzn-select" multiple style="width:700px;" name="associate[]">
109        {html_options options=$associate_options selected=$associate_options_selected}
110      </select>
111    </p>
112
113    <p>
114      <strong>{'Representation of albums'|@translate}</strong>
115      <br>
116      <select data-placeholder="Select albums..." class="chzn-select" multiple style="width:700px;" name="represent[]">
117        {html_options options=$represent_options selected=$represent_options_selected}
118      </select>
119    </p>
120
121    <p>
122      <strong>{'Tags'|@translate}</strong>
123      <br>
124<select id="tags" name="tags">
125{foreach from=$tag_selection item=tag}
126  <option value="{$tag.id}" class="selected">{$tag.name}</option>
127{/foreach}
128</select>
129    </p>
130
131    <p>
132      <strong>{'Description'|@translate}</strong>
133      <br>
134      <textarea name="description" id="description" class="description">{$DESCRIPTION}</textarea>
135    </p>
136
137    <p>
138      <strong>{'Who can see this photo?'|@translate}</strong>
139      <br>
140      <select name="level" size="1">
141        {html_options options=$level_options selected=$level_options_selected}
142      </select>
143   </p>
144
145  <p style="margin:40px 0 0 0">
146    <input class="submit" type="submit" value="{'Save Settings'|@translate}" name="submit">
147  </p>
148</fieldset>
149
150</form>
Note: See TracBrowser for help on using the repository browser.