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

Last change on this file since 5500 was 5500, checked in by plg, 14 years ago

feature 1559: remove "standard deviation" in rating.

  • Property svn:eol-style set to LF
File size: 9.9 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_SLIDESHOW_STOP) }
46      <a href="{$U_SLIDESHOW_STOP}" title="{'stop the slideshow'|@translate}" rel="nofollow"><img src="{$ROOT_URL}{$themeconf.icon_dir}/stop_slideshow.png" class="button" alt="{'stop the slideshow'|@translate}"></a>
47    {/if}
48    {if isset($U_METADATA) }
49      <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>
50    {/if}
51    {if isset($current.U_DOWNLOAD) }
52      <a href="{$current.U_DOWNLOAD}" title="{'download'|@translate}"><img src="{$ROOT_URL}{$themeconf.icon_dir}/save.png" class="button" alt="{'download'|@translate}"></a>
53    {/if}
54    {if isset($PLUGIN_PICTURE_ACTIONS)}{$PLUGIN_PICTURE_ACTIONS}{/if}
55    {if isset($favorite) }
56      <a href="{$favorite.U_FAVORITE}" title="{$favorite.FAVORITE_HINT}"><img src="{$favorite.FAVORITE_IMG}" class="button" alt="favorite" title="{$favorite.FAVORITE_HINT}"></a>
57    {/if}
58    {if !empty($U_SET_AS_REPRESENTATIVE) }
59      <a href="{$U_SET_AS_REPRESENTATIVE}" title="{'representative'|@translate}"><img src="{$ROOT_URL}{$themeconf.icon_dir}/representative.png" class="button" alt="{'representative'|@translate}"></a>
60    {/if}
61    {if isset($U_ADMIN) }
62      <a href="{$U_ADMIN}" title="{'edit'|@translate}"><img src="{$ROOT_URL}{$themeconf.icon_dir}/preferences.png" class="button" alt="{'edit'|@translate}"></a>
63    {/if}
64    {if isset($U_CADDIE) }{*caddie management BEGIN*}
65<script type="text/javascript">
66{literal}function addToCadie(aElement, rootUrl, id)
67{
68if (aElement.disabled) return;
69aElement.disabled=true;
70var y = new PwgWS(rootUrl);
71
72y.callService(
73  "pwg.caddie.add", {image_id: id} ,
74  {
75    onFailure: function(num, text) { alert(num + " " + text); document.location=aElement.href; },
76    onSuccess: function(result) { aElement.disabled = false; }
77  }
78  );
79}{/literal}
80</script>
81      <a href="{$U_CADDIE}" onclick="addToCadie(this, '{$ROOT_URL|@escape:'javascript'}', {$current.id}); return false;" title="{'caddie'|@translate}"><img src="{$ROOT_URL}{$themeconf.icon_dir}/caddie_add.png" class="button" alt="{'caddie'|@translate}"></a>
82    {/if}{*caddie management END*}
83  </div>
84  {include file='picture_nav_buttons.tpl'|@get_extent:'picture_nav_buttons'}
85</div> <!-- imageToolBar -->
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">{'Categories'|@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                        <script type="text/javascript" src="{$ROOT_URL}themes/default/js/rating.js"></script>
215                        <script type="text/javascript">
216                        makeNiceRatingForm( {ldelim}rootUrl: '{$ROOT_URL|@escape:"javascript"}', image_id: {$current.id},
217                        updateRateText: "{'Update your rating'|@translate|@escape:'javascript'}", updateRateElement: document.getElementById("updateRate"),
218                        ratingSummaryText: "{'%.2f (rated %d times)'|@translate|@escape:'javascript'}", ratingSummaryElement: document.getElementById("ratingSummary") {rdelim} );
219                        </script>
220                        </div>
221                        </form>
222                </td>
223        </tr>
224{/if}
225
226{if $display_info.privacy_level and isset($available_permission_levels) }
227        <tr id="Privacy">
228                <td class="label">{'Privacy level'|@translate}:</td>
229                <td class="value">
230<script type="text/javascript">
231{literal}function setPrivacyLevel(selectElement, rootUrl, id, level)
232{
233selectElement.disabled = true;
234var y = new PwgWS(rootUrl);
235y.callService(
236        "pwg.images.setPrivacyLevel", {image_id: id, level:level} ,
237        {
238                method: "POST",
239                onFailure: function(num, text) { selectElement.disabled = false; alert(num + " " + text); },
240                onSuccess: function(result) { selectElement.disabled = false; }
241        }
242        );
243}{/literal}
244</script>
245        <select onchange="setPrivacyLevel(this, '{$ROOT_URL|@escape:'javascript'}', {$current.id}, this.options[selectedIndex].value)">
246        {foreach from=$available_permission_levels item=level}
247                <option value="{$level}"{if $current.level==$level} selected="selected"{/if}>{$pwg->l10n($pwg->sprintf('Level %d',$level))}</option>
248        {/foreach}
249        </select>
250        </td></tr>
251{/if}
252
253</table>
254
255{if isset($metadata)}
256<table id="Metadata" class="infoTable2" summary="{'Some more (technical) info about this picture'|@translate}">
257{foreach from=$metadata item=meta}
258  <tr id="{$meta.TITLE}">
259    <th colspan="2">{$meta.TITLE}</th>
260  </tr>
261  {foreach from=$meta.lines item=value key=label}
262  <tr id="{$label}" >
263    <td class="label">{$label}</td>
264    <td class="value">{$value}</td>
265  </tr>
266  {/foreach}
267{/foreach}
268</table>
269{/if}
270
271
272<hr class="separation">
273
274{if isset($COMMENT_COUNT)}
275<div id="comments">
276  {if $COMMENT_COUNT > 0}
277                <h3>{$pwg->l10n_dec('%d comment', '%d comments',$COMMENT_COUNT)}</h3>
278  {/if}
279  {if !empty($navbar) }{include file='navigation_bar.tpl'|@get_extent:'navbar'}{/if}
280
281        {if isset($comments)}
282                {include file='comment_list.tpl'}
283        {/if}
284
285        {if isset($comment_add)}
286        <form  method="post" action="{$comment_add.F_ACTION}" class="filter" id="addComment">
287        <fieldset>
288                <legend>{'Add a comment'|@translate}</legend>
289                {if $comment_add.SHOW_AUTHOR}
290                <label>{'Author'|@translate}<input type="text" name="author"></label>
291                {/if}
292                <label>{'Comment'|@translate}<textarea name="content" id="contentid" rows="5" cols="80">{$comment_add.CONTENT}</textarea></label>
293                <input type="hidden" name="key" value="{$comment_add.KEY}">
294                <input class="submit" type="submit" value="{'Submit'|@translate}">
295        </fieldset>
296        </form>
297        {/if}
298</div>
299{/if} {*comments*}
300
301{if !empty($PLUGIN_PICTURE_AFTER)}{$PLUGIN_PICTURE_AFTER}{/if}
Note: See TracBrowser for help on using the repository browser.