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