1 | {combine_script id='core.switchbox' load='async' require='jquery' path='themes/default/js/switchbox.js'} |
---|
2 | {if isset($MENUBAR)}{$MENUBAR}{/if} |
---|
3 | <div id="content"{if isset($MENUBAR)} class="contentWithMenu"{/if}> |
---|
4 | |
---|
5 | {if isset($errors) or not empty($infos)} |
---|
6 | {include file='infos_errors.tpl'} |
---|
7 | {/if} |
---|
8 | |
---|
9 | {if !empty($PLUGIN_PICTURE_BEFORE)}{$PLUGIN_PICTURE_BEFORE}{/if} |
---|
10 | |
---|
11 | <div id="imageHeaderBar"> |
---|
12 | <div class="browsePath"> |
---|
13 | {$SECTION_TITLE}<span class="browsePathSeparator">{$LEVEL_SEPARATOR}</span><h2>{$current.TITLE}</h2> |
---|
14 | </div> |
---|
15 | </div> |
---|
16 | |
---|
17 | <div id="imageToolBar"> |
---|
18 | <div class="imageNumber">{$PHOTO}</div> |
---|
19 | {include file='picture_nav_buttons.tpl'|@get_extent:'picture_nav_buttons'} |
---|
20 | |
---|
21 | <div class="actionButtons"> |
---|
22 | {if isset($current.unique_derivatives) && count($current.unique_derivatives)>1} |
---|
23 | {footer_script require='jquery'}{literal} |
---|
24 | function changeImgSrc(url,typeSave,typeMap) |
---|
25 | { |
---|
26 | var theImg = document.getElementById("theMainImage"); |
---|
27 | if (theImg) |
---|
28 | { |
---|
29 | theImg.removeAttribute("width");theImg.removeAttribute("height"); |
---|
30 | theImg.src = url; |
---|
31 | theImg.useMap = "#map"+typeMap; |
---|
32 | } |
---|
33 | jQuery('#derivativeSwitchBox .switchCheck').css('visibility','hidden'); |
---|
34 | jQuery('#derivativeChecked'+typeMap).css('visibility','visible'); |
---|
35 | document.cookie = 'picture_deriv='+typeSave+';path={/literal}{$COOKIE_PATH}{literal}'; |
---|
36 | } |
---|
37 | (SwitchBox=window.SwitchBox||[]).push("#derivativeSwitchLink", "#derivativeSwitchBox"); |
---|
38 | {/literal}{/footer_script} |
---|
39 | {strip}<a id="derivativeSwitchLink" title="{'Photo sizes'|@translate}" class="pwg-state-default pwg-button" rel="nofollow"> |
---|
40 | <span class="pwg-icon pwg-icon-sizes"></span><span class="pwg-button-text">{'Photo sizes'|@translate}</span> |
---|
41 | </a> |
---|
42 | <div id="derivativeSwitchBox" class="switchBox"> |
---|
43 | <div class="switchBoxTitle">{'Photo sizes'|@translate}</div> |
---|
44 | {foreach from=$current.unique_derivatives item=derivative key=derivative_type} |
---|
45 | <span class="switchCheck" id="derivativeChecked{$derivative->get_type()}"{if $derivative->get_type() ne $current.selected_derivative->get_type()} style="visibility:hidden"{/if}>✔ </span> |
---|
46 | <a href="javascript:changeImgSrc('{$derivative->get_url()|@escape:javascript}','{$derivative_type}','{$derivative->get_type()}')"> |
---|
47 | {$derivative->get_type()|@translate}<span class="derivativeSizeDetails"> ({$derivative->get_size_hr()})</span> |
---|
48 | </a><br> |
---|
49 | {/foreach} |
---|
50 | {if isset($U_ORIGINAL)} |
---|
51 | {combine_script id='core.scripts' load='async' path='themes/default/js/scripts.js'} |
---|
52 | <a href="javascript:phpWGOpenWindow('{$U_ORIGINAL}','xxx','scrollbars=yes,toolbar=no,status=no,resizable=yes')" rel="nofollow">{'Original'|@translate}</a> |
---|
53 | {/if} |
---|
54 | </div> |
---|
55 | {/strip} |
---|
56 | {/if} |
---|
57 | {strip}{if isset($U_SLIDESHOW_START)} |
---|
58 | <a href="{$U_SLIDESHOW_START}" title="{'slideshow'|@translate}" class="pwg-state-default pwg-button" rel="nofollow"> |
---|
59 | <span class="pwg-icon pwg-icon-slideshow"></span><span class="pwg-button-text">{'slideshow'|@translate}</span> |
---|
60 | </a> |
---|
61 | {/if}{/strip} |
---|
62 | {strip}{if isset($U_METADATA)} |
---|
63 | <a href="{$U_METADATA}" title="{'Show file metadata'|@translate}" class="pwg-state-default pwg-button" rel="nofollow"> |
---|
64 | <span class="pwg-icon pwg-icon-camera-info"></span><span class="pwg-button-text">{'Show file metadata'|@translate}</span> |
---|
65 | </a> |
---|
66 | {/if}{/strip} |
---|
67 | {strip}{if isset($current.U_DOWNLOAD)} |
---|
68 | <a href="{$current.U_DOWNLOAD}" title="{'Download this file'|@translate}" class="pwg-state-default pwg-button" rel="nofollow"> |
---|
69 | <span class="pwg-icon pwg-icon-save"></span><span class="pwg-button-text">{'Download'|@translate}</span> |
---|
70 | </a> |
---|
71 | {/if}{/strip} |
---|
72 | {if isset($PLUGIN_PICTURE_BUTTONS)}{foreach from=$PLUGIN_PICTURE_BUTTONS item=button}{$button}{/foreach}{/if} |
---|
73 | {if isset($PLUGIN_PICTURE_ACTIONS)}{$PLUGIN_PICTURE_ACTIONS}{/if} |
---|
74 | {strip}{if isset($favorite)} |
---|
75 | <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"> |
---|
76 | <span class="pwg-icon pwg-icon-favorite-{if $favorite.IS_FAVORITE}del{else}add{/if}"></span><span class="pwg-button-text">{'Favorites'|@translate}</span> |
---|
77 | </a> |
---|
78 | {/if}{/strip} |
---|
79 | {strip}{if isset($U_SET_AS_REPRESENTATIVE)} |
---|
80 | <a id="cmdSetRepresentative" href="{$U_SET_AS_REPRESENTATIVE}" title="{'set as album representative'|@translate}" class="pwg-state-default pwg-button" rel="nofollow"> |
---|
81 | <span class="pwg-icon pwg-icon-representative"></span><span class="pwg-button-text">{'representative'|@translate}</span> |
---|
82 | </a> |
---|
83 | {/if}{/strip} |
---|
84 | {strip}{if isset($U_PHOTO_ADMIN)} |
---|
85 | <a id="cmdEditPhoto" href="{$U_PHOTO_ADMIN}" title="{'Edit photo'|@translate}" class="pwg-state-default pwg-button" rel="nofollow"> |
---|
86 | <span class="pwg-icon pwg-icon-edit"></span><span class="pwg-button-text">{'Edit'|@translate}</span> |
---|
87 | </a> |
---|
88 | {/if}{/strip} |
---|
89 | {strip}{if isset($U_CADDIE)}{*caddie management BEGIN*} |
---|
90 | {footer_script} |
---|
91 | {literal}function addToCadie(aElement, rootUrl, id) |
---|
92 | { |
---|
93 | if (aElement.disabled) return; |
---|
94 | aElement.disabled=true; |
---|
95 | var y = new PwgWS(rootUrl); |
---|
96 | y.callService( |
---|
97 | "pwg.caddie.add", {image_id: id} , |
---|
98 | { |
---|
99 | onFailure: function(num, text) { alert(num + " " + text); document.location=aElement.href; }, |
---|
100 | onSuccess: function(result) { aElement.disabled = false; } |
---|
101 | } |
---|
102 | ); |
---|
103 | }{/literal} |
---|
104 | {/footer_script} |
---|
105 | <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"> |
---|
106 | <span class="pwg-icon pwg-icon-caddie-add"> </span><span class="pwg-button-text">{'Caddie'|@translate}</span> |
---|
107 | </a> |
---|
108 | {/if}{/strip}{*caddie management END*} |
---|
109 | </div> |
---|
110 | </div>{*<!-- imageToolBar -->*} |
---|
111 | |
---|
112 | <div id="theImageAndInfos"> |
---|
113 | <div id="theImage"> |
---|
114 | {$ELEMENT_CONTENT} |
---|
115 | |
---|
116 | {if isset($COMMENT_IMG)} |
---|
117 | <p class="imageComment">{$COMMENT_IMG}</p> |
---|
118 | {/if} |
---|
119 | {if isset($U_SLIDESHOW_STOP)} |
---|
120 | <p> |
---|
121 | [ <a href="{$U_SLIDESHOW_STOP}">{'stop the slideshow'|@translate}</a> ] |
---|
122 | </p> |
---|
123 | {/if} |
---|
124 | |
---|
125 | </div>{*<!-- no significant white space for elegant--> |
---|
126 | *}<div id="infoSwitcher"></div>{*<!-- no significant white space for elegant--> |
---|
127 | *}<div id="imageInfos"> |
---|
128 | {if $DISPLAY_NAV_THUMB} |
---|
129 | <div class="navThumbs"> |
---|
130 | {if isset($previous)} |
---|
131 | <a class="navThumb" id="linkPrev" href="{$previous.U_IMG}" title="{'Previous'|@translate} : {$previous.TITLE_ESC}" rel="prev"> |
---|
132 | <span class="thumbHover prevThumbHover"></span> |
---|
133 | <img src="{$previous.derivatives.square->get_url()}" alt="{$previous.TITLE_ESC}"> |
---|
134 | </a> |
---|
135 | {elseif isset($U_UP)} |
---|
136 | <a class="navThumb" id="linkPrev" href="{$U_UP}" title="{'Thumbnails'|@translate}"> |
---|
137 | <div class="thumbHover">{'First Page'|@translate}<br><br>{'Go back to the album'|@translate}</div> |
---|
138 | </a> |
---|
139 | {/if} |
---|
140 | {if isset($next)} |
---|
141 | <a class="navThumb" id="linkNext" href="{$next.U_IMG}" title="{'Next'|@translate} : {$next.TITLE_ESC}" rel="next"> |
---|
142 | <span class="thumbHover nextThumbHover"></span> |
---|
143 | <img src="{$next.derivatives.square->get_url()}" alt="{$next.TITLE_ESC}"> |
---|
144 | </a> |
---|
145 | {elseif isset($U_UP)} |
---|
146 | <a class="navThumb" id="linkNext" href="{$U_UP}" title="{'Thumbnails'|@translate}"> |
---|
147 | <div class="thumbHover">{'Last Page'|@translate}<br><br>{'Go back to the album'|@translate}</div> |
---|
148 | </a> |
---|
149 | {/if} |
---|
150 | </div> |
---|
151 | {/if} |
---|
152 | |
---|
153 | <dl id="standard" class="imageInfoTable"> |
---|
154 | {strip} |
---|
155 | {if $display_info.author and isset($INFO_AUTHOR)} |
---|
156 | <div id="Author" class="imageInfo"> |
---|
157 | <dt>{'Author'|@translate}</dt> |
---|
158 | <dd>{$INFO_AUTHOR}</dd> |
---|
159 | </div> |
---|
160 | {/if} |
---|
161 | {if $display_info.created_on and isset($INFO_CREATION_DATE)} |
---|
162 | <div id="datecreate" class="imageInfo"> |
---|
163 | <dt>{'Created on'|@translate}</dt> |
---|
164 | <dd>{$INFO_CREATION_DATE}</dd> |
---|
165 | </div> |
---|
166 | {/if} |
---|
167 | {if $display_info.posted_on} |
---|
168 | <div id="datepost" class="imageInfo"> |
---|
169 | <dt>{'Posted on'|@translate}</dt> |
---|
170 | <dd>{$INFO_POSTED_DATE}</dd> |
---|
171 | </div> |
---|
172 | {/if} |
---|
173 | {if $display_info.dimensions and isset($INFO_DIMENSIONS)} |
---|
174 | <div id="Dimensions" class="imageInfo"> |
---|
175 | <dt>{'Dimensions'|@translate}</dt> |
---|
176 | <dd>{$INFO_DIMENSIONS}</dd> |
---|
177 | </div> |
---|
178 | {/if} |
---|
179 | {if $display_info.file} |
---|
180 | <div id="File" class="imageInfo"> |
---|
181 | <dt>{'File'|@translate}</dt> |
---|
182 | <dd>{$INFO_FILE}</dd> |
---|
183 | </div> |
---|
184 | {/if} |
---|
185 | {if $display_info.filesize and isset($INFO_FILESIZE)} |
---|
186 | <div id="Filesize" class="imageInfo"> |
---|
187 | <dt>{'Filesize'|@translate}</dt> |
---|
188 | <dd>{$INFO_FILESIZE}</dd> |
---|
189 | </div> |
---|
190 | {/if} |
---|
191 | {if $display_info.tags and isset($related_tags)} |
---|
192 | <div id="Tags" class="imageInfo"> |
---|
193 | <dt>{'Tags'|@translate}</dt> |
---|
194 | <dd> |
---|
195 | {foreach from=$related_tags item=tag name=tag_loop}{if !$smarty.foreach.tag_loop.first}, {/if}<a href="{$tag.URL}">{$tag.name}</a>{/foreach} |
---|
196 | </dd> |
---|
197 | </div> |
---|
198 | {/if} |
---|
199 | {if $display_info.categories and isset($related_categories)} |
---|
200 | <div id="Categories" class="imageInfo"> |
---|
201 | <dt>{'Albums'|@translate}</dt> |
---|
202 | <dd> |
---|
203 | <ul> |
---|
204 | {foreach from=$related_categories item=cat} |
---|
205 | <li>{$cat}</li> |
---|
206 | {/foreach} |
---|
207 | </ul> |
---|
208 | </dd> |
---|
209 | </div> |
---|
210 | {/if} |
---|
211 | {if $display_info.visits} |
---|
212 | <div id="Visits" class="imageInfo"> |
---|
213 | <dt>{'Visits'|@translate}</dt> |
---|
214 | <dd>{$INFO_VISITS}</dd> |
---|
215 | </div> |
---|
216 | {/if} |
---|
217 | |
---|
218 | {if $display_info.rating_score and isset($rate_summary)} |
---|
219 | <div id="Average" class="imageInfo"> |
---|
220 | <dt>{'Rating score'|@translate}</dt> |
---|
221 | <dd> |
---|
222 | {if $rate_summary.count} |
---|
223 | <span id="ratingScore">{$rate_summary.score}</span> <span id="ratingCount">({$rate_summary.count|@translate_dec:'%d rate':'%d rates'})</span> |
---|
224 | {else} |
---|
225 | <span id="ratingScore">{'no rate'|@translate}</span> <span id="ratingCount"></span> |
---|
226 | {/if} |
---|
227 | </dd> |
---|
228 | </div> |
---|
229 | {/if} |
---|
230 | |
---|
231 | {if isset($rating)} |
---|
232 | <div id="rating" class="imageInfo"> |
---|
233 | <dt> |
---|
234 | <span id="updateRate">{if isset($rating.USER_RATE)}{'Update your rating'|@translate}{else}{'Rate this photo'|@translate}{/if}</span> |
---|
235 | </dt> |
---|
236 | <dd> |
---|
237 | <form action="{$rating.F_ACTION}" method="post" id="rateForm" style="margin:0;"> |
---|
238 | <div> |
---|
239 | {foreach from=$rating.marks item=mark name=rate_loop} |
---|
240 | {if isset($rating.USER_RATE) && $mark==$rating.USER_RATE} |
---|
241 | <input type="button" name="rate" value="{$mark}" class="rateButtonSelected" title="{$mark}"> |
---|
242 | {else} |
---|
243 | <input type="submit" name="rate" value="{$mark}" class="rateButton" title="{$mark}"> |
---|
244 | {/if} |
---|
245 | {/foreach} |
---|
246 | {strip}{combine_script id='core.scripts' load='async' path='themes/default/js/scripts.js'} |
---|
247 | {combine_script id='rating' load='async' require='core.scripts' path='themes/default/js/rating.js'} |
---|
248 | {footer_script} |
---|
249 | var _pwgRatingAutoQueue = _pwgRatingAutoQueue||[]; |
---|
250 | _pwgRatingAutoQueue.push( {ldelim}rootUrl: '{$ROOT_URL}', image_id: {$current.id}, |
---|
251 | onSuccess : function(rating) {ldelim} |
---|
252 | var e = document.getElementById("updateRate"); |
---|
253 | if (e) e.innerHTML = "{'Update your rating'|@translate|@escape:'javascript'}"; |
---|
254 | e = document.getElementById("ratingScore"); |
---|
255 | if (e) e.innerHTML = rating.score; |
---|
256 | e = document.getElementById("ratingCount"); |
---|
257 | if (e) {ldelim} |
---|
258 | if (rating.count == 1) {ldelim} |
---|
259 | e.innerHTML = "({'%d rate'|@translate|@escape:'javascript'})".replace( "%d", rating.count); |
---|
260 | } else {ldelim} |
---|
261 | e.innerHTML = "({'%d rates'|@translate|@escape:'javascript'})".replace( "%d", rating.count); |
---|
262 | } |
---|
263 | {rdelim} |
---|
264 | {rdelim}{rdelim} ); |
---|
265 | {/footer_script} |
---|
266 | {/strip} |
---|
267 | </div> |
---|
268 | </form> |
---|
269 | </dd> |
---|
270 | </div> |
---|
271 | {/if} |
---|
272 | |
---|
273 | {if $display_info.privacy_level and isset($available_permission_levels)} |
---|
274 | <div id="Privacy" class="imageInfo"> |
---|
275 | <dt>{'Who can see this photo?'|@translate}</dt> |
---|
276 | <dd> |
---|
277 | <div> |
---|
278 | <a id="privacyLevelLink" href>{$available_permission_levels[$current.level]}</a> |
---|
279 | </div> |
---|
280 | {combine_script id='core.scripts' load='async' path='themes/default/js/scripts.js'} |
---|
281 | {footer_script require='jquery'}{strip} |
---|
282 | function setPrivacyLevel(id, level){ |
---|
283 | (new PwgWS('{$ROOT_URL}')).callService( |
---|
284 | "pwg.images.setPrivacyLevel", { image_id:id, level:level}, |
---|
285 | { |
---|
286 | method: "POST", |
---|
287 | onFailure: function(num, text) { alert(num + " " + text); }, |
---|
288 | onSuccess: function(result) { |
---|
289 | jQuery('#privacyLevelBox .switchCheck').css('visibility','hidden'); |
---|
290 | jQuery('#switchLevel'+level).prev('.switchCheck').css('visibility','visible'); |
---|
291 | jQuery('#privacyLevelLink').text(jQuery('#switchLevel'+level).text()); |
---|
292 | } |
---|
293 | } |
---|
294 | ); |
---|
295 | } |
---|
296 | (SwitchBox=window.SwitchBox||[]).push("#privacyLevelLink", "#privacyLevelBox"); |
---|
297 | {/strip}{/footer_script} |
---|
298 | <div id="privacyLevelBox" class="switchBox" style="display:none"> |
---|
299 | {foreach from=$available_permission_levels item=label key=level} |
---|
300 | <span class="switchCheck"{if $level != $current.level} style="visibility:hidden"{/if}>✔ </span> |
---|
301 | <a id="switchLevel{$level}" href="javascript:setPrivacyLevel({$current.id},{$level})">{$label}</a><br> |
---|
302 | {/foreach} |
---|
303 | </div> |
---|
304 | </dd> |
---|
305 | </div> |
---|
306 | {/if} |
---|
307 | {/strip} |
---|
308 | </dl> |
---|
309 | |
---|
310 | {if isset($metadata)} |
---|
311 | <dl id="Metadata" class="imageInfoTable"> |
---|
312 | {foreach from=$metadata item=meta} |
---|
313 | <h3>{$meta.TITLE}</h3> |
---|
314 | {foreach from=$meta.lines item=value key=label} |
---|
315 | <div class="imageInfo"> |
---|
316 | <dt>{$label}</dt> |
---|
317 | <dd>{$value}</dd> |
---|
318 | </div> |
---|
319 | {/foreach} |
---|
320 | {/foreach} |
---|
321 | </dl> |
---|
322 | {/if} |
---|
323 | </div> |
---|
324 | </div> |
---|
325 | |
---|
326 | {if isset($COMMENT_COUNT)} |
---|
327 | <div id="comments" {if (!isset($comment_add) && ($COMMENT_COUNT == 0))}class="noCommentContent"{else}class="commentContent"{/if}><div id="commentsSwitcher"></div> |
---|
328 | <h3>{$COMMENT_COUNT|@translate_dec:'%d comment':'%d comments'}</h3> |
---|
329 | |
---|
330 | <div id="pictureComments"> |
---|
331 | {if isset($comment_add)} |
---|
332 | <div id="commentAdd"> |
---|
333 | <h4>{'Add a comment'|@translate}</h4> |
---|
334 | <form method="post" action="{$comment_add.F_ACTION}" id="addComment"> |
---|
335 | {if $comment_add.SHOW_AUTHOR} |
---|
336 | <p><label for="author">{'Author'|@translate}{if $comment_add.AUTHOR_MANDATORY} ({'mandatory'|@translate}){/if} :</label></p> |
---|
337 | <p><input type="text" name="author" id="author" value="{$comment_add.AUTHOR}"></p> |
---|
338 | {/if} |
---|
339 | {if $comment_add.SHOW_EMAIL} |
---|
340 | <p><label for="email">{'Email address'|@translate}{if $comment_add.EMAIL_MANDATORY} ({'mandatory'|@translate}){/if} :</label></p> |
---|
341 | <p><input type="text" name="email" id="email" value="{$comment_add.EMAIL}"></p> |
---|
342 | {/if} |
---|
343 | {if $comment_add.SHOW_WEBSITE} |
---|
344 | <p><label for="website_url">{'Website'|@translate} :</label></p> |
---|
345 | <p><input type="text" name="website_url" id="website_url" value="{$comment_add.WEBSITE_URL}"></p> |
---|
346 | {/if} |
---|
347 | <p><label for="contentid">{'Comment'|@translate} ({'mandatory'|@translate}) :</label></p> |
---|
348 | <p><textarea name="content" id="contentid" rows="5" cols="50">{$comment_add.CONTENT}</textarea></p> |
---|
349 | <p><input type="hidden" name="key" value="{$comment_add.KEY}"> |
---|
350 | <input type="submit" value="{'Submit'|@translate}"></p> |
---|
351 | </form> |
---|
352 | </div> |
---|
353 | {/if} |
---|
354 | {if isset($comments)} |
---|
355 | <div id="pictureCommentList"> |
---|
356 | {if (($COMMENT_COUNT > 2) || !empty($navbar))} |
---|
357 | <div id="pictureCommentNavBar"> |
---|
358 | {if $COMMENT_COUNT > 2} |
---|
359 | <a href="{$COMMENTS_ORDER_URL}#comments" rel="nofollow" class="commentsOrder">{$COMMENTS_ORDER_TITLE}</a> |
---|
360 | {/if} |
---|
361 | {if !empty($navbar) }{include file='navigation_bar.tpl'|@get_extent:'navbar'}{/if} |
---|
362 | </div> |
---|
363 | {/if} |
---|
364 | {include file='comment_list.tpl'} |
---|
365 | </div> |
---|
366 | {/if} |
---|
367 | <div style="clear:both"></div> |
---|
368 | </div> |
---|
369 | |
---|
370 | </div> |
---|
371 | {/if}{*comments*} |
---|
372 | |
---|
373 | {if !empty($PLUGIN_PICTURE_AFTER)}{$PLUGIN_PICTURE_AFTER}{/if} |
---|
374 | |
---|
375 | </div> |
---|