1 | {* Example of resizeable *} |
---|
2 | {* |
---|
3 | {include file='include/autosize.inc.tpl'} |
---|
4 | *} |
---|
5 | |
---|
6 | {combine_script id='tinyscrollbar' load='header' require='jquery' path='themes/PwgCarbon_dft/js/tinyscrollbar.js'} |
---|
7 | |
---|
8 | |
---|
9 | |
---|
10 | {if isset($MENUBAR)}{$MENUBAR}{/if} |
---|
11 | {if isset($errors)} |
---|
12 | <div class="errors"> |
---|
13 | <ul> |
---|
14 | {foreach from=$errors item=error} |
---|
15 | <li>{$error}</li> |
---|
16 | {/foreach} |
---|
17 | </ul> |
---|
18 | </div> |
---|
19 | {/if} |
---|
20 | |
---|
21 | |
---|
22 | |
---|
23 | {if isset($infos)} |
---|
24 | <div class="infos"> |
---|
25 | <ul> |
---|
26 | {foreach from=$infos item=info} |
---|
27 | <li>{$info}</li> |
---|
28 | {/foreach} |
---|
29 | </ul> |
---|
30 | </div> |
---|
31 | {/if} |
---|
32 | |
---|
33 | {if !empty($PLUGIN_PICTURE_BEFORE)}{$PLUGIN_PICTURE_BEFORE}{/if} |
---|
34 | |
---|
35 | <div id="imageHeaderBar"> |
---|
36 | <div class="browsePath"> |
---|
37 | {$SECTION_TITLE} |
---|
38 | {$LEVEL_SEPARATOR}{$current.TITLE} |
---|
39 | </div> |
---|
40 | <div class="imageNumber"> {$PHOTO}</div> |
---|
41 | |
---|
42 | </div> |
---|
43 | |
---|
44 | |
---|
45 | |
---|
46 | <div id="theImage"> |
---|
47 | |
---|
48 | |
---|
49 | <div id="imgContainer"> |
---|
50 | |
---|
51 | {$ELEMENT_CONTENT} |
---|
52 | |
---|
53 | |
---|
54 | {if !empty($navbar)}{include file='navigation_bar.tpl'|@get_extent:'navbar'}{/if} |
---|
55 | |
---|
56 | {include file='picture_nav_buttons.tpl'|@get_extent:'picture_nav_buttons'} |
---|
57 | |
---|
58 | </div> |
---|
59 | |
---|
60 | {if isset($COMMENT_COUNT)} |
---|
61 | <div id="comments"> |
---|
62 | |
---|
63 | |
---|
64 | {if $COMMENT_COUNT > 0} |
---|
65 | <h3>{$pwg->l10n_dec('%d comment', '%d comments',$COMMENT_COUNT)}</h3> |
---|
66 | {else} |
---|
67 | <H3>{'There are no comments'|@translate}</h3> |
---|
68 | {/if} |
---|
69 | |
---|
70 | {if isset($comment_add)} |
---|
71 | <div id="adcomm"> |
---|
72 | <p>{'Add a comment'|@translate}</p> |
---|
73 | <form method="post" action="{$comment_add.F_ACTION}" class="filter" id="addComment"> |
---|
74 | <fieldset> |
---|
75 | |
---|
76 | {if $comment_add.SHOW_AUTHOR} |
---|
77 | <label>{'Author'|@translate}<input type="text" name="author"></label> |
---|
78 | {/if} |
---|
79 | <label class="addcom"><textarea name="content" id="contentid" rows="6" cols="100">{$comment_add.CONTENT}</textarea></label> |
---|
80 | <input type="hidden" name="key" value="{$comment_add.KEY}"> |
---|
81 | <input type="submit" value="{'Submit'|@translate}"> |
---|
82 | </fieldset> |
---|
83 | </form> |
---|
84 | </div> |
---|
85 | {/if} |
---|
86 | |
---|
87 | {if isset($comments)} |
---|
88 | <div id="pictcomm"> |
---|
89 | <div id="scrollbar1"> |
---|
90 | <div class="scrollbar"> |
---|
91 | <div class="track"> |
---|
92 | <div class="thumb"> |
---|
93 | <div class="end"> |
---|
94 | </div> |
---|
95 | </div> |
---|
96 | </div> |
---|
97 | </div> |
---|
98 | <div class="viewport"> |
---|
99 | <div class="overview"> |
---|
100 | {include file='comment_list.tpl'} |
---|
101 | </div> |
---|
102 | </div> |
---|
103 | </div> |
---|
104 | </div> |
---|
105 | {/if} |
---|
106 | |
---|
107 | |
---|
108 | |
---|
109 | </div> |
---|
110 | {/if}{*comments*} |
---|
111 | {footer_script}{literal} |
---|
112 | $(document).ready(function(){ |
---|
113 | $('#scrollbar1').tinyscrollbar( {sizethumb: 10 , size:100 }); |
---|
114 | }); |
---|
115 | {/literal}{/footer_script} |
---|
116 | <!--slideshow--> |
---|
117 | {if isset($U_SLIDESHOW_STOP) } |
---|
118 | <p> |
---|
119 | [ <a href="{$U_SLIDESHOW_STOP}">{'stop the slideshow'|@translate}</a> ] |
---|
120 | </p> |
---|
121 | {/if} |
---|
122 | |
---|
123 | |
---|
124 | |
---|
125 | |
---|
126 | |
---|
127 | |
---|
128 | |
---|
129 | |
---|
130 | <div class="panel"> |
---|
131 | |
---|
132 | <div id="imageToolBar"> |
---|
133 | <div class="actionButtons"> |
---|
134 | {if count($current.unique_derivatives)>1} |
---|
135 | {footer_script require='jquery'}{literal} |
---|
136 | function changeImgSrc(url,typeSave,typeMap) |
---|
137 | { |
---|
138 | var theImg = document.getElementById("theMainImage"); |
---|
139 | if (theImg) |
---|
140 | { |
---|
141 | theImg.removeAttribute("width");theImg.removeAttribute("height"); |
---|
142 | theImg.src = url; |
---|
143 | theImg.useMap = "#map"+typeMap; |
---|
144 | } |
---|
145 | jQuery('#derivativeSwitchBox .switchCheck').css('visibility','hidden'); |
---|
146 | jQuery('#derivativeChecked'+typeSave).css('visibility','visible'); |
---|
147 | document.cookie = 'picture_deriv='+typeSave+';path={/literal}{$COOKIE_PATH}{literal}'; |
---|
148 | } |
---|
149 | jQuery("#derivativeSwitchLink").click(function() { |
---|
150 | var elt = jQuery("#derivativeSwitchBox"); |
---|
151 | elt.css("left", Math.min( jQuery(this).offset().left, jQuery(window).width() - elt.outerWidth(true) - 5)) |
---|
152 | .toggle(); |
---|
153 | }); |
---|
154 | jQuery("#derivativeSwitchBox").on("mouseleave click", function() { |
---|
155 | jQuery(this).hide(); |
---|
156 | }); |
---|
157 | {/literal}{/footer_script} |
---|
158 | {strip}<a id="derivativeSwitchLink" title="{'Photo sizes'|@translate}" class="pwg-state-default pwg-button" rel="nofollow"> |
---|
159 | <span class="pwg-icon pwg-icon-sizes"> </span><span class="pwg-button-text">{'Photo sizes'|@translate}</span> |
---|
160 | </a> |
---|
161 | <div id="derivativeSwitchBox" class="switchBox"> |
---|
162 | <div class="switchBoxTitle">{'Photo sizes'|@translate}</div> |
---|
163 | {foreach from=$current.unique_derivatives item=derivative key=derivative_type} |
---|
164 | <span class="switchCheck" id="derivativeChecked{$derivative_type}"{if $derivative->get_type() ne $current.selected_derivative->get_type()} style="visibility:hidden"{/if}>✔ </span> |
---|
165 | <a href="javascript:changeImgSrc('{$derivative->get_url()|@escape:javascript}','{$derivative_type}','{$derivative->get_type()}')"> |
---|
166 | {$derivative->get_type()|@translate}<span class="derivativeSizeDetails"> ({$derivative->get_size_hr()})</span> |
---|
167 | </a><br> |
---|
168 | {/foreach} |
---|
169 | {if isset($U_ORIGINAL)} |
---|
170 | <a href="javascript:phpWGOpenWindow('{$U_ORIGINAL}','xxx','scrollbars=yes,toolbar=no,status=no,resizable=yes')" rel="nofollow">{'Original'|@translate}</a> |
---|
171 | {/if} |
---|
172 | </div> |
---|
173 | {/strip} |
---|
174 | {/if} |
---|
175 | {strip}{if isset($U_SLIDESHOW_START)} |
---|
176 | <a href="{$U_SLIDESHOW_START}" title="{'slideshow'|@translate}" class="pwg-state-default pwg-button" rel="nofollow"> |
---|
177 | <span class="pwg-icon pwg-icon-slideshow"> </span><span class="pwg-button-text">{'slideshow'|@translate}</span> |
---|
178 | </a> |
---|
179 | {/if}{/strip} |
---|
180 | {strip}{if isset($U_METADATA)} |
---|
181 | <a href="{$U_METADATA}" title="{'Show file metadata'|@translate}" class="pwg-state-default pwg-button" rel="nofollow"> |
---|
182 | <span class="pwg-icon pwg-icon-camera-info"> </span><span class="pwg-button-text">{'Show file metadata'|@translate}</span> |
---|
183 | </a> |
---|
184 | {/if}{/strip} |
---|
185 | {strip}{if isset($current.U_DOWNLOAD)} |
---|
186 | <a href="{$current.U_DOWNLOAD}" title="{'Download this file'|@translate}" class="pwg-state-default pwg-button" rel="nofollow"> |
---|
187 | <span class="pwg-icon pwg-icon-save"> </span><span class="pwg-button-text">{'Download'|@translate}</span> |
---|
188 | </a> |
---|
189 | {/if}{/strip} |
---|
190 | {if isset($PLUGIN_PICTURE_ACTIONS)}{$PLUGIN_PICTURE_ACTIONS}{/if} |
---|
191 | {strip}{if isset($favorite)} |
---|
192 | <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"> |
---|
193 | <span class="pwg-icon pwg-icon-favorite-{if $favorite.IS_FAVORITE}del{else}add{/if}"> </span><span class="pwg-button-text">{'Favorites'|@translate}</span> |
---|
194 | </a> |
---|
195 | {/if}{/strip} |
---|
196 | {strip}{if isset($U_SET_AS_REPRESENTATIVE)} |
---|
197 | <a href="{$U_SET_AS_REPRESENTATIVE}" title="{'set as album representative'|@translate}" class="pwg-state-default pwg-button" rel="nofollow"> |
---|
198 | <span class="pwg-icon pwg-icon-representative"> </span><span class="pwg-button-text">{'representative'|@translate}</span> |
---|
199 | </a> |
---|
200 | {/if}{/strip} |
---|
201 | {strip}{if isset($U_ADMIN)} |
---|
202 | <a href="{$U_ADMIN}" title="{'Modify information'|@translate}" class="pwg-state-default pwg-button" rel="nofollow"> |
---|
203 | <span class="pwg-icon pwg-icon-edit"> </span><span class="pwg-button-text">{'Edit'|@translate}</span> |
---|
204 | </a> |
---|
205 | {/if}{/strip} |
---|
206 | {strip}{if isset($U_CADDIE)}{*caddie management BEGIN*} |
---|
207 | {footer_script} |
---|
208 | {literal}function addToCadie(aElement, rootUrl, id) |
---|
209 | { |
---|
210 | if (aElement.disabled) return; |
---|
211 | aElement.disabled=true; |
---|
212 | var y = new PwgWS(rootUrl); |
---|
213 | y.callService( |
---|
214 | "pwg.caddie.add", {image_id: id} , |
---|
215 | { |
---|
216 | onFailure: function(num, text) { alert(num + " " + text); document.location=aElement.href; }, |
---|
217 | onSuccess: function(result) { aElement.disabled = false; } |
---|
218 | } |
---|
219 | ); |
---|
220 | }{/literal} |
---|
221 | {/footer_script} |
---|
222 | <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"> |
---|
223 | <span class="pwg-icon pwg-icon-caddie-add"> </span><span class="pwg-button-text">{'Caddie'|@translate}</span> |
---|
224 | </a> |
---|
225 | {/if}{/strip}{*caddie management END*} |
---|
226 | </div> |
---|
227 | </div>{*<!-- imageToolBar -->*} |
---|
228 | |
---|
229 | <table id="standard" class="infoTable" summary="{'Some info about this picture'|@translate}"> |
---|
230 | {if $display_info.author} |
---|
231 | <tr> |
---|
232 | <td class="label">{'Author'|@translate}</td> |
---|
233 | <td class="value">{if isset($INFO_AUTHOR)}{$INFO_AUTHOR}{else}{'N/A'|@translate}{/if}</td> |
---|
234 | {/if} |
---|
235 | {if $display_info.created_on} |
---|
236 | <td class="label">{'Created on'|@translate}</td> |
---|
237 | <td class="value">{if isset($INFO_CREATION_DATE)}{$INFO_CREATION_DATE}{else}{'N/A'|@translate}{/if}</td> |
---|
238 | </tr> |
---|
239 | {/if} |
---|
240 | |
---|
241 | {if $display_info.posted_on} |
---|
242 | <tr > |
---|
243 | <td class="label">{'Posted on'|@translate}</td> |
---|
244 | <td class="value">{$INFO_POSTED_DATE}</td> |
---|
245 | {/if} |
---|
246 | {if $display_info.dimensions} |
---|
247 | <td class="label">{'Dimensions'|@translate}</td> |
---|
248 | <td class="value">{if isset($INFO_DIMENSIONS)}{$INFO_DIMENSIONS}{else}{'N/A'|@translate}{/if}</td> |
---|
249 | </tr> |
---|
250 | {/if} |
---|
251 | |
---|
252 | {if $display_info.file} |
---|
253 | <tr> |
---|
254 | <td class="label">{'File'|@translate}</td> |
---|
255 | <td class="value">{$INFO_FILE}</td> |
---|
256 | {/if} |
---|
257 | {if $display_info.filesize} |
---|
258 | <td class="label">{'Filesize'|@translate}</td> |
---|
259 | <td class="value">{if isset($INFO_FILESIZE)}{$INFO_FILESIZE}{else}{'N/A'|@translate}{/if}</td> |
---|
260 | </tr> |
---|
261 | {/if} |
---|
262 | |
---|
263 | {if $display_info.tags} |
---|
264 | <tr> |
---|
265 | <td class="label">{'Tags'|@translate}</td> |
---|
266 | <td class="value"> |
---|
267 | {if isset($related_tags)} |
---|
268 | {foreach from=$related_tags item=tag name=tag_loop}{if !$smarty.foreach.tag_loop.first}, {/if} |
---|
269 | <a href="{$tag.URL}">{$tag.name}</a>{/foreach} |
---|
270 | {/if} |
---|
271 | </td> |
---|
272 | {/if} |
---|
273 | {if $display_info.categories} |
---|
274 | <td class="label">{'Categories'|@translate}</td> |
---|
275 | <td class="value"> |
---|
276 | {if isset($related_categories)} |
---|
277 | <ul> |
---|
278 | {foreach from=$related_categories item=cat} |
---|
279 | <li>{$cat}</li> |
---|
280 | {/foreach} |
---|
281 | </ul> |
---|
282 | {/if} |
---|
283 | </td> |
---|
284 | </tr> |
---|
285 | {/if} |
---|
286 | |
---|
287 | {if $display_info.visits} |
---|
288 | <tr> |
---|
289 | <td class="label">{'Visits'|@translate}</td> |
---|
290 | <td class="value">{$INFO_VISITS}</td> |
---|
291 | |
---|
292 | {/if} |
---|
293 | |
---|
294 | {if $display_info.rating_score and isset($rate_summary)} |
---|
295 | |
---|
296 | <td class="label">{'Rating score'|@translate}</td> |
---|
297 | <td class="value" id="ratingSummary"> |
---|
298 | {if $rate_summary.count} |
---|
299 | {$rate_summary.score}({assign var='rate_text' value='%d rates'|@translate}{$pwg->sprintf($rate_text, $rate_summary.count)}) |
---|
300 | {else} |
---|
301 | {'no rate'|@translate} |
---|
302 | {/if} |
---|
303 | </td> |
---|
304 | </tr> |
---|
305 | {/if} |
---|
306 | <tr height="24px"> |
---|
307 | {if isset($rating)} |
---|
308 | <td colspan="2" class="label" > |
---|
309 | <span id="updateRate">{if isset($rating.USER_RATE)}{'Update your rating'|@translate}{else}{'Rate this photo'|@translate}{/if}</span> |
---|
310 | </td> |
---|
311 | <td colspan="2" class="value"> |
---|
312 | <form action="{$rating.F_ACTION}" method="post" id="rateForm" style="margin:0;"> |
---|
313 | <div> |
---|
314 | {foreach from=$rating.marks item=mark name=rate_loop} |
---|
315 | {if isset($rating.USER_RATE) && $mark==$rating.USER_RATE} |
---|
316 | <input type="button" name="rate" value="{$mark}" class="rateButtonSelected" title="{$mark}"> |
---|
317 | {else} |
---|
318 | <input type="submit" name="rate" value="{$mark}" class="rateButton" title="{$mark}"> |
---|
319 | {/if} |
---|
320 | {/foreach} |
---|
321 | {strip}{combine_script id='core.scripts' load='async' path='themes/default/js/scripts.js'} |
---|
322 | {combine_script id='rating' load='async' require='core.scripts' path='themes/default/js/rating.js'} |
---|
323 | {footer_script} |
---|
324 | var _pwgRatingAutoQueue = _pwgRatingAutoQueue||[]; |
---|
325 | _pwgRatingAutoQueue.push( {ldelim}rootUrl: '{$ROOT_URL}', image_id: {$current.id}, |
---|
326 | onSuccess : function(rating) {ldelim} |
---|
327 | var e = document.getElementById("updateRate"); |
---|
328 | if (e) e.innerHTML = "{'Update your rating'|@translate|@escape:'javascript'}"; |
---|
329 | e = document.getElementById("ratingScore"); |
---|
330 | if (e) e.innerHTML = rating.score; |
---|
331 | e = document.getElementById("ratingCount"); |
---|
332 | if (e) e.innerHTML = "({'%d rates'|@translate|@escape:'javascript'})".replace( "%d", rating.count); |
---|
333 | {rdelim}{rdelim} ); |
---|
334 | {/footer_script} |
---|
335 | {/strip} |
---|
336 | </div> |
---|
337 | </form> |
---|
338 | </td> |
---|
339 | </tr> |
---|
340 | {/if} |
---|
341 | |
---|
342 | {if $display_info.privacy_level and isset($available_permission_levels) } |
---|
343 | <tr id="Privacy"> |
---|
344 | <td colspan="2" class="label">{'Who can see this photo?'|@translate}</td> |
---|
345 | <td colspan="2" class="value"> |
---|
346 | <script type="text/javascript"> |
---|
347 | {literal}function setPrivacyLevel(selectElement, rootUrl, id, level) |
---|
348 | { |
---|
349 | selectElement.disabled = true; |
---|
350 | var y = new PwgWS(rootUrl); |
---|
351 | y.callService( |
---|
352 | "pwg.images.setPrivacyLevel", {image_id: id, level:level} , |
---|
353 | { |
---|
354 | method: "POST", |
---|
355 | onFailure: function(num, text) { selectElement.disabled = false; alert(num + " " + text); }, |
---|
356 | onSuccess: function(result) { selectElement.disabled = false; } |
---|
357 | } |
---|
358 | ); |
---|
359 | }{/literal} |
---|
360 | </script> |
---|
361 | <select onchange="setPrivacyLevel(this, '{$ROOT_URL|@escape:'javascript'}', {$current.id}, this.options[selectedIndex].value)"> |
---|
362 | {foreach from=$available_permission_levels item=label key=level} |
---|
363 | <option label="{$label}" value="{$level}"{if $level == $current.level} selected="selected"{/if}>{$label}</option> |
---|
364 | {/foreach} |
---|
365 | </select> |
---|
366 | </td></tr> |
---|
367 | {/if} |
---|
368 | |
---|
369 | </table> |
---|
370 | |
---|
371 | {if isset($metadata)} |
---|
372 | <table id="Metadata" class="infoTable2" summary="{'Some more (technical) info about this picture'|@translate}"> |
---|
373 | {foreach from=$metadata item=meta} |
---|
374 | <tr> |
---|
375 | <th colspan="2">{$meta.TITLE}</th> |
---|
376 | </tr> |
---|
377 | {foreach from=$meta.lines item=value key=label} |
---|
378 | <tr> |
---|
379 | <td class="label">{$label}</td> |
---|
380 | <td class="value">{$value}</td> |
---|
381 | </tr> |
---|
382 | {/foreach} |
---|
383 | {/foreach} |
---|
384 | </table> |
---|
385 | {/if} |
---|
386 | |
---|
387 | </div> <!-- PANEL --> |
---|
388 | |
---|
389 | <a class="trigger" href="#">infos</a> |
---|
390 | {footer_script}{literal} |
---|
391 | $(document).ready(function(){ |
---|
392 | $(".trigger").click(function(){ |
---|
393 | $(".panel").toggle("fast"); |
---|
394 | $(this).toggleClass("active"); |
---|
395 | return false; |
---|
396 | }); |
---|
397 | }); |
---|
398 | {/literal}{/footer_script} |
---|
399 | |
---|
400 | |
---|
401 | </div>{*image*} |
---|
402 | |
---|
403 | |
---|
404 | |
---|
405 | |
---|
406 | |
---|
407 | {if !empty($PLUGIN_PICTURE_AFTER)}{$PLUGIN_PICTURE_AFTER}{/if} |
---|
408 | |
---|
409 | |
---|
410 | |
---|
411 | </div> |
---|