source: extensions/floPure/2.0.x/picture.tpl @ 16361

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