[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 | |
---|
| 99 | <div id="theImageAndTitle"> |
---|
| 100 | <div id="theImageBox"> |
---|
| 101 | {if $DISPLAY_NAV_THUMB} |
---|
| 102 | {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} |
---|
| 103 | {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} |
---|
| 104 | {/if} |
---|
| 105 | <div id="theImage"> |
---|
| 106 | {$ELEMENT_CONTENT} |
---|
| 107 | </div> |
---|
| 108 | </div> |
---|
| 109 | {if $showTitle } |
---|
| 110 | <div id="imageTitleContainer"><div id="imageTitle"> |
---|
| 111 | {if $smarty.config.showDescriptionInsteadOfTitle} |
---|
| 112 | {$COMMENT_IMG|strip_tags:false} |
---|
| 113 | {else} |
---|
| 114 | {$current.TITLE} |
---|
| 115 | {/if} |
---|
| 116 | </div></div> |
---|
| 117 | {/if} |
---|
| 118 | </div> <!-- theImage --> |
---|
| 119 | <div style="clear: both;"></div> |
---|
| 120 | |
---|
| 121 | <div id="tabZone"> |
---|
| 122 | |
---|
| 123 | {assign var='display_info_panel' value=false} |
---|
| 124 | {assign var='display_count' value='0'} |
---|
| 125 | {if $display_info.author}{assign var='display_count' value=$display_count+1}{/if} |
---|
| 126 | {if $display_info.created_on}{assign var='display_count' value=$display_count+1}{/if} |
---|
| 127 | {if $display_info.posted_on}{assign var='display_count' value=$display_count+1}{/if} |
---|
| 128 | {if $display_info.dimensions}{assign var='display_count' value=$display_count+1}{/if} |
---|
| 129 | {if $display_info.file}{assign var='display_count' value=$display_count+1}{/if} |
---|
| 130 | {if $display_info.filesize}{assign var='display_count' value=$display_count+1}{/if} |
---|
| 131 | {if $display_info.categories}{assign var='display_count' value=$display_count+1}{/if} |
---|
| 132 | {if $display_info.visits}{assign var='display_count' value=$display_count+1}{/if} |
---|
| 133 | {if $display_info.average_rate and isset($rate_summary) }{assign var='display_count' value=$display_count+1}{/if} |
---|
| 134 | {if isset($rating)}{assign var='display_count' value=$display_count+1}{/if} |
---|
| 135 | {if $display_info.privacy_level and isset($available_permission_levels) }{assign var='display_count' value=$display_count+1}{/if} |
---|
| 136 | {if (($display_count > 0) && ((isset($U_ADMIN)) || ($smarty.config.infoTabAdminOnly == false)))} |
---|
| 137 | {assign var='display_info_panel' value=true} |
---|
| 138 | {/if} |
---|
| 139 | <div id="tabTitleBar"> |
---|
| 140 | <ul id="tabTitles"> |
---|
| 141 | {if $display_description_tab} |
---|
| 142 | <li id="tabt_caption" class="tabTitle">{'Description'|@translate}</li> |
---|
| 143 | {/if} |
---|
| 144 | {if ($display_info.tags && isset($related_tags))} |
---|
| 145 | <li id="tabt_tags" class="tabTitle">{'Tags'|@translate}</li> |
---|
| 146 | {/if} |
---|
| 147 | {if isset($metadata)} |
---|
| 148 | {foreach from=$metadata item=meta key=id} |
---|
| 149 | <li id="tabt_meta{$id}" class="tabTitle">{$meta.TITLE}</li> |
---|
| 150 | {/foreach} |
---|
| 151 | {/if} |
---|
| 152 | {if $display_info_panel} |
---|
| 153 | <li id="tabt_info" class="tabTitle">{'Informations'|@translate}</li> |
---|
| 154 | {/if} |
---|
| 155 | {if (isset($COMMENT_COUNT) and ($COMMENT_COUNT>0)) or isset($comment_add) } |
---|
| 156 | <li id="tabt_comments" class="tabTitle" title="{'Add a comment'|@translate}">{$pwg->l10n_dec('%d comment', '%d comments',$COMMENT_COUNT)}</li> |
---|
| 157 | {/if} |
---|
| 158 | </ul> |
---|
| 159 | </div> |
---|
| 160 | <div id="tabs"> |
---|
| 161 | {if $display_description_tab} |
---|
| 162 | <div id="t_caption" class="tabBlock"> |
---|
| 163 | {$COMMENT_IMG} |
---|
| 164 | </div> |
---|
| 165 | {/if} |
---|
| 166 | {if ($display_info.tags && isset($related_tags))} |
---|
| 167 | <div id="t_tags" class="tabBlock"> |
---|
| 168 | {foreach from=$related_tags item=tag name=tag_loop}{if !$smarty.foreach.tag_loop.first}, {/if} |
---|
| 169 | <a href="{$tag.URL}">{$tag.name}</a> |
---|
| 170 | {/foreach} |
---|
| 171 | </div> |
---|
| 172 | {/if} |
---|
| 173 | {if isset($metadata)} |
---|
| 174 | {foreach from=$metadata item=meta key=id} |
---|
| 175 | <div id="t_meta{$id}" class="tabBlock"> |
---|
| 176 | {if count($meta.lines)>0 and !array_key_exists('<!--rawContent-->', $meta.lines)} |
---|
| 177 | <table id="table_meta{$id}" class="infoTable2"> |
---|
| 178 | {foreach from=$meta.lines item=value key=label} |
---|
| 179 | <tr> |
---|
| 180 | <td class="label">{$label|@translate}</td> |
---|
| 181 | <td class="value">{$value}</td> |
---|
| 182 | </tr> |
---|
| 183 | {/foreach} |
---|
| 184 | </table> |
---|
| 185 | {else} |
---|
| 186 | {assign var='empty' value='<!--rawContent-->'} |
---|
| 187 | {$meta.lines.$empty} |
---|
| 188 | {/if} |
---|
| 189 | </div> |
---|
| 190 | {/foreach} |
---|
| 191 | {/if} |
---|
| 192 | {if $display_info_panel} |
---|
| 193 | <div id="t_info" class="tabBlock"> |
---|
| 194 | <table id="standard" class="infoTable" summary="{'Some info about this picture'|@translate}"> |
---|
| 195 | {if $display_info.author} |
---|
| 196 | <tr id="Author"> |
---|
| 197 | <td class="label">{'Author'|@translate}</td> |
---|
| 198 | <td class="value">{if isset($INFO_AUTHOR)}{$INFO_AUTHOR}{else}{'N/A'|@translate}{/if}</td> |
---|
| 199 | </tr> |
---|
| 200 | {/if} |
---|
| 201 | {if $display_info.created_on} |
---|
| 202 | <tr id="datecreate"> |
---|
| 203 | <td class="label">{'Created on'|@translate}</td> |
---|
| 204 | <td class="value">{if isset($INFO_CREATION_DATE)}{$INFO_CREATION_DATE}{else}{'N/A'|@translate}{/if}</td> |
---|
| 205 | </tr> |
---|
| 206 | {/if} |
---|
| 207 | {if $display_info.posted_on} |
---|
| 208 | <tr id="datepost"> |
---|
| 209 | <td class="label">{'Posted on'|@translate}</td> |
---|
| 210 | <td class="value">{$INFO_POSTED_DATE}</td> |
---|
| 211 | </tr> |
---|
| 212 | {/if} |
---|
| 213 | {if $display_info.dimensions} |
---|
| 214 | <tr id="Dimensions"> |
---|
| 215 | <td class="label">{'Dimensions'|@translate}</td> |
---|
| 216 | <td class="value">{if isset($INFO_DIMENSIONS)}{$INFO_DIMENSIONS}{else}{'N/A'|@translate}{/if}</td> |
---|
| 217 | </tr> |
---|
| 218 | {/if} |
---|
| 219 | {if $display_info.file} |
---|
| 220 | <tr id="File"> |
---|
| 221 | <td class="label">{'File'|@translate}</td> |
---|
| 222 | <td class="value">{$INFO_FILE}</td> |
---|
| 223 | </tr> |
---|
| 224 | {/if} |
---|
| 225 | {if $display_info.filesize} |
---|
| 226 | <tr id="Filesize"> |
---|
| 227 | <td class="label">{'Filesize'|@translate}</td> |
---|
| 228 | <td class="value">{if isset($INFO_FILESIZE)}{$INFO_FILESIZE}{else}{'N/A'|@translate}{/if}</td> |
---|
| 229 | </tr> |
---|
| 230 | {/if} |
---|
| 231 | {if $display_info.categories} |
---|
| 232 | <tr id="Categories"> |
---|
| 233 | <td class="label">{'Categories'|@translate}</td> |
---|
| 234 | <td class="value"> |
---|
| 235 | {if isset($related_categories)} |
---|
| 236 | <ul> |
---|
| 237 | {foreach from=$related_categories item=cat} |
---|
| 238 | <li>{$cat}</li> |
---|
| 239 | {/foreach} |
---|
| 240 | </ul> |
---|
| 241 | {/if} |
---|
| 242 | </td> |
---|
| 243 | </tr> |
---|
| 244 | {/if} |
---|
| 245 | {if $display_info.visits} |
---|
| 246 | <tr id="Visits"> |
---|
| 247 | <td class="label">{'Visits'|@translate}</td> |
---|
| 248 | <td class="value">{$INFO_VISITS}</td> |
---|
| 249 | </tr> |
---|
| 250 | {/if} |
---|
| 251 | |
---|
| 252 | {if $display_info.average_rate and isset($rate_summary) } |
---|
| 253 | <tr id="Average"> |
---|
| 254 | <td class="label">{'Average rate'|@translate}</td> |
---|
| 255 | <td class="value" id="ratingSummary"> |
---|
| 256 | {if $rate_summary.count} |
---|
| 257 | {assign var='rate_text' value='%.2f (rated %d times)'|@translate } |
---|
| 258 | {$pwg->sprintf($rate_text, $rate_summary.average, $rate_summary.count) } |
---|
| 259 | {else} |
---|
| 260 | {'no rate'|@translate} |
---|
| 261 | {/if} |
---|
| 262 | </td> |
---|
| 263 | </tr> |
---|
| 264 | {/if} |
---|
| 265 | |
---|
| 266 | {if isset($rating)} |
---|
| 267 | <tr id="rating"> |
---|
| 268 | <td class="label"> |
---|
| 269 | <span id="updateRate">{if isset($rating.USER_RATE)}{'Update your rating'|@translate}{else}{'Rate this picture'|@translate}{/if}</span> |
---|
| 270 | </td> |
---|
| 271 | <td class="value"> |
---|
| 272 | <form action="{$rating.F_ACTION}" method="post" id="rateForm" style="margin:0;"> |
---|
| 273 | <div> |
---|
| 274 | {foreach from=$rating.marks item=mark name=rate_loop} |
---|
| 275 | {if !$smarty.foreach.rate_loop.first} | {/if} |
---|
| 276 | {if isset($rating.USER_RATE) && $mark==$rating.USER_RATE} |
---|
| 277 | <input type="button" name="rate" value="{$mark}" class="rateButtonSelected" title="{$mark}"> |
---|
| 278 | {else} |
---|
| 279 | <input type="submit" name="rate" value="{$mark}" class="rateButton" title="{$mark}"> |
---|
| 280 | {/if} |
---|
| 281 | {/foreach} |
---|
| 282 | <script type="text/javascript" src="{$ROOT_URL}themes/default/js/rating.js"></script> |
---|
| 283 | <script type="text/javascript"> |
---|
| 284 | makeNiceRatingForm( {ldelim}rootUrl: '{$ROOT_URL|@escape:"javascript"}', image_id: {$current.id}, |
---|
| 285 | updateRateText: "{'Update your rating'|@translate|@escape:'javascript'}", updateRateElement: document.getElementById("updateRate"), |
---|
| 286 | ratingSummaryText: "{'%.2f (rated %d times)'|@translate|@escape:'javascript'}", ratingSummaryElement: document.getElementById("ratingSummary") {rdelim} ); |
---|
| 287 | </script> |
---|
| 288 | </div> |
---|
| 289 | </form> |
---|
| 290 | </td> |
---|
| 291 | </tr> |
---|
| 292 | {/if} |
---|
| 293 | |
---|
| 294 | {if $display_info.privacy_level and isset($available_permission_levels) } |
---|
| 295 | <tr id="Privacy"> |
---|
| 296 | <td class="label">{'Who can see this photo?'|@translate}</td> |
---|
| 297 | <td class="value"> |
---|
| 298 | <script type="text/javascript"> |
---|
| 299 | {literal}function setPrivacyLevel(selectElement, rootUrl, id, level) { |
---|
| 300 | selectElement.disabled = true; |
---|
| 301 | var y = new PwgWS(rootUrl); |
---|
| 302 | y.callService( |
---|
| 303 | "pwg.images.setPrivacyLevel", {image_id: id, level:level} , |
---|
| 304 | { |
---|
| 305 | method: "POST", |
---|
| 306 | onFailure: function(num, text) { selectElement.disabled = false; alert(num + " " + text); }, |
---|
| 307 | onSuccess: function(result) { selectElement.disabled = false; } |
---|
| 308 | } |
---|
| 309 | ); |
---|
| 310 | }{/literal} |
---|
| 311 | </script> |
---|
| 312 | <select onchange="setPrivacyLevel(this, '{$ROOT_URL|@escape:'javascript'}', {$current.id}, this.options[selectedIndex].value)"> |
---|
| 313 | {foreach from=$available_permission_levels item=label key=level} |
---|
| 314 | <option label="{$label}" value="{$level}"{if $level == $current.level} selected="selected"{/if}>{$label}</option> |
---|
| 315 | {/foreach} |
---|
| 316 | </select> |
---|
| 317 | </td> |
---|
| 318 | </tr> |
---|
| 319 | {/if} |
---|
| 320 | |
---|
| 321 | </table> |
---|
| 322 | </div> |
---|
| 323 | {/if} |
---|
| 324 | {if (isset($COMMENT_COUNT) and ($COMMENT_COUNT>0)) or isset($comment_add) } |
---|
| 325 | <div id="theComments" id="t_comments" class="tabBlock"> |
---|
| 326 | <div id="theCommentsBlock"> |
---|
| 327 | {if !empty($COMMENT_NAV_BAR)} |
---|
| 328 | <div class="navigationBar">{$COMMENT_NAV_BAR}</div> |
---|
| 329 | {/if} |
---|
| 330 | {if isset($comment_add)} |
---|
| 331 | <div id="commentAdd"> |
---|
| 332 | <h4>{'Add a comment'|@translate}</h4> |
---|
| 333 | <form method="post" action="{$comment_add.F_ACTION}" class="filter"> |
---|
| 334 | {if $comment_add.SHOW_AUTHOR} |
---|
| 335 | <p><label>{'Author'|@translate} :</label></p> |
---|
| 336 | <p><input type="text" name="author" /></p> |
---|
| 337 | {/if} |
---|
| 338 | <p><label>{'Comment'|@translate} :</label></p> |
---|
| 339 | <p><textarea name="content" id="contentid" rows="5" cols="50">{$comment_add.CONTENT}</textarea></p> |
---|
| 340 | <p><input type="hidden" name="key" value="{$comment_add.KEY}" /> |
---|
| 341 | <input class="submit" type="submit" value="{'Submit'|@translate}"></p> |
---|
| 342 | </form> |
---|
| 343 | </div> |
---|
| 344 | {/if} |
---|
| 345 | {if !empty($navbar) }{include file='navigation_bar.tpl'|@get_extent:'navbar'}{/if} |
---|
| 346 | {if isset($comments)} |
---|
| 347 | <div id="commentList"> |
---|
| 348 | {include file='comment_list.tpl'} |
---|
| 349 | </div> |
---|
| 350 | {/if} |
---|
| 351 | <div style="clear: both;"></div> |
---|
| 352 | </div> |
---|
| 353 | </div> |
---|
| 354 | {/if} |
---|
| 355 | </div> |
---|
| 356 | </div> |
---|
| 357 | <div style="clear: both;"></div> |
---|
| 358 | </div> |
---|
| 359 | {if !empty($PLUGIN_PICTURE_AFTER)}{$PLUGIN_PICTURE_AFTER}{/if} |
---|