source: extensions/floOS/2.0.x/picture.tpl @ 21584

Last change on this file since 21584 was 5714, checked in by flop25, 15 years ago

moving the old template structure to a specific folder

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