source: extensions/floOS/OS_glass/template/picture.tpl @ 9675

Last change on this file since 9675 was 9675, checked in by flop25, 13 years ago

updating tpl files
delete of picture.css
Theme URI updated

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