source: extensions/floPure/picture.tpl @ 3404

Last change on this file since 3404 was 3333, checked in by flop25, 16 years ago

first commit

File size: 9.7 KB
RevLine 
[3333]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    {if !$IS_HOME}{$LEVEL_SEPARATOR}{$SECTION_TITLE}{/if}
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='picture_nav_buttons.tpl'|@get_extent:'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="linkPrev" href="{$previous.U_IMG}" title="{'previous_page'|@translate} : {$previous.TITLE}" rel="prev">
97  <img src="{$previous.THUMB_SRC}" alt="{$previous.TITLE}">
98</a>
99{/if}
100{if isset($next) }
101<a class="navThumb" id="linkNext" href="{$next.U_IMG}" title="{'next_page'|@translate} : {$next.TITLE}" rel="next">
102  <img src="{$next.THUMB_SRC}" 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
157{if isset($rate_summary) }
158        <tr>
159                <td class="label">{'Average rate'|@translate}</td>
160                <td class="value" id="ratingSummary">
161                {if $rate_summary.count}
162                        {assign var='rate_text' value='%.2f (rated %d times, standard deviation = %.2f)'|@translate }
163                        {$pwg->sprintf($rate_text, $rate_summary.average, $rate_summary.count, $rate_summary.std) }
164                {else}
165                        {'no_rate'|@translate}
166                {/if}
167                </td>
168        </tr>
169{/if}
170 
171{if isset($rating)}
172        <tr>
173                <td class="label">
174                        <span id="updateRate">{if isset($rating.USER_RATE)}{'update_rate'|@translate}{else}{'new_rate'|@translate}{/if}</span>
175                </td>
176                <td class="value">
177                        <form action="{$rating.F_ACTION}" method="post" id="rateForm" style="margin:0;">
178                        <div>&nbsp;
179                        {foreach from=$rating.marks item=mark name=rate_loop}
180                        {if !$smarty.foreach.rate_loop.first} | {/if}
181                        {if isset($rating.USER_RATE) && $mark==$rating.USER_RATE}
182                          <input type="button" name="rate" value="{$mark}" class="rateButtonSelected" title="{$mark}" />
183                        {else}
184                          <input type="submit" name="rate" value="{$mark}" class="rateButton" title="{$mark}" />
185                        {/if}
186                        {/foreach}
187                        <script type="text/javascript" src="{$ROOT_URL}template/{$themeconf.template}/rating.js"></script>
188                        <script type="text/javascript">
189                        makeNiceRatingForm( {ldelim}rootUrl: '{$ROOT_URL|@escape:"javascript"}', image_id: {$current.id},
190                        updateRateText: "{'update_rate'|@translate|@escape:'javascript'}", updateRateElement: document.getElementById("updateRate"),
191                        ratingSummaryText: "{'%.2f (rated %d times, standard deviation = %.2f)'|@translate|@escape:'javascript'}", ratingSummaryElement: document.getElementById("ratingSummary") {rdelim} );
192                        </script>
193                        </div>
194                        </form>
195                </td>
196        </tr>
197{/if}
198
199{if isset($available_permission_levels) }
200        <tr>
201                <td class="label">{'Privacy level'|@translate}:</td>
202                <td class="value">
203<script type="text/javascript">
204{literal}function setPrivacyLevel(selectElement, rootUrl, id, level)
205{
206selectElement.disabled = true;
207var y = new PwgWS(rootUrl);
208y.callService(
209        "pwg.images.setPrivacyLevel", {image_id: id, level:level} ,
210        {
211                onFailure: function(num, text) { selectElement.disabled = false; alert(num + " " + text); },
212                onSuccess: function(result) { selectElement.disabled = false; }
213        }
214        );
215}{/literal}
216</script>
217        <select onchange="setPrivacyLevel(this, '{$ROOT_URL|@escape:'javascript'}', {$current.id}, this.options[selectedIndex].value)">
218        {foreach from=$available_permission_levels item=level}
219                <option value="{$level}"{if $current.level==$level} selected="selected"{/if}>{$pwg->l10n($pwg->sprintf('Level %d',$level))}</option>
220        {/foreach}
221        </select>
222        </td></tr>
223{/if}
224
225</table>
226
227{if isset($metadata)}
228<table class="infoTable" summary="Some more (technical) info about this picture">
229{foreach from=$metadata item=meta}
230  <tr>
231    <th colspan="2">{$meta.TITLE}</th>
232  </tr>
233  {foreach from=$meta.lines item=value key=label}
234  <tr>
235    <td class="label">{$label}</td>
236    <td class="value">{$value}</td>
237  </tr>
238  {/foreach}
239{/foreach}
240</table>
241{/if}
242
243
244<hr class="separation">
245
246{if isset($COMMENT_COUNT)}
247<div id="comments">
248  {if $COMMENT_COUNT > 0}
249                <h3>{$pwg->l10n_dec('%d comment', '%d comments',$COMMENT_COUNT)}</h3>
250  {/if}
251        {if !empty($COMMENT_NAV_BAR)}
252        <div class="navigationBar">{$COMMENT_NAV_BAR}</div>
253        {/if}
254
255        {if isset($comments)}
256                {include file='comment_list.tpl' comment_separator=true}
257        {/if}
258
259        {if isset($comment_add)}
260        <form  method="post" action="{$comment_add.F_ACTION}" class="filter" id="addComment">
261        <fieldset>
262                <legend>{'comments_add'|@translate}</legend>
263                {if $comment_add.SHOW_AUTHOR}
264                <label>{'upload_author'|@translate}<input type="text" name="author"></label>
265                {/if}
266                <label>{'comment'|@translate}<textarea name="content" id="contentid" rows="5" cols="80">{$comment_add.CONTENT}</textarea></label>
267                <input type="hidden" name="key" value="{$comment_add.KEY}" />
268                <input class="submit" type="submit" value="{'Submit'|@translate}">
269        </fieldset>
270        </form>
271        {/if}
272</div>
273{/if} {*comments*}
274
275
276
277{if !empty($PLUGIN_PICTURE_AFTER)}{$PLUGIN_PICTURE_AFTER}{/if}
Note: See TracBrowser for help on using the repository browser.