[19549] | 1 | {html_style}#footer{ldelim}display:none}#theHeader{ldelim}display:none}{/html_style} |
---|
[19033] | 2 | |
---|
| 3 | {* Example of resizeable |
---|
| 4 | {include file='include/autosize.inc.tpl'} |
---|
| 5 | *} |
---|
| 6 | <div id="content"> |
---|
| 7 | {if isset($errors) or not empty($infos)} |
---|
| 8 | {include file='infos_errors.tpl'} |
---|
| 9 | {/if} |
---|
| 10 | {if !empty($PLUGIN_PICTURE_BEFORE)}{$PLUGIN_PICTURE_BEFORE}{/if} |
---|
| 11 | |
---|
| 12 | |
---|
| 13 | <div id="imageToolBar"> |
---|
| 14 | <div class="imageNumber">{$PHOTO}</div> |
---|
| 15 | <div class="actionButtons"> |
---|
| 16 | |
---|
| 17 | {strip}{if isset($U_METADATA)} |
---|
| 18 | <a href="{$U_METADATA}" title="{'Show file metadata'|@translate}" class="pwg-state-default pwg-button" rel="nofollow"> |
---|
| 19 | <span class="pwg-icon pwg-icon-camera-info"> </span><span class="pwg-button-text">{'Show file metadata'|@translate}</span> |
---|
| 20 | </a> |
---|
| 21 | {/if}{/strip} |
---|
| 22 | {strip}{if isset($current.U_DOWNLOAD)} |
---|
| 23 | <a href="{$current.U_DOWNLOAD}" title="{'Download this file'|@translate}" class="pwg-state-default pwg-button" rel="nofollow"> |
---|
| 24 | <span class="pwg-icon pwg-icon-save"> </span><span class="pwg-button-text">{'Download'|@translate}</span> |
---|
| 25 | </a> |
---|
| 26 | {/if}{/strip} |
---|
| 27 | {if isset($PLUGIN_PICTURE_ACTIONS)}{$PLUGIN_PICTURE_ACTIONS}{/if} |
---|
| 28 | {strip}{if isset($favorite)} |
---|
| 29 | <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"> |
---|
| 30 | <span class="pwg-icon pwg-icon-favorite-{if $favorite.IS_FAVORITE}del{else}add{/if}"> </span><span class="pwg-button-text">{'Favorites'|@translate}</span> |
---|
| 31 | </a> |
---|
| 32 | {/if}{/strip} |
---|
| 33 | {strip}{if isset($U_SET_AS_REPRESENTATIVE)} |
---|
| 34 | <a href="{$U_SET_AS_REPRESENTATIVE}" title="{'set as album representative'|@translate}" class="pwg-state-default pwg-button" rel="nofollow"> |
---|
| 35 | <span class="pwg-icon pwg-icon-representative"> </span><span class="pwg-button-text">{'representative'|@translate}</span> |
---|
| 36 | </a> |
---|
| 37 | {/if}{/strip} |
---|
| 38 | {strip}{if isset($U_ADMIN)} |
---|
| 39 | <a href="{$U_ADMIN}" title="{'Modify information'|@translate}" class="pwg-state-default pwg-button" rel="nofollow"> |
---|
| 40 | <span class="pwg-icon pwg-icon-edit"> </span><span class="pwg-button-text">{'Edit'|@translate}</span> |
---|
| 41 | </a> |
---|
| 42 | {/if}{/strip} |
---|
| 43 | {strip}{if isset($U_CADDIE)}{*caddie management BEGIN*} |
---|
| 44 | {footer_script} |
---|
| 45 | {literal}function addToCadie(aElement, rootUrl, id) |
---|
| 46 | { |
---|
| 47 | if (aElement.disabled) return; |
---|
| 48 | aElement.disabled=true; |
---|
| 49 | var y = new PwgWS(rootUrl); |
---|
| 50 | y.callService( |
---|
| 51 | "pwg.caddie.add", {image_id: id} , |
---|
| 52 | { |
---|
| 53 | onFailure: function(num, text) { alert(num + " " + text); document.location=aElement.href; }, |
---|
| 54 | onSuccess: function(result) { aElement.disabled = false; } |
---|
| 55 | } |
---|
| 56 | ); |
---|
| 57 | }{/literal} |
---|
| 58 | {/footer_script} |
---|
| 59 | <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"> |
---|
| 60 | <span class="pwg-icon pwg-icon-caddie-add"> </span><span class="pwg-button-text">{'Caddie'|@translate}</span> |
---|
| 61 | </a> |
---|
| 62 | {/if}{/strip}{*caddie management END*} |
---|
| 63 | </div> |
---|
| 64 | </div>{*<!-- imageToolBar -->*} |
---|
| 65 | |
---|
| 66 | <div id="theImageAndInfos"> |
---|
| 67 | <div id="theImage"> |
---|
| 68 | {$ELEMENT_CONTENT} |
---|
| 69 | |
---|
| 70 | {if isset($COMMENT_IMG)} |
---|
| 71 | <p class="imageComment">{$COMMENT_IMG}</p> |
---|
| 72 | {/if} |
---|
| 73 | {if isset($U_SLIDESHOW_STOP)} |
---|
| 74 | <p> |
---|
| 75 | [ <a href="{$U_SLIDESHOW_STOP}">{'stop the slideshow'|@translate}</a> ] |
---|
| 76 | </p> |
---|
| 77 | {/if} |
---|
| 78 | |
---|
| 79 | </div>{*<!-- no significant white space for elegant--> |
---|
| 80 | *}<div id="infoSwitcher"></div>{*<!-- no significant white space for elegant--> |
---|
| 81 | *}<div id="imageInfos"> |
---|
| 82 | |
---|
| 83 | <dl id="standard" class="imageInfoTable"> |
---|
| 84 | {strip} |
---|
| 85 | {if $display_info.author and isset($INFO_AUTHOR)} |
---|
| 86 | <div id="Author" class="imageInfo"> |
---|
| 87 | <dt>{'Author'|@translate}</dt> |
---|
| 88 | <dd>{$INFO_AUTHOR}</dd> |
---|
| 89 | </div> |
---|
| 90 | {/if} |
---|
| 91 | {if $display_info.created_on and isset($INFO_CREATION_DATE)} |
---|
| 92 | <div id="datecreate" class="imageInfo"> |
---|
| 93 | <dt>{'Created on'|@translate}</dt> |
---|
| 94 | <dd>{$INFO_CREATION_DATE}</dd> |
---|
| 95 | </div> |
---|
| 96 | {/if} |
---|
| 97 | {if $display_info.posted_on} |
---|
| 98 | <div id="datepost" class="imageInfo"> |
---|
| 99 | <dt>{'Posted on'|@translate}</dt> |
---|
| 100 | <dd>{$INFO_POSTED_DATE}</dd> |
---|
| 101 | </div> |
---|
| 102 | {/if} |
---|
| 103 | {if $display_info.dimensions and isset($INFO_DIMENSIONS)} |
---|
| 104 | <div id="Dimensions" class="imageInfo"> |
---|
| 105 | <dt>{'Dimensions'|@translate}</dt> |
---|
| 106 | <dd>{$INFO_DIMENSIONS}</dd> |
---|
| 107 | </div> |
---|
| 108 | {/if} |
---|
| 109 | {if $display_info.file} |
---|
| 110 | <div id="File" class="imageInfo"> |
---|
| 111 | <dt>{'File'|@translate}</dt> |
---|
| 112 | <dd>{$INFO_FILE}</dd> |
---|
| 113 | </div> |
---|
| 114 | {/if} |
---|
| 115 | {if $display_info.filesize and isset($INFO_FILESIZE)} |
---|
| 116 | <div id="Filesize" class="imageInfo"> |
---|
| 117 | <dt>{'Filesize'|@translate}</dt> |
---|
| 118 | <dd>{$INFO_FILESIZE}</dd> |
---|
| 119 | </div> |
---|
| 120 | {/if} |
---|
| 121 | {if $display_info.tags and isset($related_tags)} |
---|
| 122 | <div id="Tags" class="imageInfo"> |
---|
| 123 | <dt>{'Tags'|@translate}</dt> |
---|
| 124 | <dd> |
---|
| 125 | {foreach from=$related_tags item=tag name=tag_loop}{if !$smarty.foreach.tag_loop.first}, {/if}<a href="{$tag.URL}">{$tag.name}</a>{/foreach} |
---|
| 126 | </dd> |
---|
| 127 | </div> |
---|
| 128 | {/if} |
---|
| 129 | {if $display_info.categories and isset($related_categories)} |
---|
| 130 | <div id="Categories" class="imageInfo"> |
---|
| 131 | <dt>{'Albums'|@translate}</dt> |
---|
| 132 | <dd> |
---|
| 133 | <ul> |
---|
| 134 | {foreach from=$related_categories item=cat} |
---|
| 135 | <li>{$cat}</li> |
---|
| 136 | {/foreach} |
---|
| 137 | </ul> |
---|
| 138 | </dd> |
---|
| 139 | </div> |
---|
| 140 | {/if} |
---|
| 141 | {if $display_info.visits} |
---|
| 142 | <div id="Visits" class="imageInfo"> |
---|
| 143 | <dt>{'Visits'|@translate}</dt> |
---|
| 144 | <dd>{$INFO_VISITS}</dd> |
---|
| 145 | </div> |
---|
| 146 | {/if} |
---|
| 147 | |
---|
| 148 | {if $display_info.rating_score and isset($rate_summary)} |
---|
| 149 | <div id="Average" class="imageInfo"> |
---|
| 150 | <dt>{'Rating score'|@translate}</dt> |
---|
| 151 | <dd> |
---|
| 152 | {if $rate_summary.count} |
---|
| 153 | {if $rate_summary.count == 1} |
---|
| 154 | {assign var='rate_text' value='%d rate'|@translate} |
---|
| 155 | {else} |
---|
| 156 | {assign var='rate_text' value='%d rates'|@translate} |
---|
| 157 | {/if} |
---|
| 158 | <span id="ratingScore">{$rate_summary.score}</span> <span id="ratingCount">({$pwg->sprintf($rate_text, $rate_summary.count)})</span> |
---|
| 159 | {else} |
---|
| 160 | <span id="ratingScore">{'no rate'|@translate}</span> <span id="ratingCount"></span> |
---|
| 161 | {/if} |
---|
| 162 | </dd> |
---|
| 163 | </div> |
---|
| 164 | {/if} |
---|
| 165 | |
---|
| 166 | {if isset($rating)} |
---|
| 167 | <div id="rating" class="imageInfo"> |
---|
| 168 | <dt> |
---|
| 169 | <span id="updateRate">{if isset($rating.USER_RATE)}{'Update your rating'|@translate}{else}{'Rate this photo'|@translate}{/if}</span> |
---|
| 170 | </dt> |
---|
| 171 | <dd> |
---|
| 172 | <form action="{$rating.F_ACTION}" method="post" id="rateForm" style="margin:0;"> |
---|
| 173 | <div> |
---|
| 174 | {foreach from=$rating.marks item=mark name=rate_loop} |
---|
| 175 | {if isset($rating.USER_RATE) && $mark==$rating.USER_RATE} |
---|
| 176 | <input type="button" name="rate" value="{$mark}" class="rateButtonSelected" title="{$mark}"> |
---|
| 177 | {else} |
---|
| 178 | <input type="submit" name="rate" value="{$mark}" class="rateButton" title="{$mark}"> |
---|
| 179 | {/if} |
---|
| 180 | {/foreach} |
---|
| 181 | {strip}{combine_script id='core.scripts' load='async' path='themes/default/js/scripts.js'} |
---|
| 182 | {combine_script id='rating' load='async' require='core.scripts' path='themes/default/js/rating.js'} |
---|
| 183 | {footer_script} |
---|
| 184 | var _pwgRatingAutoQueue = _pwgRatingAutoQueue||[]; |
---|
| 185 | _pwgRatingAutoQueue.push( {ldelim}rootUrl: '{$ROOT_URL}', image_id: {$current.id}, |
---|
| 186 | onSuccess : function(rating) {ldelim} |
---|
| 187 | var e = document.getElementById("updateRate"); |
---|
| 188 | if (e) e.innerHTML = "{'Update your rating'|@translate|@escape:'javascript'}"; |
---|
| 189 | e = document.getElementById("ratingScore"); |
---|
| 190 | if (e) e.innerHTML = rating.score; |
---|
| 191 | e = document.getElementById("ratingCount"); |
---|
| 192 | if (e) {ldelim} |
---|
| 193 | if (rating.count == 1) |
---|
| 194 | e.innerHTML = "({'%d rate'|@translate|@escape:'javascript'})".replace( "%d", rating.count); |
---|
| 195 | else |
---|
| 196 | e.innerHTML = "({'%d rates'|@translate|@escape:'javascript'})".replace( "%d", rating.count); |
---|
| 197 | {rdelim} |
---|
| 198 | {rdelim}{rdelim} ); |
---|
| 199 | {/footer_script} |
---|
| 200 | {/strip} |
---|
| 201 | </div> |
---|
| 202 | </form> |
---|
| 203 | </dd> |
---|
| 204 | </div> |
---|
| 205 | {/if} |
---|
| 206 | |
---|
| 207 | {if $display_info.privacy_level and isset($available_permission_levels)} |
---|
| 208 | <div id="Privacy" class="imageInfo"><div class="relSwitchBox"> |
---|
| 209 | <dt><a id="privacyLevelLink" href="javascript:togglePrivacyLevelBox()">{'Who can see this photo?'|@translate}</a></dt> |
---|
| 210 | <dd> |
---|
| 211 | {combine_script id='core.scripts' load='async' path='themes/default/js/scripts.js'} |
---|
| 212 | {footer_script require='jquery'} |
---|
| 213 | {literal}function setPrivacyLevel(rootUrl, id, level) |
---|
| 214 | { |
---|
| 215 | var y = new PwgWS(rootUrl); |
---|
| 216 | y.callService( |
---|
| 217 | "pwg.images.setPrivacyLevel", {image_id: id, level:level} , |
---|
| 218 | { |
---|
| 219 | method: "POST", |
---|
| 220 | onFailure: function(num, text) { alert(num + " " + text); }, |
---|
| 221 | onSuccess: function(result) { |
---|
| 222 | jQuery('#privacyLevelBox .switchCheck').css('visibility','hidden'); |
---|
| 223 | jQuery('#levelCheck'+level).css('visibility','visible'); |
---|
| 224 | } |
---|
| 225 | } |
---|
| 226 | ); |
---|
| 227 | } |
---|
| 228 | function togglePrivacyLevelBox() |
---|
| 229 | { |
---|
| 230 | var elt = document.getElementById("privacyLevelBox"), |
---|
| 231 | ePos = document.getElementById("privacyLevelLink"); |
---|
| 232 | if (elt.style.display == "none") |
---|
| 233 | { |
---|
| 234 | elt.style.left = (ePos.offsetLeft)+"px"; |
---|
| 235 | elt.style.top = (ePos.offsetTop+ePos.offsetHeight)+"px"; |
---|
| 236 | elt.style.display="block"; |
---|
| 237 | } |
---|
| 238 | else |
---|
| 239 | elt.style.display="none"; |
---|
| 240 | } |
---|
| 241 | {/literal} |
---|
| 242 | {/footer_script} |
---|
| 243 | |
---|
| 244 | <div id="privacyLevelBox" class="switchBox" onclick="togglePrivacyLevelBox()" style="display:none" onmouseout="e=event.toElement||event.relatedTarget;e.parentNode==this||e==this||togglePrivacyLevelBox()"> |
---|
| 245 | {foreach from=$available_permission_levels item=label key=level} |
---|
| 246 | <span id="levelCheck{$level}" class="switchCheck" {if $level != $current.level} style="visibility:hidden"{/if}>✔ </span> |
---|
| 247 | <a id="switchLevel{$level}" href="javascript:setPrivacyLevel('{$ROOT_URL}', {$current.id}, {$level})">{$label}</a><br> |
---|
| 248 | {/foreach} |
---|
| 249 | </div> |
---|
| 250 | |
---|
| 251 | </dd> |
---|
| 252 | </div></div> |
---|
| 253 | {/if} |
---|
| 254 | {/strip} |
---|
| 255 | </dl> |
---|
| 256 | |
---|
| 257 | {if isset($metadata)} |
---|
| 258 | <dl id="Metadata" class="imageInfoTable"> |
---|
| 259 | {foreach from=$metadata item=meta} |
---|
| 260 | <h3>{$meta.TITLE}</h3> |
---|
| 261 | {foreach from=$meta.lines item=value key=label} |
---|
| 262 | <div class="imageInfo"> |
---|
| 263 | <dt>{$label}</dt> |
---|
| 264 | <dd>{$value}</dd> |
---|
| 265 | </div> |
---|
| 266 | {/foreach} |
---|
| 267 | {/foreach} |
---|
| 268 | </dl> |
---|
| 269 | {/if} |
---|
| 270 | </div> |
---|
| 271 | </div> |
---|
| 272 | |
---|
| 273 | {if isset($COMMENT_COUNT)} |
---|
| 274 | <div id="comments" {if (!isset($comment_add) && ($COMMENT_COUNT == 0))}class="noCommentContent"{else}class="commentContent"{/if}><div id="commentsSwitcher"></div> |
---|
| 275 | <h3>{$pwg->l10n_dec('%d comment', '%d comments',$COMMENT_COUNT)}</h3> |
---|
| 276 | |
---|
| 277 | <div id="pictureComments"> |
---|
| 278 | {if isset($comment_add)} |
---|
| 279 | <div id="commentAdd"> |
---|
| 280 | <h4>{'Add a comment'|@translate}</h4> |
---|
| 281 | <form method="post" action="{$comment_add.F_ACTION}" id="addComment"> |
---|
| 282 | {if $comment_add.SHOW_AUTHOR} |
---|
[25999] | 283 | <p><label for="author">{'Author'|@translate}{if $comment_add.AUTHOR_MANDATORY} ({'mandatory'|@translate}){/if} :</label></p> |
---|
[19033] | 284 | <p><input type="text" name="author" id="author" value="{$comment_add.AUTHOR}"></p> |
---|
| 285 | {/if} |
---|
[25999] | 286 | {if $comment_add.SHOW_EMAIL} |
---|
| 287 | <p><label for="email">{'Email'|@translate}{if $comment_add.EMAIL_MANDATORY} ({'mandatory'|@translate}){/if} :</label></p> |
---|
| 288 | <p><input type="text" name="email" id="email" value="{$comment_add.EMAIL}"></p> |
---|
| 289 | {/if} |
---|
| 290 | <p><label for="website_url">{'Website'|@translate} :</label></p> |
---|
| 291 | <p><input type="text" name="website_url" id="website_url" value="{$comment_add.WEBSITE_URL}"></p> |
---|
| 292 | <p><label for="contentid">{'Comment'|@translate} ({'mandatory'|@translate}) :</label></p> |
---|
[19033] | 293 | <p><textarea name="content" id="contentid" rows="5" cols="50">{$comment_add.CONTENT}</textarea></p> |
---|
| 294 | <p><input type="hidden" name="key" value="{$comment_add.KEY}"> |
---|
| 295 | <input type="submit" value="{'Submit'|@translate}"></p> |
---|
| 296 | </form> |
---|
| 297 | </div> |
---|
[25999] | 298 | {/if} |
---|
[19033] | 299 | {if isset($comments)} |
---|
| 300 | <div id="pictureCommentList"> |
---|
| 301 | {if (($COMMENT_COUNT > 2) || !empty($navbar))} |
---|
| 302 | <div id="pictureCommentNavBar"> |
---|
| 303 | {if $COMMENT_COUNT > 2} |
---|
| 304 | <a href="{$COMMENTS_ORDER_URL}#comments" rel="nofollow" class="commentsOrder">{$COMMENTS_ORDER_TITLE}</a> |
---|
| 305 | {/if} |
---|
| 306 | {if !empty($navbar) }{include file='navigation_bar.tpl'|@get_extent:'navbar'}{/if} |
---|
| 307 | </div> |
---|
| 308 | {/if} |
---|
| 309 | {include file='comment_list.tpl'} |
---|
| 310 | </div> |
---|
| 311 | {/if} |
---|
| 312 | <div style="clear:both"></div> |
---|
| 313 | </div> |
---|
| 314 | |
---|
| 315 | </div> |
---|
| 316 | {/if}{*comments*} |
---|
| 317 | |
---|
| 318 | {if !empty($PLUGIN_PICTURE_AFTER)}{$PLUGIN_PICTURE_AFTER}{/if} |
---|
| 319 | |
---|
| 320 | </div> |
---|