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