source: trunk/themes/default/template/picture.tpl @ 8066

Last change on this file since 8066 was 8066, checked in by rvelices, 13 years ago

first sprite usage on picture page

  • Property svn:eol-style set to LF
File size: 10.4 KB
Line 
1
2{* Example of resizeable *}
3{*
4{include file='include/autosize.inc.tpl'}
5*}
6
7{if isset($errors)}
8<div class="errors">
9  <ul>
10    {foreach from=$errors item=error}
11    <li>{$error}</li>
12    {/foreach}
13  </ul>
14</div>
15{/if}
16
17{if isset($infos)}
18<div class="infos">
19  <ul>
20    {foreach from=$infos item=info}
21    <li>{$info}</li>
22    {/foreach}
23  </ul>
24</div>
25{/if}
26
27{if !empty($PLUGIN_PICTURE_BEFORE)}{$PLUGIN_PICTURE_BEFORE}{/if}
28
29<div id="imageHeaderBar">
30  <div class="browsePath">
31    {$SECTION_TITLE}
32    {$LEVEL_SEPARATOR}{$current.TITLE}
33  </div>
34  <div class="imageNumber">{$PHOTO}</div>
35  {if $SHOW_PICTURE_NAME_ON_TITLE }
36  <h2>{$current.TITLE}</h2>
37  {/if}
38</div>
39
40<div id="imageToolBar">
41  <div class="randomButtons">
42    {if isset($U_SLIDESHOW_START) }
43      <a href="{$U_SLIDESHOW_START}" title="{'slideshow'|@translate}" rel="nofollow"><img src="{$ROOT_URL}{$themeconf.icon_dir}/start_slideshow.png" class="button" alt="{'slideshow'|@translate}"></a>
44    {/if}
45    {if isset($U_METADATA) }
46      <a href="{$U_METADATA}" title="{'Show file metadata'|@translate}" rel="nofollow"><img src="{$ROOT_URL}{$themeconf.icon_dir}/metadata.png" class="button" alt="metadata"></a>
47    {/if}
48    {if isset($current.U_DOWNLOAD) }
49      <a href="{$current.U_DOWNLOAD}" title="{'download this file'|@translate}"><img src="{$ROOT_URL}{$themeconf.icon_dir}/save.png" class="button" alt="{'download'|@translate}"></a>
50    {/if}
51    {if isset($PLUGIN_PICTURE_ACTIONS)}{$PLUGIN_PICTURE_ACTIONS}{/if}
52    {if isset($favorite) }
53      <a href="{$favorite.U_FAVORITE}" title="{if $favorite.IS_FAVORITE}{'delete this image from your favorites'|@translate}{else}{'add this image to your favorites'|@translate}{/if}"><img src="{$ROOT_URL}{$themeconf.icon_dir}/{if $favorite.IS_FAVORITE}del_favorite{else}favorite{/if}.png" class="button" alt="favorite" title="{if $favorite.IS_FAVORITE}{'delete this image from your favorites'|@translate}{else}{'add this image to your favorites'|@translate}{/if}"></a>
54    {/if}
55    {if !empty($U_SET_AS_REPRESENTATIVE) }
56      <a href="{$U_SET_AS_REPRESENTATIVE}" title="{'set as album representative'|@translate}"><img src="{$ROOT_URL}{$themeconf.icon_dir}/representative.png" class="button" alt="{'representative'|@translate}"></a>
57    {/if}
58    {if isset($U_ADMIN) }
59      <a href="{$U_ADMIN}" title="{'Modify information'|@translate}"><img src="{$ROOT_URL}{$themeconf.icon_dir}/preferences.png" class="button" alt="{'edit'|@translate}"></a>
60    {/if}
61    {if isset($U_CADDIE) }{*caddie management BEGIN*}
62{combine_script id='core.scripts' load='async' path='themes/default/js/scripts.js'}
63<script type="text/javascript">
64{literal}function addToCadie(aElement, rootUrl, id)
65{
66if (aElement.disabled) return;
67aElement.disabled=true;
68var y = new PwgWS(rootUrl);
69
70y.callService(
71  "pwg.caddie.add", {image_id: id} ,
72  {
73    onFailure: function(num, text) { alert(num + " " + text); document.location=aElement.href; },
74    onSuccess: function(result) { aElement.disabled = false; }
75  }
76  );
77}{/literal}
78</script>
79      <a href="{$U_CADDIE}" onclick="addToCadie(this, '{$ROOT_URL|@escape:'javascript'}', {$current.id}); return false;" title="{'add to caddie'|@translate}"><img src="{$ROOT_URL}{$themeconf.icon_dir}/caddie_add.png" class="button" alt="{'caddie'|@translate}"></a>
80    {/if}{*caddie management END*}
81  </div>
82  {include file='picture_nav_buttons.tpl'|@get_extent:'picture_nav_buttons'}
83</div> <!-- imageToolBar -->
84
85{include file='picture_toolbar.tpl'}
86
87<div id="theImage">
88{$ELEMENT_CONTENT}
89
90{if isset($COMMENT_IMG)}
91<p>{$COMMENT_IMG}</p>
92{/if}
93
94{if isset($U_SLIDESHOW_STOP) }
95<p>
96  [ <a href="{$U_SLIDESHOW_STOP}">{'stop the slideshow'|@translate}</a> ]
97</p>
98{/if}
99
100</div>
101
102{if $DISPLAY_NAV_THUMB}
103{if isset($previous) }
104<a class="navThumb" id="linkPrev" href="{$previous.U_IMG}" title="{'Previous'|@translate} : {$previous.TITLE}" rel="prev">
105  <img src="{$previous.THUMB_SRC}" alt="{$previous.TITLE}">
106</a>
107{/if}
108{if isset($next) }
109<a class="navThumb" id="linkNext" href="{$next.U_IMG}" title="{'Next'|@translate} : {$next.TITLE}" rel="next">
110  <img src="{$next.THUMB_SRC}" alt="{$next.TITLE}">
111</a>
112{/if}
113{/if}
114
115<table id="standard" class="infoTable" summary="{'Some info about this picture'|@translate}">
116  {if $display_info.author}
117  <tr id="Author">
118    <td class="label">{'Author'|@translate}</td>
119    <td class="value">{if isset($INFO_AUTHOR)}{$INFO_AUTHOR}{else}{'N/A'|@translate}{/if}</td>
120  </tr>
121  {/if}
122  {if $display_info.created_on}
123  <tr id="datecreate">
124    <td class="label">{'Created on'|@translate}</td>
125    <td class="value">{if isset($INFO_CREATION_DATE)}{$INFO_CREATION_DATE}{else}{'N/A'|@translate}{/if}</td>
126  </tr>
127  {/if}
128  {if $display_info.posted_on}
129  <tr id="datepost">
130    <td class="label">{'Posted on'|@translate}</td>
131    <td class="value">{$INFO_POSTED_DATE}</td>
132  </tr>
133  {/if}
134  {if $display_info.dimensions}
135  <tr id="Dimensions">
136    <td class="label">{'Dimensions'|@translate}</td>
137    <td class="value">{if isset($INFO_DIMENSIONS)}{$INFO_DIMENSIONS}{else}{'N/A'|@translate}{/if}</td>
138  </tr>
139  {/if}
140  {if $display_info.file}
141  <tr id="File">
142    <td class="label">{'File'|@translate}</td>
143    <td class="value">{$INFO_FILE}</td>
144  </tr>
145  {/if}
146  {if $display_info.filesize}
147  <tr id="Filesize">
148    <td class="label">{'Filesize'|@translate}</td>
149    <td class="value">{if isset($INFO_FILESIZE)}{$INFO_FILESIZE}{else}{'N/A'|@translate}{/if}</td>
150  </tr>
151  {/if}
152  {if $display_info.tags}
153  <tr id="Tags">
154    <td class="label">{'Tags'|@translate}</td>
155    <td class="value">
156      {if isset($related_tags)}
157        {foreach from=$related_tags item=tag name=tag_loop}{if !$smarty.foreach.tag_loop.first}, {/if}
158        <a href="{$tag.URL}">{$tag.name}</a>{/foreach}
159      {/if}
160    </td>
161  </tr>
162  {/if}
163  {if $display_info.categories}
164  <tr id="Categories">
165    <td class="label">{'Albums'|@translate}</td>
166    <td class="value">
167      {if isset($related_categories)}
168      <ul>
169        {foreach from=$related_categories item=cat}
170        <li>{$cat}</li>
171        {/foreach}
172      </ul>
173      {/if}
174    </td>
175  </tr>
176  {/if}
177  {if $display_info.visits}
178  <tr id="Visits">
179    <td class="label">{'Visits'|@translate}</td>
180    <td class="value">{$INFO_VISITS}</td>
181  </tr>
182  {/if}
183
184{if $display_info.average_rate and isset($rate_summary) }
185        <tr id="Average">
186                <td class="label">{'Average rate'|@translate}</td>
187                <td class="value" id="ratingSummary">
188                {if $rate_summary.count}
189                        {assign var='rate_text' value='%.2f (rated %d times)'|@translate }
190                        {$pwg->sprintf($rate_text, $rate_summary.average, $rate_summary.count) }
191                {else}
192                        {'no rate'|@translate}
193                {/if}
194                </td>
195        </tr>
196{/if}
197 
198{if isset($rating)}
199        <tr id="rating">
200                <td class="label">
201                        <span id="updateRate">{if isset($rating.USER_RATE)}{'Update your rating'|@translate}{else}{'Rate this picture'|@translate}{/if}</span>
202                </td>
203                <td class="value">
204                        <form action="{$rating.F_ACTION}" method="post" id="rateForm" style="margin:0;">
205                        <div>&nbsp;
206                        {foreach from=$rating.marks item=mark name=rate_loop}
207                        {if !$smarty.foreach.rate_loop.first} | {/if}
208                        {if isset($rating.USER_RATE) && $mark==$rating.USER_RATE}
209                          <input type="button" name="rate" value="{$mark}" class="rateButtonSelected" title="{$mark}">
210                        {else}
211                          <input type="submit" name="rate" value="{$mark}" class="rateButton" title="{$mark}">
212                        {/if}
213                        {/foreach}
214                        {combine_script id='core.scripts' load='async' path='themes/default/js/scripts.js'}
215                        {combine_script id='rating' load='async' require='core.scripts' path='themes/default/js/rating.js'}
216                        <script type="text/javascript">
217                                var _pwgRatingAutoQueue = _pwgRatingAutoQueue || [];
218                                _pwgRatingAutoQueue.push(  {ldelim}rootUrl: '{$ROOT_URL|@escape:"javascript"}', image_id: {$current.id},
219                                        updateRateText: "{'Update your rating'|@translate|@escape:'javascript'}", updateRateElement: document.getElementById("updateRate"),
220                                        ratingSummaryText: "{'%.2f (rated %d times)'|@translate|@escape:'javascript'}", ratingSummaryElement: document.getElementById("ratingSummary") {rdelim} );
221                        </script>
222                        </div>
223                        </form>
224                </td>
225        </tr>
226{/if}
227
228{if $display_info.privacy_level and isset($available_permission_levels) }
229        <tr id="Privacy">
230                <td class="label">{'Who can see this photo?'|@translate}</td>
231                <td class="value">
232{combine_script id='core.scripts' load='async' path='themes/default/js/scripts.js'}
233<script type="text/javascript">
234{literal}function setPrivacyLevel(selectElement, rootUrl, id, level)
235{
236selectElement.disabled = true;
237var y = new PwgWS(rootUrl);
238y.callService(
239        "pwg.images.setPrivacyLevel", {image_id: id, level:level} ,
240        {
241                method: "POST",
242                onFailure: function(num, text) { selectElement.disabled = false; alert(num + " " + text); },
243                onSuccess: function(result) { selectElement.disabled = false; }
244        }
245        );
246}{/literal}
247</script>
248        <select onchange="setPrivacyLevel(this, '{$ROOT_URL|@escape:'javascript'}', {$current.id}, this.options[selectedIndex].value)">
249                {foreach from=$available_permission_levels item=label key=level}
250                <option label="{$label}" value="{$level}"{if $level == $current.level} selected="selected"{/if}>{$label}</option>
251                {/foreach}
252        </select>
253        </td></tr>
254{/if}
255
256</table>
257
258{if isset($metadata)}
259<table id="Metadata" class="infoTable2" summary="{'Some more (technical) info about this picture'|@translate}">
260{foreach from=$metadata item=meta}
261  <tr>
262    <th colspan="2">{$meta.TITLE}</th>
263  </tr>
264  {foreach from=$meta.lines item=value key=label}
265  <tr>
266    <td class="label">{$label}</td>
267    <td class="value">{$value}</td>
268  </tr>
269  {/foreach}
270{/foreach}
271</table>
272{/if}
273
274
275<hr class="separation">
276
277{if isset($COMMENT_COUNT)}
278<div id="comments">
279  {if $COMMENT_COUNT > 0}
280                <h3>{$pwg->l10n_dec('%d comment', '%d comments',$COMMENT_COUNT)}</h3>
281  {/if}
282  {if !empty($navbar) }{include file='navigation_bar.tpl'|@get_extent:'navbar'}{/if}
283
284        {if isset($comments)}
285                {include file='comment_list.tpl'}
286        {/if}
287
288        {if isset($comment_add)}
289        <form  method="post" action="{$comment_add.F_ACTION}" class="filter" id="addComment">
290        <fieldset>
291                <legend>{'Add a comment'|@translate}</legend>
292                {if $comment_add.SHOW_AUTHOR}
293                <label>{'Author'|@translate}<input type="text" name="author"></label>
294                {/if}
295                <label>{'Comment'|@translate}<textarea name="content" id="contentid" rows="5" cols="80">{$comment_add.CONTENT}</textarea></label>
296                <input type="hidden" name="key" value="{$comment_add.KEY}">
297                <input class="submit" type="submit" value="{'Submit'|@translate}">
298        </fieldset>
299        </form>
300        {/if}
301</div>
302{/if} {*comments*}
303
304{if !empty($PLUGIN_PICTURE_AFTER)}{$PLUGIN_PICTURE_AFTER}{/if}
Note: See TracBrowser for help on using the repository browser.