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

Revision 5875, 9.7 KB checked in by flop25, 10 years ago (diff)

the picture stop_slideshow.png is never displayed because the code to stop the slideshow is in slideshow.tpl : so the code in picture.tpl is deleted

  • Property svn:eol-style set to LF
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="{$favorite.FAVORITE_HINT}"><img src="{$favorite.FAVORITE_IMG}" class="button" alt="favorite" title="{$favorite.FAVORITE_HINT}"></a>
54    {/if}
55    {if !empty($U_SET_AS_REPRESENTATIVE) }
56      <a href="{$U_SET_AS_REPRESENTATIVE}" title="{'set as category 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<script type="text/javascript">
63{literal}function addToCadie(aElement, rootUrl, id)
64{
65if (aElement.disabled) return;
66aElement.disabled=true;
67var y = new PwgWS(rootUrl);
68
69y.callService(
70  "pwg.caddie.add", {image_id: id} ,
71  {
72    onFailure: function(num, text) { alert(num + " " + text); document.location=aElement.href; },
73    onSuccess: function(result) { aElement.disabled = false; }
74  }
75  );
76}{/literal}
77</script>
78      <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>
79    {/if}{*caddie management END*}
80  </div>
81  {include file='picture_nav_buttons.tpl'|@get_extent:'picture_nav_buttons'}
82</div> <!-- imageToolBar -->
83
84<div id="theImage">
85{$ELEMENT_CONTENT}
86
87{if isset($COMMENT_IMG)}
88<p>{$COMMENT_IMG}</p>
89{/if}
90
91{if isset($U_SLIDESHOW_STOP) }
92<p>
93  [ <a href="{$U_SLIDESHOW_STOP}">{'stop the slideshow'|@translate}</a> ]
94</p>
95{/if}
96
97</div>
98
99{if $DISPLAY_NAV_THUMB}
100{if isset($previous) }
101<a class="navThumb" id="linkPrev" href="{$previous.U_IMG}" title="{'Previous'|@translate} : {$previous.TITLE}" rel="prev">
102  <img src="{$previous.THUMB_SRC}" alt="{$previous.TITLE}">
103</a>
104{/if}
105{if isset($next) }
106<a class="navThumb" id="linkNext" href="{$next.U_IMG}" title="{'Next'|@translate} : {$next.TITLE}" rel="next">
107  <img src="{$next.THUMB_SRC}" alt="{$next.TITLE}">
108</a>
109{/if}
110{/if}
111
112<table id="standard" class="infoTable" summary="{'Some info about this picture'|@translate}">
113  {if $display_info.author}
114  <tr id="Author">
115    <td class="label">{'Author'|@translate}</td>
116    <td class="value">{if isset($INFO_AUTHOR)}{$INFO_AUTHOR}{else}{'N/A'|@translate}{/if}</td>
117  </tr>
118  {/if}
119  {if $display_info.created_on}
120  <tr id="datecreate">
121    <td class="label">{'Created on'|@translate}</td>
122    <td class="value">{if isset($INFO_CREATION_DATE)}{$INFO_CREATION_DATE}{else}{'N/A'|@translate}{/if}</td>
123  </tr>
124  {/if}
125  {if $display_info.posted_on}
126  <tr id="datepost">
127    <td class="label">{'Posted on'|@translate}</td>
128    <td class="value">{$INFO_POSTED_DATE}</td>
129  </tr>
130  {/if}
131  {if $display_info.dimensions}
132  <tr id="Dimensions">
133    <td class="label">{'Dimensions'|@translate}</td>
134    <td class="value">{if isset($INFO_DIMENSIONS)}{$INFO_DIMENSIONS}{else}{'N/A'|@translate}{/if}</td>
135  </tr>
136  {/if}
137  {if $display_info.file}
138  <tr id="File">
139    <td class="label">{'File'|@translate}</td>
140    <td class="value">{$INFO_FILE}</td>
141  </tr>
142  {/if}
143  {if $display_info.filesize}
144  <tr id="Filesize">
145    <td class="label">{'Filesize'|@translate}</td>
146    <td class="value">{if isset($INFO_FILESIZE)}{$INFO_FILESIZE}{else}{'N/A'|@translate}{/if}</td>
147  </tr>
148  {/if}
149  {if $display_info.tags}
150  <tr id="Tags">
151    <td class="label">{'Tags'|@translate}</td>
152    <td class="value">
153      {if isset($related_tags)}
154        {foreach from=$related_tags item=tag name=tag_loop}{if !$smarty.foreach.tag_loop.first}, {/if}
155        <a href="{$tag.URL}">{$tag.name}</a>{/foreach}
156      {/if}
157    </td>
158  </tr>
159  {/if}
160  {if $display_info.categories}
161  <tr id="Categories">
162    <td class="label">{'Categories'|@translate}</td>
163    <td class="value">
164      {if isset($related_categories)}
165      <ul>
166        {foreach from=$related_categories item=cat}
167        <li>{$cat}</li>
168        {/foreach}
169      </ul>
170      {/if}
171    </td>
172  </tr>
173  {/if}
174  {if $display_info.visits}
175  <tr id="Visits">
176    <td class="label">{'Visits'|@translate}</td>
177    <td class="value">{$INFO_VISITS}</td>
178  </tr>
179  {/if}
180
181{if $display_info.average_rate and isset($rate_summary) }
182        <tr id="Average">
183                <td class="label">{'Average rate'|@translate}</td>
184                <td class="value" id="ratingSummary">
185                {if $rate_summary.count}
186                        {assign var='rate_text' value='%.2f (rated %d times)'|@translate }
187                        {$pwg->sprintf($rate_text, $rate_summary.average, $rate_summary.count) }
188                {else}
189                        {'no rate'|@translate}
190                {/if}
191                </td>
192        </tr>
193{/if}
194 
195{if isset($rating)}
196        <tr id="rating">
197                <td class="label">
198                        <span id="updateRate">{if isset($rating.USER_RATE)}{'Update your rating'|@translate}{else}{'Rate this picture'|@translate}{/if}</span>
199                </td>
200                <td class="value">
201                        <form action="{$rating.F_ACTION}" method="post" id="rateForm" style="margin:0;">
202                        <div>&nbsp;
203                        {foreach from=$rating.marks item=mark name=rate_loop}
204                        {if !$smarty.foreach.rate_loop.first} | {/if}
205                        {if isset($rating.USER_RATE) && $mark==$rating.USER_RATE}
206                          <input type="button" name="rate" value="{$mark}" class="rateButtonSelected" title="{$mark}">
207                        {else}
208                          <input type="submit" name="rate" value="{$mark}" class="rateButton" title="{$mark}">
209                        {/if}
210                        {/foreach}
211                        <script type="text/javascript" src="{$ROOT_URL}themes/default/js/rating.js"></script>
212                        <script type="text/javascript">
213                        makeNiceRatingForm( {ldelim}rootUrl: '{$ROOT_URL|@escape:"javascript"}', image_id: {$current.id},
214                        updateRateText: "{'Update your rating'|@translate|@escape:'javascript'}", updateRateElement: document.getElementById("updateRate"),
215                        ratingSummaryText: "{'%.2f (rated %d times)'|@translate|@escape:'javascript'}", ratingSummaryElement: document.getElementById("ratingSummary") {rdelim} );
216                        </script>
217                        </div>
218                        </form>
219                </td>
220        </tr>
221{/if}
222
223{if $display_info.privacy_level and isset($available_permission_levels) }
224        <tr id="Privacy">
225                <td class="label">{'Privacy level'|@translate}:</td>
226                <td class="value">
227<script type="text/javascript">
228{literal}function setPrivacyLevel(selectElement, rootUrl, id, level)
229{
230selectElement.disabled = true;
231var y = new PwgWS(rootUrl);
232y.callService(
233        "pwg.images.setPrivacyLevel", {image_id: id, level:level} ,
234        {
235                method: "POST",
236                onFailure: function(num, text) { selectElement.disabled = false; alert(num + " " + text); },
237                onSuccess: function(result) { selectElement.disabled = false; }
238        }
239        );
240}{/literal}
241</script>
242        <select onchange="setPrivacyLevel(this, '{$ROOT_URL|@escape:'javascript'}', {$current.id}, this.options[selectedIndex].value)">
243        {foreach from=$available_permission_levels item=level}
244                <option value="{$level}"{if $current.level==$level} selected="selected"{/if}>{$pwg->l10n($pwg->sprintf('Level %d',$level))}</option>
245        {/foreach}
246        </select>
247        </td></tr>
248{/if}
249
250</table>
251
252{if isset($metadata)}
253<table id="Metadata" class="infoTable2" summary="{'Some more (technical) info about this picture'|@translate}">
254{foreach from=$metadata item=meta}
255  <tr id="{$meta.TITLE}">
256    <th colspan="2">{$meta.TITLE}</th>
257  </tr>
258  {foreach from=$meta.lines item=value key=label}
259  <tr id="{$label}" >
260    <td class="label">{$label}</td>
261    <td class="value">{$value}</td>
262  </tr>
263  {/foreach}
264{/foreach}
265</table>
266{/if}
267
268
269<hr class="separation">
270
271{if isset($COMMENT_COUNT)}
272<div id="comments">
273  {if $COMMENT_COUNT > 0}
274                <h3>{$pwg->l10n_dec('%d comment', '%d comments',$COMMENT_COUNT)}</h3>
275  {/if}
276  {if !empty($navbar) }{include file='navigation_bar.tpl'|@get_extent:'navbar'}{/if}
277
278        {if isset($comments)}
279                {include file='comment_list.tpl'}
280        {/if}
281
282        {if isset($comment_add)}
283        <form  method="post" action="{$comment_add.F_ACTION}" class="filter" id="addComment">
284        <fieldset>
285                <legend>{'Add a comment'|@translate}</legend>
286                {if $comment_add.SHOW_AUTHOR}
287                <label>{'Author'|@translate}<input type="text" name="author"></label>
288                {/if}
289                <label>{'Comment'|@translate}<textarea name="content" id="contentid" rows="5" cols="80">{$comment_add.CONTENT}</textarea></label>
290                <input type="hidden" name="key" value="{$comment_add.KEY}">
291                <input class="submit" type="submit" value="{'Submit'|@translate}">
292        </fieldset>
293        </form>
294        {/if}
295</div>
296{/if} {*comments*}
297
298{if !empty($PLUGIN_PICTURE_AFTER)}{$PLUGIN_PICTURE_AFTER}{/if}
Note: See TracBrowser for help on using the repository browser.