1 | {if isset($errors)} |
---|
2 | <div class="errors"> |
---|
3 | <ul> |
---|
4 | {foreach from=$errors item=error} |
---|
5 | <li>{$error}</li> |
---|
6 | {/foreach} |
---|
7 | </ul> |
---|
8 | </div> |
---|
9 | {/if} |
---|
10 | {if isset($infos)} |
---|
11 | <div class="infos"> |
---|
12 | <ul> |
---|
13 | {foreach from=$infos item=info} |
---|
14 | <li>{$info}</li> |
---|
15 | {/foreach} |
---|
16 | </ul> |
---|
17 | </div> |
---|
18 | {/if} |
---|
19 | |
---|
20 | <div class="titrePage" id="imageHeaderBar"> |
---|
21 | <div class="browsePath"> |
---|
22 | {$SECTION_TITLE} |
---|
23 | {if ($smarty.config.showTitleOnBrowsePath)}{$LEVEL_SEPARATOR}{$current.TITLE}{/if} |
---|
24 | </div> |
---|
25 | <ul class="randomButtons"> |
---|
26 | {if isset($PLUGIN_PICTURE_ACTIONS)}{$PLUGIN_PICTURE_ACTIONS}{/if} |
---|
27 | {if isset($favorite) } |
---|
28 | <li><a href="{$favorite.U_FAVORITE}" title="{$favorite.FAVORITE_HINT}">{'Favorites'|@translate}</a></li> |
---|
29 | {/if} |
---|
30 | {if !empty($U_SET_AS_REPRESENTATIVE) } |
---|
31 | <li><a href="{$U_SET_AS_REPRESENTATIVE}" title="{'set as category representative'|@translate}">{'representative'|@translate}</a></li> |
---|
32 | {/if} |
---|
33 | {if isset($U_ADMIN) } |
---|
34 | <li><a href="{$U_ADMIN}" title="{'Modify information'|@translate}">{'edit'|@translate}</a></li> |
---|
35 | {/if} |
---|
36 | {if isset($U_CADDIE) }{*caddie management BEGIN*} |
---|
37 | <script type="text/javascript"> |
---|
38 | {literal}function addToCadie(aElement, rootUrl, id) |
---|
39 | { |
---|
40 | if (aElement.disabled) return; |
---|
41 | aElement.disabled=true; |
---|
42 | var y = new PwgWS(rootUrl); |
---|
43 | |
---|
44 | y.callService( |
---|
45 | "pwg.caddie.add", {image_id: id} , |
---|
46 | { |
---|
47 | onFailure: function(num, text) { alert(num + " " + text); document.location=aElement.href; }, |
---|
48 | onSuccess: function(result) { aElement.disabled = false; } |
---|
49 | } |
---|
50 | ); |
---|
51 | }{/literal} |
---|
52 | </script> |
---|
53 | <li><a href="{$U_CADDIE}" onclick="addToCadie(this, '{$ROOT_URL|@escape:'javascript'}', {$current.id}); return false;" title="{'add to caddie'|@translate}">{'caddie'|@translate}</a></li> |
---|
54 | {/if}{*caddie management END*} |
---|
55 | {if isset($U_SLIDESHOW_START) } |
---|
56 | <li><a href="{$U_SLIDESHOW_START}" title="{'slideshow'|@translate}" rel="nofollow">{'slideshow'|@translate}</a></li> |
---|
57 | {/if} |
---|
58 | <li id="imageToolBar"> |
---|
59 | {include file='picture_nav_buttons.tpl'|@get_extent:'picture_nav_buttons'} |
---|
60 | </li> |
---|
61 | <li class="imageNumber">{$PHOTO}</li> |
---|
62 | {php} |
---|
63 | global $pwg_loaded_plugins; |
---|
64 | $this->assign('GMaps_loaded', isset($pwg_loaded_plugins[ 'GMaps' ])); |
---|
65 | {/php} |
---|
66 | {if ($GMaps_loaded)}<div id="text_gmaps" style="display:none">{'GMap'|@translate}</div>{/if} |
---|
67 | </ul> |
---|
68 | <div style="clear:both;"></div> |
---|
69 | </div> <!-- imageHeaderBar --> |
---|
70 | |
---|
71 | {if !empty($PLUGIN_PICTURE_BEFORE)}{$PLUGIN_PICTURE_BEFORE}{/if} |
---|
72 | <div id="content"> |
---|
73 | |
---|
74 | <!-- Image HD --> |
---|
75 | <div id="theImageHigh" style="display:none;"> |
---|
76 | <div id="theImgHighBg"></div> |
---|
77 | <div id="theImgHighContainer"> |
---|
78 | <div id="theImgHighCloseButton" onclick="closeDisplayHigh();"></div> |
---|
79 | <div id="theImgHighZoomButton" class="fit" onclick="switchZoomHigh();"></div> |
---|
80 | <div id="theImgHighContainer2"> |
---|
81 | <img id="theImgHigh" src="" style="display:none;" alt="{$ALT_IMG}"> |
---|
82 | </div> |
---|
83 | </div> |
---|
84 | </div> |
---|
85 | |
---|
86 | {assign var='display_description_tab' value=false} |
---|
87 | {if (!($smarty.config.showDescriptionInsteadOfTitle) && isset($COMMENT_IMG))} |
---|
88 | {assign var='display_description_tab' value=true} |
---|
89 | {/if} |
---|
90 | |
---|
91 | {assign var='showTitle' value=false} |
---|
92 | {if ($SHOW_PICTURE_NAME_ON_TITLE && (isset($COMMENT_IMG) || !($smarty.config.showDescriptionInsteadOfTitle) ))} |
---|
93 | {assign var='showTitle' value=true} |
---|
94 | {/if} |
---|
95 | |
---|
96 | {php} |
---|
97 | global $pwg_loaded_plugins; |
---|
98 | $this->assign('Nothumbs', (isset($pwg_loaded_plugins[ 'Autosize' ]) || isset($pwg_loaded_plugins[ 'look_like_gbo2' ]))); |
---|
99 | {/php} |
---|
100 | |
---|
101 | <div id="theImageAndTitle"> |
---|
102 | <div id="theImageBox"> |
---|
103 | {if ($DISPLAY_NAV_THUMB) && !($Nothumbs)} |
---|
104 | {if isset($previous) }<div id="linkPrevOut"><a id="linkPrevIn" href="{$previous.U_IMG}" title="{'previous_page'|@translate} : {$previous.TITLE}" rel="prev"><div class="navThumb" ><img src="{$previous.THUMB_SRC}" alt="{$previous.TITLE}" /></div></a></div>{/if} |
---|
105 | {if isset($next) }<div id="linkNextOut"><a id="linkNextIn" href="{$next.U_IMG}" title="{'next_page'|@translate} : {$next.TITLE}" rel="next"><div class="navThumb" ><img src="{$next.THUMB_SRC}" alt="{$next.TITLE}" /></div></a></div>{/if} |
---|
106 | {/if} |
---|
107 | <div id="theImage"> |
---|
108 | {$ELEMENT_CONTENT} |
---|
109 | </div> |
---|
110 | </div> |
---|
111 | {if $showTitle } |
---|
112 | <div id="imageTitleContainer"><div id="imageTitle"> |
---|
113 | {if $smarty.config.showDescriptionInsteadOfTitle} |
---|
114 | {$COMMENT_IMG|strip_tags:false} |
---|
115 | {else} |
---|
116 | {$current.TITLE} |
---|
117 | {/if} |
---|
118 | </div></div> |
---|
119 | {/if} |
---|
120 | </div> <!-- theImage --> |
---|
121 | <div style="clear: both;"></div> |
---|
122 | |
---|
123 | <div id="tabZone"> |
---|
124 | |
---|
125 | {assign var='display_info_panel' value=false} |
---|
126 | {assign var='display_count' value='0'} |
---|
127 | {if $display_info.author}{assign var='display_count' value=$display_count+1}{/if} |
---|
128 | {if $display_info.created_on}{assign var='display_count' value=$display_count+1}{/if} |
---|
129 | {if $display_info.posted_on}{assign var='display_count' value=$display_count+1}{/if} |
---|
130 | {if $display_info.dimensions}{assign var='display_count' value=$display_count+1}{/if} |
---|
131 | {if $display_info.file}{assign var='display_count' value=$display_count+1}{/if} |
---|
132 | {if $display_info.filesize}{assign var='display_count' value=$display_count+1}{/if} |
---|
133 | {if $display_info.categories}{assign var='display_count' value=$display_count+1}{/if} |
---|
134 | {if $display_info.visits}{assign var='display_count' value=$display_count+1}{/if} |
---|
135 | {if $display_info.average_rate and isset($rate_summary) }{assign var='display_count' value=$display_count+1}{/if} |
---|
136 | {if isset($rating)}{assign var='display_count' value=$display_count+1}{/if} |
---|
137 | {if $display_info.privacy_level and isset($available_permission_levels) }{assign var='display_count' value=$display_count+1}{/if} |
---|
138 | {if (($display_count > 0) && ((isset($U_ADMIN)) || ($smarty.config.infoTabAdminOnly == false)))} |
---|
139 | {assign var='display_info_panel' value=true} |
---|
140 | {/if} |
---|
141 | <div id="tabTitleBar"> |
---|
142 | <ul id="tabTitles"> |
---|
143 | {if $display_description_tab} |
---|
144 | <li id="tabTcaption" class="tabTitle">{'Description'|@translate}</li> |
---|
145 | {/if} |
---|
146 | {if ($display_info.tags && isset($related_tags))} |
---|
147 | <li id="tabTtags" class="tabTitle">{'Tags'|@translate}</li> |
---|
148 | {/if} |
---|
149 | {if isset($metadata)} |
---|
150 | {foreach from=$metadata item=meta key=id} |
---|
151 | <li id="tabTmeta{$id}" class="tabTitle">{$meta.TITLE}</li> |
---|
152 | {/foreach} |
---|
153 | {/if} |
---|
154 | {if $display_info_panel} |
---|
155 | <li id="tabTinfo" class="tabTitle">{'Informations'|@translate}</li> |
---|
156 | {/if} |
---|
157 | {if (isset($COMMENT_COUNT) and ($COMMENT_COUNT>0)) or isset($comment_add) } |
---|
158 | <li id="tabT_comments" class="tabTitle" title="{'Add a comment'|@translate}">{$pwg->l10n_dec('%d comment', '%d comments',$COMMENT_COUNT)}</li> |
---|
159 | {/if} |
---|
160 | </ul> |
---|
161 | </div> |
---|
162 | <div id="tabs"> |
---|
163 | {if $display_description_tab} |
---|
164 | <div id="Tcaption" class="tabBlock"><div class="tabBlockContent"> |
---|
165 | {$COMMENT_IMG} |
---|
166 | </div></div> |
---|
167 | {/if} |
---|
168 | {if ($display_info.tags && isset($related_tags))} |
---|
169 | <div id="Ttags" class="tabBlock"><div class="tabBlockContent"> |
---|
170 | {foreach from=$related_tags item=tag name=tag_loop}{if !$smarty.foreach.tag_loop.first}, {/if} |
---|
171 | <a href="{$tag.URL}">{$tag.name}</a> |
---|
172 | {/foreach} |
---|
173 | </div></div> |
---|
174 | {/if} |
---|
175 | {if isset($metadata)} |
---|
176 | {foreach from=$metadata item=meta key=id} |
---|
177 | <div id="Tmeta{$id}" class="tabBlock"><div class="tabBlockContent"> |
---|
178 | {if count($meta.lines)>0 and !array_key_exists('<!--rawContent-->', $meta.lines)} |
---|
179 | <table id="table_meta{$id}" class="infoTable2"> |
---|
180 | {foreach from=$meta.lines item=value key=label} |
---|
181 | <tr> |
---|
182 | <td class="label">{$label|@translate}</td> |
---|
183 | <td class="value">{$value}</td> |
---|
184 | </tr> |
---|
185 | {/foreach} |
---|
186 | </table> |
---|
187 | {else} |
---|
188 | {assign var='empty' value='<!--rawContent-->'} |
---|
189 | {$meta.lines.$empty} |
---|
190 | {/if} |
---|
191 | </div></div> |
---|
192 | {/foreach} |
---|
193 | {/if} |
---|
194 | {if $display_info_panel} |
---|
195 | <div id="Tinfo" class="tabBlock"><div class="tabBlockContent"> |
---|
196 | <table id="standard" class="infoTable" summary="{'Some info about this picture'|@translate}"> |
---|
197 | {if $display_info.author} |
---|
198 | <tr id="Author"> |
---|
199 | <td class="label">{'Author'|@translate}</td> |
---|
200 | <td class="value">{if isset($INFO_AUTHOR)}{$INFO_AUTHOR}{else}{'N/A'|@translate}{/if}</td> |
---|
201 | </tr> |
---|
202 | {/if} |
---|
203 | {if $display_info.created_on} |
---|
204 | <tr id="datecreate"> |
---|
205 | <td class="label">{'Created on'|@translate}</td> |
---|
206 | <td class="value">{if isset($INFO_CREATION_DATE)}{$INFO_CREATION_DATE}{else}{'N/A'|@translate}{/if}</td> |
---|
207 | </tr> |
---|
208 | {/if} |
---|
209 | {if $display_info.posted_on} |
---|
210 | <tr id="datepost"> |
---|
211 | <td class="label">{'Posted on'|@translate}</td> |
---|
212 | <td class="value">{$INFO_POSTED_DATE}</td> |
---|
213 | </tr> |
---|
214 | {/if} |
---|
215 | {if $display_info.dimensions} |
---|
216 | <tr id="Dimensions"> |
---|
217 | <td class="label">{'Dimensions'|@translate}</td> |
---|
218 | <td class="value">{if isset($INFO_DIMENSIONS)}{$INFO_DIMENSIONS}{else}{'N/A'|@translate}{/if}</td> |
---|
219 | </tr> |
---|
220 | {/if} |
---|
221 | {if $display_info.file} |
---|
222 | <tr id="File"> |
---|
223 | <td class="label">{'File'|@translate}</td> |
---|
224 | <td class="value">{$INFO_FILE}</td> |
---|
225 | </tr> |
---|
226 | {/if} |
---|
227 | {if $display_info.filesize} |
---|
228 | <tr id="Filesize"> |
---|
229 | <td class="label">{'Filesize'|@translate}</td> |
---|
230 | <td class="value">{if isset($INFO_FILESIZE)}{$INFO_FILESIZE}{else}{'N/A'|@translate}{/if}</td> |
---|
231 | </tr> |
---|
232 | {/if} |
---|
233 | {if $display_info.categories} |
---|
234 | <tr id="Categories"> |
---|
235 | <td class="label">{'Categories'|@translate}</td> |
---|
236 | <td class="value"> |
---|
237 | {if isset($related_categories)} |
---|
238 | <ul> |
---|
239 | {foreach from=$related_categories item=cat} |
---|
240 | <li>{$cat}</li> |
---|
241 | {/foreach} |
---|
242 | </ul> |
---|
243 | {/if} |
---|
244 | </td> |
---|
245 | </tr> |
---|
246 | {/if} |
---|
247 | {if $display_info.visits} |
---|
248 | <tr id="Visits"> |
---|
249 | <td class="label">{'Visits'|@translate}</td> |
---|
250 | <td class="value">{$INFO_VISITS}</td> |
---|
251 | </tr> |
---|
252 | {/if} |
---|
253 | |
---|
254 | {if $display_info.average_rate and isset($rate_summary) } |
---|
255 | <tr id="Average"> |
---|
256 | <td class="label">{'Average rate'|@translate}</td> |
---|
257 | <td class="value" id="ratingSummary"> |
---|
258 | {if $rate_summary.count} |
---|
259 | {assign var='rate_text' value='%.2f (rated %d times)'|@translate } |
---|
260 | {$pwg->sprintf($rate_text, $rate_summary.average, $rate_summary.count) } |
---|
261 | {else} |
---|
262 | {'no rate'|@translate} |
---|
263 | {/if} |
---|
264 | </td> |
---|
265 | </tr> |
---|
266 | {/if} |
---|
267 | |
---|
268 | {if isset($rating)} |
---|
269 | <tr id="rating"> |
---|
270 | <td class="label"> |
---|
271 | <span id="updateRate">{if isset($rating.USER_RATE)}{'Update your rating'|@translate}{else}{'Rate this picture'|@translate}{/if}</span> |
---|
272 | </td> |
---|
273 | <td class="value"> |
---|
274 | <form action="{$rating.F_ACTION}" method="post" id="rateForm" style="margin:0;"> |
---|
275 | <div> |
---|
276 | {foreach from=$rating.marks item=mark name=rate_loop} |
---|
277 | {if !$smarty.foreach.rate_loop.first} | {/if} |
---|
278 | {if isset($rating.USER_RATE) && $mark==$rating.USER_RATE} |
---|
279 | <input type="button" name="rate" value="{$mark}" class="rateButtonSelected" title="{$mark}"> |
---|
280 | {else} |
---|
281 | <input type="submit" name="rate" value="{$mark}" class="rateButton" title="{$mark}"> |
---|
282 | {/if} |
---|
283 | {/foreach} |
---|
284 | <script type="text/javascript" src="{$ROOT_URL}themes/default/js/rating.js"></script> |
---|
285 | <script type="text/javascript"> |
---|
286 | makeNiceRatingForm( {ldelim}rootUrl: '{$ROOT_URL|@escape:"javascript"}', image_id: {$current.id}, |
---|
287 | updateRateText: "{'Update your rating'|@translate|@escape:'javascript'}", updateRateElement: document.getElementById("updateRate"), |
---|
288 | ratingSummaryText: "{'%.2f (rated %d times)'|@translate|@escape:'javascript'}", ratingSummaryElement: document.getElementById("ratingSummary") {rdelim} ); |
---|
289 | </script> |
---|
290 | </div> |
---|
291 | </form> |
---|
292 | </td> |
---|
293 | </tr> |
---|
294 | {/if} |
---|
295 | |
---|
296 | {if $display_info.privacy_level and isset($available_permission_levels) } |
---|
297 | <tr id="Privacy"> |
---|
298 | <td class="label">{'Who can see this photo?'|@translate}</td> |
---|
299 | <td class="value"> |
---|
300 | <script type="text/javascript"> |
---|
301 | {literal}function setPrivacyLevel(selectElement, rootUrl, id, level) { |
---|
302 | selectElement.disabled = true; |
---|
303 | var y = new PwgWS(rootUrl); |
---|
304 | y.callService( |
---|
305 | "pwg.images.setPrivacyLevel", {image_id: id, level:level} , |
---|
306 | { |
---|
307 | method: "POST", |
---|
308 | onFailure: function(num, text) { selectElement.disabled = false; alert(num + " " + text); }, |
---|
309 | onSuccess: function(result) { selectElement.disabled = false; } |
---|
310 | } |
---|
311 | ); |
---|
312 | }{/literal} |
---|
313 | </script> |
---|
314 | <select onchange="setPrivacyLevel(this, '{$ROOT_URL|@escape:'javascript'}', {$current.id}, this.options[selectedIndex].value)"> |
---|
315 | {foreach from=$available_permission_levels item=label key=level} |
---|
316 | <option label="{$label}" value="{$level}"{if $level == $current.level} selected="selected"{/if}>{$label}</option> |
---|
317 | {/foreach} |
---|
318 | </select> |
---|
319 | </td> |
---|
320 | </tr> |
---|
321 | {/if} |
---|
322 | |
---|
323 | </table> |
---|
324 | </div></div> |
---|
325 | {/if} |
---|
326 | {if (isset($COMMENT_COUNT) and ($COMMENT_COUNT>0)) or isset($comment_add) } |
---|
327 | <div id="Tcomments" class="tabBlock"><div id="theComments" class="tabBlockContent"> |
---|
328 | <div id="theCommentsBlock"> |
---|
329 | {if !empty($COMMENT_NAV_BAR)} |
---|
330 | <div class="navigationBar">{$COMMENT_NAV_BAR}</div> |
---|
331 | {/if} |
---|
332 | {if isset($comment_add)} |
---|
333 | <div id="commentAdd"> |
---|
334 | <h4>{'Add a comment'|@translate}</h4> |
---|
335 | <form method="post" action="{$comment_add.F_ACTION}" class="filter"> |
---|
336 | {if $comment_add.SHOW_AUTHOR} |
---|
337 | <p><label>{'Author'|@translate} :</label></p> |
---|
338 | <p><input type="text" name="author" /></p> |
---|
339 | {/if} |
---|
340 | <p><label>{'Comment'|@translate} :</label></p> |
---|
341 | <p><textarea name="content" id="contentid" rows="5" cols="50">{$comment_add.CONTENT}</textarea></p> |
---|
342 | <p><input type="hidden" name="key" value="{$comment_add.KEY}" /> |
---|
343 | <input class="submit" type="submit" value="{'Submit'|@translate}"></p> |
---|
344 | </form> |
---|
345 | </div> |
---|
346 | {/if} |
---|
347 | {if !empty($navbar) }{include file='navigation_bar.tpl'|@get_extent:'navbar'}{/if} |
---|
348 | {if isset($comments)} |
---|
349 | <div id="commentList"> |
---|
350 | {include file='comment_list.tpl'} |
---|
351 | </div> |
---|
352 | {/if} |
---|
353 | <div style="clear: both;"></div> |
---|
354 | </div> |
---|
355 | </div></div> |
---|
356 | {/if} |
---|
357 | </div> |
---|
358 | </div> |
---|
359 | <div style="clear: both;"></div> |
---|
360 | </div> |
---|
361 | {if !empty($PLUGIN_PICTURE_AFTER)}{$PLUGIN_PICTURE_AFTER}{/if} |
---|