source: extensions/floOS/OS_glass_clear/template/picture.tpl @ 9673

Last change on this file since 9673 was 9673, checked in by flop25, 10 years ago

on the rep :
compat. for trunk/2.2

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