source: extensions/floPure/2.0.x/Copie de picture.tpl @ 22559

Last change on this file since 22559 was 5712, checked in by flop25, 15 years ago
File size: 10.1 KB
Line 
1{* $Id: picture.tpl 2435 2008-07-15 01:29:23Z rvelices $ *}
2{if isset($errors)}
3<div class="errors">
4  <ul>
5    {foreach from=$errors item=error}
6    <li>{$error}</li>
7    {/foreach}
8  </ul>
9</div>
10{/if}
11
12{if isset($infos)}
13<div class="infos">
14  <ul>
15    {foreach from=$infos item=info}
16    <li>{$info}</li>
17    {/foreach}
18  </ul>
19</div>
20{/if}
21
22<div id="imageHeaderBar">
23  <div class="browsePath">
24    <a href="{$U_HOME}" rel="home">{'home'|@translate}</a>
25    {$LEVEL_SEPARATOR}{$SECTION_TITLE}
26    {$LEVEL_SEPARATOR}{$current.TITLE}
27  </div>
28  <div class="imageNumber">{$PHOTO}</div>
29  {if $SHOW_PICTURE_NAME_ON_TITLE }
30  <h2>{$current.TITLE}</h2>
31  {/if}
32</div>
33
34{if !empty($PLUGIN_PICTURE_BEFORE)}{$PLUGIN_PICTURE_BEFORE}{/if}
35<div id="imageToolBar">
36  <div class="randomButtons">
37    {if isset($U_SLIDESHOW_START) }
38      <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>
39    {/if}
40    {if isset($U_SLIDESHOW_STOP) }
41      <a href="{$U_SLIDESHOW_STOP}" title="{'slideshow_stop'|@translate}" rel="nofollow"><img src="{$ROOT_URL}{$themeconf.icon_dir}/stop_slideshow.png" class="button" alt="{'slideshow_stop'|@translate}"></a>
42    {/if}
43      <a href="{$U_METADATA}" title="{'picture_show_metadata'|@translate}" rel="nofollow"><img src="{$ROOT_URL}{$themeconf.icon_dir}/metadata.png" class="button" alt="metadata" /></a>
44    {if isset($current.U_DOWNLOAD) }
45      <a href="{$current.U_DOWNLOAD}" title="{'download_hint'|@translate}"><img src="{$ROOT_URL}{$themeconf.icon_dir}/save.png" class="button" alt="{'download'|@translate}"></a>
46    {/if}
47    {if isset($PLUGIN_PICTURE_ACTIONS)}{$PLUGIN_PICTURE_ACTIONS}{/if}
48    {if isset($favorite) }
49      <a href="{$favorite.U_FAVORITE}" title="{$favorite.FAVORITE_HINT}"><img src="{$favorite.FAVORITE_IMG}" class="button" alt="favorite" title="{$favorite.FAVORITE_HINT}"></a>
50    {/if}
51    {if !empty($U_SET_AS_REPRESENTATIVE) }
52      <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>
53    {/if}
54    {if isset($U_ADMIN) }
55      <a href="{$U_ADMIN}" title="{'link_info_image'|@translate}"><img src="{$ROOT_URL}{$themeconf.icon_dir}/preferences.png" class="button" alt="{'edit'|@translate}"></a>
56    {/if}
57    {if isset($U_CADDIE) }{*caddie management BEGIN*}
58<script type="text/javascript">
59{literal}function addToCadie(aElement, rootUrl, id)
60{
61if (aElement.disabled) return;
62aElement.disabled=true;
63var y = new PwgWS(rootUrl);
64
65y.callService(
66  "pwg.caddie.add", {image_id: id} ,
67  {
68    onFailure: function(num, text) { alert(num + " " + text); document.location=aElement.href; },
69    onSuccess: function(result) { aElement.disabled = false; }
70  }
71  );
72}{/literal}
73</script>
74      <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>
75    {/if}{*caddie management END*}
76  </div>
77  {include file=$FILE_PICTURE_NAV_BUTTONS}
78</div> <!-- imageToolBar -->
79
80<div id="theImage">
81{$ELEMENT_CONTENT}
82
83{if isset($COMMENT_IMG)}
84<p>{$COMMENT_IMG}</p>
85{/if}
86
87{if isset($U_SLIDESHOW_STOP) }
88<p>
89  [ <a href="{$U_SLIDESHOW_STOP}">{'slideshow_stop'|@translate}</a> ]
90</p>
91{/if}
92
93</div>
94
95{if isset($previous) }
96<a class="navThumb" id="thumbPrev" href="{$previous.U_IMG}" title="{'previous_page'|@translate} : {$previous.TITLE}" rel="prev">
97  <img src="{$previous.THUMB_SRC}" class="thumbLink" id="linkPrev" alt="{$previous.TITLE}">
98</a>
99{/if}
100{if isset($next) }
101<a class="navThumb" id="thumbNext" href="{$next.U_IMG}" title="{'next_page'|@translate} : {$next.TITLE}" rel="next">
102  <img src="{$next.THUMB_SRC}" class="thumbLink" id="linkNext" alt="{$next.TITLE}">
103</a>
104{/if}
105
106<table class="infoTable" summary="Some info about this picture">
107  <tr>
108    <td class="label">{'Author'|@translate}</td>
109    <td class="value">{if isset($INFO_AUTHOR)}{$INFO_AUTHOR}{else}{'N/A'|@translate}{/if}</td>
110  </tr>
111  <tr>
112    <td class="label">{'Created on'|@translate}</td>
113    <td class="value">{if isset($INFO_CREATION_DATE)}{$INFO_CREATION_DATE}{else}{'N/A'|@translate}{/if}</td>
114  </tr>
115  <tr>
116    <td class="label">{'Posted on'|@translate}</td>
117    <td class="value">{$INFO_POSTED_DATE}</td>
118  </tr>
119  <tr>
120    <td class="label">{'Dimensions'|@translate}</td>
121    <td class="value">{if isset($INFO_DIMENSIONS)}{$INFO_DIMENSIONS}{else}{'N/A'|@translate}{/if}</td>
122  </tr>
123  <tr>
124    <td class="label">{'File'|@translate}</td>
125    <td class="value">{$INFO_FILE}</td>
126  </tr>
127  <tr>
128    <td class="label">{'Filesize'|@translate}</td>
129    <td class="value">{if isset($INFO_FILESIZE)}{$INFO_FILESIZE}{else}{'N/A'|@translate}{/if}</td>
130  </tr>
131  <tr>
132    <td class="label">{'Tags'|@translate}</td>
133    <td class="value">
134      {if isset($related_tags)}
135        {foreach from=$related_tags item=tag name=tag_loop}{if !$smarty.foreach.tag_loop.first}, {/if}
136        <a href="{$tag.URL}">{$tag.name}</a>{/foreach}
137      {/if}
138    </td>
139  </tr>
140  <tr>
141    <td class="label">{'Categories'|@translate}</td>
142    <td class="value">
143      {if isset($related_categories)}
144      <ul>
145        {foreach from=$related_categories item=cat}
146        <li>{$cat}</li>
147        {/foreach}
148      </ul>
149      {/if}
150    </td>
151  </tr>
152  <tr>
153    <td class="label">{'Visits'|@translate}</td>
154    <td class="value">{$INFO_VISITS}</td>
155  </tr>
156  {if isset($available_permission_levels) }
157  <tr>
158    <td class="label">{'Privacy level'|@translate}:</td>
159    <td class="value">
160<script type="text/javascript">
161{literal}function setPrivacyLevel(selectElement, rootUrl, id, level)
162{
163selectElement.disabled = true;
164var y = new PwgWS(rootUrl);
165y.callService(
166  "pwg.images.setPrivacyLevel", {image_id: id, level:level} ,
167  {
168    onFailure: function(num, text) { selectElement.disabled = false; alert(num + " " + text); },
169    onSuccess: function(result) { selectElement.disabled = false; }
170  }
171  );
172}{/literal}
173</script>
174    <select onchange="setPrivacyLevel(this, '{$ROOT_URL|@escape:'javascript'}', {$current.id}, this.options[selectedIndex].value)">
175    {foreach from=$available_permission_levels item=level}
176        <option value="{$level}"{if $current.level==$level} selected="selected"{/if}>{$pwg->l10n($pwg->sprintf('Level %d',$level))}</option>
177    {/foreach}
178    </select>
179  </td></tr>
180  {/if}
181  {if isset($rate_summary) }
182  <tr>
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, standard deviation = %.2f)'|@translate }
187      {$pwg->sprintf($rate_text, $rate_summary.average, $rate_summary.count, $rate_summary.std) }
188    {else}
189      {'no_rate'|@translate}
190    {/if}
191    </td>
192  </tr>
193  {/if}
194</table>
195
196{if isset($metadata)}
197<table class="infoTable" summary="Some more (technical) info about this picture">
198{foreach from=$metadata item=meta}
199  <tr>
200    <th colspan="2">{$meta.TITLE}</th>
201  </tr>
202  {foreach from=$meta.lines item=value key=label}
203  <tr>
204    <td class="label">{$label}</td>
205    <td class="value">{$value}</td>
206  </tr>
207  {/foreach}
208{/foreach}
209</table>
210{/if}
211<table class="infoTable" >
212  <tr>
213    <td>
214{if isset($rating)}
215<form action="{$rating.F_ACTION}" method="post" id="rateForm">
216<div>
217<span id="updateRate">{if isset($rating.USER_RATE)}{'update_rate'|@translate}{else}{'new_rate'|@translate}{/if}</span>
218:
219{foreach from=$rating.marks item=mark name=rate_loop}
220{if !$smarty.foreach.rate_loop.first} | {/if}
221{if isset($rating.USER_RATE) && $mark==$rating.USER_RATE}
222  <input type="button" name="rate" value="{$mark}" class="rateButtonSelected" />
223{else}
224  <input type="submit" name="rate" value="{$mark}" class="rateButton" />
225{/if}
226{/foreach}
227<script type="text/javascript" src="{$ROOT_URL}{$themeconf.template_dir}/rating.js"></script>
228<script type="text/javascript">
229makeNiceRatingForm( {ldelim}rootUrl: '{$ROOT_URL|@escape:"javascript"}', image_id: {$current.id},
230updateRateText: "{'update_rate'|@translate|@escape:'javascript'}", updateRateElement: document.getElementById("updateRate"),
231ratingSummaryText: "{'%.2f (rated %d times, standard deviation = %.2f)'|@translate|@escape:'javascript'}", ratingSummaryElement: document.getElementById("ratingSummary") {rdelim} );
232</script>
233</div>
234</form>
235{/if}
236        </td>
237  </tr>
238</table>
239
240<hr class="separation">
241
242{if isset($COMMENT_COUNT)}
243<div id="comments">
244  <h2>[{$COMMENT_COUNT}] {'comments_title'|@translate}</h2>
245
246  <div class="navigationBar">{$COMMENT_NAV_BAR}</div>
247
248  {if isset($comments)}
249  {foreach from=$comments item=comment}
250  <div class="comment">
251    {if isset($comment.U_DELETE)}
252    <p class="userCommentDelete">
253    <a href="{$comment.U_DELETE}" title="{'comments_del'|@translate}">
254      <img src="{$ROOT_URL}{$themeconf.icon_dir}/delete.png" class="button" style="border:none;vertical-align:middle; margin-left:5px;" alt="[{'delete'|@translate}]"/>
255    </a>
256    </p>
257    {/if}
258    <p class="commentInfo"><span class="author">{$comment.AUTHOR}</span> - {$comment.DATE}</p>
259    <blockquote>{$comment.CONTENT}</blockquote>
260  </div>
261  {/foreach}
262  {/if}
263
264  {if isset($comment_add)}
265  <form  method="post" action="{$comment_add.F_ACTION}" class="filter" id="addComment">
266    <fieldset>
267      <legend>{'comments_add'|@translate}</legend>
268      {if $comment_add.SHOW_AUTHOR}
269      <label>{'upload_author'|@translate}<input type="text" name="author"></label>
270      {/if}
271      <label>{'comment'|@translate}<textarea name="content" rows="5" cols="80">{$comment_add.CONTENT}</textarea></label>
272      <input type="hidden" name="key" value="{$comment_add.KEY}" />
273      <input class="submit" type="submit" value="{'Submit'|@translate}">
274    </fieldset>
275  </form>
276  {/if}
277
278</div>
279{/if} {*comments*}
280
281{if !empty($PLUGIN_PICTURE_AFTER)}{$PLUGIN_PICTURE_AFTER}{/if}
Note: See TracBrowser for help on using the repository browser.