source: trunk/themes/default/template/picture.tpl @ 10812

Revision 10812, 10.2 KB checked in by mistic100, 9 years ago (diff)

merge spread_menus to the core

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