[8378] | 1 | {* Example of resizeable |
---|
[2721] | 2 | {include file='include/autosize.inc.tpl'} |
---|
| 3 | *} |
---|
| 4 | |
---|
[10812] | 5 | {if isset($MENUBAR)} |
---|
| 6 | {$MENUBAR} |
---|
| 7 | <div id="content" class="pictureContent"> |
---|
| 8 | {/if} |
---|
| 9 | |
---|
[2227] | 10 | {if isset($errors)} |
---|
[2101] | 11 | <div class="errors"> |
---|
[8378] | 12 | <ul> |
---|
| 13 | {foreach from=$errors item=error} |
---|
| 14 | <li>{$error}</li> |
---|
| 15 | {/foreach} |
---|
| 16 | </ul> |
---|
[2101] | 17 | </div> |
---|
[2227] | 18 | {/if} |
---|
| 19 | {if isset($infos)} |
---|
[2101] | 20 | <div class="infos"> |
---|
[8378] | 21 | <ul> |
---|
| 22 | {foreach from=$infos item=info} |
---|
| 23 | <li>{$info}</li> |
---|
| 24 | {/foreach} |
---|
| 25 | </ul> |
---|
[2101] | 26 | </div> |
---|
[2227] | 27 | {/if} |
---|
[859] | 28 | |
---|
[2902] | 29 | {if !empty($PLUGIN_PICTURE_BEFORE)}{$PLUGIN_PICTURE_BEFORE}{/if} |
---|
| 30 | |
---|
[859] | 31 | <div id="imageHeaderBar"> |
---|
[8378] | 32 | <div class="browsePath"> |
---|
| 33 | {$SECTION_TITLE} {$LEVEL_SEPARATOR}{$current.TITLE} |
---|
| 34 | </div> |
---|
| 35 | <div class="imageNumber">{$PHOTO}</div> |
---|
| 36 | {if $SHOW_PICTURE_NAME_ON_TITLE} |
---|
| 37 | <h2>{$current.TITLE}</h2> |
---|
| 38 | {/if} |
---|
[859] | 39 | </div> |
---|
| 40 | |
---|
| 41 | <div id="imageToolBar"> |
---|
[8378] | 42 | <div class="actionButtons"> |
---|
[8757] | 43 | {strip}{if isset($U_SLIDESHOW_START)} |
---|
[8378] | 44 | <a href="{$U_SLIDESHOW_START}" title="{'slideshow'|@translate}" class="pwg-state-default pwg-button" rel="nofollow"> |
---|
[8774] | 45 | <span class="pwg-icon pwg-icon-slideshow"> </span><span class="pwg-button-text">{'slideshow'|@translate}</span> |
---|
[8378] | 46 | </a> |
---|
[8757] | 47 | {/if}{/strip} |
---|
| 48 | {strip}{if isset($U_METADATA)} |
---|
[8378] | 49 | <a href="{$U_METADATA}" title="{'Show file metadata'|@translate}" class="pwg-state-default pwg-button" rel="nofollow"> |
---|
[8774] | 50 | <span class="pwg-icon pwg-icon-camera-info"> </span><span class="pwg-button-text">{'Show file metadata'|@translate}</span> |
---|
[8378] | 51 | </a> |
---|
[8757] | 52 | {/if}{/strip} |
---|
| 53 | {strip}{if isset($current.U_DOWNLOAD)} |
---|
[8378] | 54 | <a href="{$current.U_DOWNLOAD}" title="{'download this file'|@translate}" class="pwg-state-default pwg-button" rel="nofollow"> |
---|
[8774] | 55 | <span class="pwg-icon pwg-icon-save"> </span><span class="pwg-button-text">{'download'|@translate}</span> |
---|
[8378] | 56 | </a> |
---|
[8757] | 57 | {/if}{/strip} |
---|
[8119] | 58 | {if isset($PLUGIN_PICTURE_ACTIONS)}{$PLUGIN_PICTURE_ACTIONS}{/if} |
---|
[8757] | 59 | {strip}{if isset($favorite)} |
---|
[8665] | 60 | <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"> |
---|
[8774] | 61 | <span class="pwg-icon pwg-icon-favorite-{if $favorite.IS_FAVORITE}del{else}add{/if}"> </span><span class="pwg-button-text">{'Favorites'|@translate}</span> |
---|
[8378] | 62 | </a> |
---|
[8757] | 63 | {/if}{/strip} |
---|
| 64 | {strip}{if isset($U_SET_AS_REPRESENTATIVE)} |
---|
[8378] | 65 | <a href="{$U_SET_AS_REPRESENTATIVE}" title="{'set as album representative'|@translate}" class="pwg-state-default pwg-button" rel="nofollow"> |
---|
[8774] | 66 | <span class="pwg-icon pwg-icon-representative"> </span><span class="pwg-button-text">{'representative'|@translate}</span> |
---|
[8378] | 67 | </a> |
---|
[8757] | 68 | {/if}{/strip} |
---|
| 69 | {strip}{if isset($U_ADMIN)} |
---|
[8378] | 70 | <a href="{$U_ADMIN}" title="{'Modify information'|@translate}" class="pwg-state-default pwg-button" rel="nofollow"> |
---|
[8774] | 71 | <span class="pwg-icon pwg-icon-edit"> </span><span class="pwg-button-text">{'edit'|@translate}</span> |
---|
[8378] | 72 | </a> |
---|
[8757] | 73 | {/if}{/strip} |
---|
| 74 | {strip}{if isset($U_CADDIE)}{*caddie management BEGIN*} |
---|
[8299] | 75 | {footer_script} |
---|
[2429] | 76 | {literal}function addToCadie(aElement, rootUrl, id) |
---|
| 77 | { |
---|
| 78 | if (aElement.disabled) return; |
---|
[8119] | 79 | aElement.disabled=true; |
---|
[2429] | 80 | var y = new PwgWS(rootUrl); |
---|
| 81 | y.callService( |
---|
[8119] | 82 | "pwg.caddie.add", {image_id: id} , |
---|
| 83 | { |
---|
| 84 | onFailure: function(num, text) { alert(num + " " + text); document.location=aElement.href; }, |
---|
| 85 | onSuccess: function(result) { aElement.disabled = false; } |
---|
| 86 | } |
---|
| 87 | ); |
---|
[2429] | 88 | }{/literal} |
---|
[8299] | 89 | {/footer_script} |
---|
[8378] | 90 | <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"> |
---|
[8774] | 91 | <span class="pwg-icon pwg-icon-caddie-add"> </span><span class="pwg-button-text">{'caddie'|@translate}</span> |
---|
[8378] | 92 | </a> |
---|
[8757] | 93 | {/if}{/strip}{*caddie management END*} |
---|
[8378] | 94 | </div> |
---|
[8119] | 95 | |
---|
| 96 | {include file='picture_nav_buttons.tpl'|@get_extent:'picture_nav_buttons'} |
---|
[8757] | 97 | </div>{*<!-- imageToolBar -->*} |
---|
[859] | 98 | |
---|
| 99 | <div id="theImage"> |
---|
[2227] | 100 | {$ELEMENT_CONTENT} |
---|
| 101 | |
---|
| 102 | {if isset($COMMENT_IMG)} |
---|
[11062] | 103 | <p class="imageComment">{$COMMENT_IMG}</p> |
---|
[2227] | 104 | {/if} |
---|
| 105 | |
---|
[8378] | 106 | {if isset($U_SLIDESHOW_STOP)} |
---|
[859] | 107 | <p> |
---|
[8378] | 108 | [ <a href="{$U_SLIDESHOW_STOP}">{'stop the slideshow'|@translate}</a> ] |
---|
[859] | 109 | </p> |
---|
[2227] | 110 | {/if} |
---|
| 111 | |
---|
[859] | 112 | </div> |
---|
| 113 | |
---|
[10804] | 114 | <div id="imageInfos"> |
---|
[5293] | 115 | {if $DISPLAY_NAV_THUMB} |
---|
[8378] | 116 | {if isset($previous)} |
---|
[5021] | 117 | <a class="navThumb" id="linkPrev" href="{$previous.U_IMG}" title="{'Previous'|@translate} : {$previous.TITLE}" rel="prev"> |
---|
[8378] | 118 | <img src="{$previous.THUMB_SRC}" alt="{$previous.TITLE}"> |
---|
[859] | 119 | </a> |
---|
[2227] | 120 | {/if} |
---|
[8378] | 121 | {if isset($next)} |
---|
[5021] | 122 | <a class="navThumb" id="linkNext" href="{$next.U_IMG}" title="{'Next'|@translate} : {$next.TITLE}" rel="next"> |
---|
[8378] | 123 | <img src="{$next.THUMB_SRC}" alt="{$next.TITLE}"> |
---|
[859] | 124 | </a> |
---|
[2227] | 125 | {/if} |
---|
[5293] | 126 | {/if} |
---|
[859] | 127 | |
---|
[8711] | 128 | <table id="standard" class="infoTable"> |
---|
[8757] | 129 | {strip} |
---|
[8378] | 130 | {if $display_info.author} |
---|
| 131 | <tr id="Author"> |
---|
| 132 | <td class="label">{'Author'|@translate}</td> |
---|
| 133 | <td class="value">{if isset($INFO_AUTHOR)}{$INFO_AUTHOR}{else}{'N/A'|@translate}{/if}</td> |
---|
| 134 | </tr> |
---|
| 135 | {/if} |
---|
| 136 | {if $display_info.created_on} |
---|
| 137 | <tr id="datecreate"> |
---|
| 138 | <td class="label">{'Created on'|@translate}</td> |
---|
| 139 | <td class="value">{if isset($INFO_CREATION_DATE)}{$INFO_CREATION_DATE}{else}{'N/A'|@translate}{/if}</td> |
---|
| 140 | </tr> |
---|
| 141 | {/if} |
---|
| 142 | {if $display_info.posted_on} |
---|
| 143 | <tr id="datepost"> |
---|
| 144 | <td class="label">{'Posted on'|@translate}</td> |
---|
| 145 | <td class="value">{$INFO_POSTED_DATE}</td> |
---|
| 146 | </tr> |
---|
| 147 | {/if} |
---|
| 148 | {if $display_info.dimensions} |
---|
| 149 | <tr id="Dimensions"> |
---|
| 150 | <td class="label">{'Dimensions'|@translate}</td> |
---|
| 151 | <td class="value">{if isset($INFO_DIMENSIONS)}{$INFO_DIMENSIONS}{else}{'N/A'|@translate}{/if}</td> |
---|
| 152 | </tr> |
---|
| 153 | {/if} |
---|
| 154 | {if $display_info.file} |
---|
| 155 | <tr id="File"> |
---|
| 156 | <td class="label">{'File'|@translate}</td> |
---|
| 157 | <td class="value">{$INFO_FILE}</td> |
---|
| 158 | </tr> |
---|
| 159 | {/if} |
---|
| 160 | {if $display_info.filesize} |
---|
| 161 | <tr id="Filesize"> |
---|
| 162 | <td class="label">{'Filesize'|@translate}</td> |
---|
| 163 | <td class="value">{if isset($INFO_FILESIZE)}{$INFO_FILESIZE}{else}{'N/A'|@translate}{/if}</td> |
---|
| 164 | </tr> |
---|
| 165 | {/if} |
---|
| 166 | {if $display_info.tags} |
---|
| 167 | <tr id="Tags"> |
---|
| 168 | <td class="label">{'Tags'|@translate}</td> |
---|
| 169 | <td class="value"> |
---|
| 170 | {if isset($related_tags)} |
---|
| 171 | {foreach from=$related_tags item=tag name=tag_loop}{if !$smarty.foreach.tag_loop.first}, {/if}<a href="{$tag.URL}">{$tag.name}</a>{/foreach} |
---|
| 172 | {/if} |
---|
| 173 | </td> |
---|
| 174 | </tr> |
---|
| 175 | {/if} |
---|
| 176 | {if $display_info.categories} |
---|
| 177 | <tr id="Categories"> |
---|
| 178 | <td class="label">{'Albums'|@translate}</td> |
---|
| 179 | <td class="value"> |
---|
| 180 | {if isset($related_categories)} |
---|
| 181 | <ul> |
---|
| 182 | {foreach from=$related_categories item=cat} |
---|
| 183 | <li>{$cat}</li> |
---|
| 184 | {/foreach} |
---|
| 185 | </ul> |
---|
| 186 | {/if} |
---|
| 187 | </td> |
---|
| 188 | </tr> |
---|
| 189 | {/if} |
---|
| 190 | {if $display_info.visits} |
---|
| 191 | <tr id="Visits"> |
---|
| 192 | <td class="label">{'Visits'|@translate}</td> |
---|
| 193 | <td class="value">{$INFO_VISITS}</td> |
---|
| 194 | </tr> |
---|
| 195 | {/if} |
---|
[2480] | 196 | |
---|
[11893] | 197 | {if $display_info.rating_score and isset($rate_summary)} |
---|
[5108] | 198 | <tr id="Average"> |
---|
[11839] | 199 | <td class="label">{'Rating score'|@translate}</td> |
---|
| 200 | <td class="value"> |
---|
[2594] | 201 | {if $rate_summary.count} |
---|
[11839] | 202 | <span id="ratingScore">{$rate_summary.score}</span> <span id="ratingCount">({assign var='rate_text' value='%d rates'|@translate}{$pwg->sprintf($rate_text, $rate_summary.count)})</span> |
---|
[2594] | 203 | {else} |
---|
[11839] | 204 | <span id="ratingScore">{'no rate'|@translate}</span> <span id="ratingCount"></span> |
---|
[2594] | 205 | {/if} |
---|
| 206 | </td> |
---|
| 207 | </tr> |
---|
| 208 | {/if} |
---|
[8378] | 209 | |
---|
[2480] | 210 | {if isset($rating)} |
---|
[5108] | 211 | <tr id="rating"> |
---|
[2480] | 212 | <td class="label"> |
---|
[8665] | 213 | <span id="updateRate">{if isset($rating.USER_RATE)}{'Update your rating'|@translate}{else}{'Rate this photo'|@translate}{/if}</span> |
---|
[2480] | 214 | </td> |
---|
| 215 | <td class="value"> |
---|
| 216 | <form action="{$rating.F_ACTION}" method="post" id="rateForm" style="margin:0;"> |
---|
[8378] | 217 | <div> |
---|
[2480] | 218 | {foreach from=$rating.marks item=mark name=rate_loop} |
---|
| 219 | {if isset($rating.USER_RATE) && $mark==$rating.USER_RATE} |
---|
[8378] | 220 | <input type="button" name="rate" value="{$mark}" class="rateButtonSelected" title="{$mark}"> |
---|
[2480] | 221 | {else} |
---|
[8378] | 222 | <input type="submit" name="rate" value="{$mark}" class="rateButton" title="{$mark}"> |
---|
[2480] | 223 | {/if} |
---|
| 224 | {/foreach} |
---|
[8757] | 225 | {strip}{combine_script id='core.scripts' load='async' path='themes/default/js/scripts.js'} |
---|
[7975] | 226 | {combine_script id='rating' load='async' require='core.scripts' path='themes/default/js/rating.js'} |
---|
[8378] | 227 | {footer_script} |
---|
| 228 | var _pwgRatingAutoQueue = _pwgRatingAutoQueue||[]; |
---|
| 229 | _pwgRatingAutoQueue.push( {ldelim}rootUrl: '{$ROOT_URL}', image_id: {$current.id}, |
---|
[11839] | 230 | onSuccess : function(rating) {ldelim} |
---|
| 231 | var e = document.getElementById("updateRate"); |
---|
| 232 | if (e) e.innerHTML = "{'Update your rating'|@translate|@escape:'javascript'}"; |
---|
| 233 | e = document.getElementById("ratingScore"); |
---|
| 234 | if (e) e.innerHTML = rating.score; |
---|
| 235 | e = document.getElementById("ratingCount"); |
---|
| 236 | if (e) e.innerHTML = "({'%d rates'|@translate|@escape:'javascript'})".replace( "%d", rating.count); |
---|
| 237 | {rdelim}{rdelim} ); |
---|
[8378] | 238 | {/footer_script} |
---|
[8757] | 239 | {/strip} |
---|
[2480] | 240 | </div> |
---|
| 241 | </form> |
---|
| 242 | </td> |
---|
| 243 | </tr> |
---|
| 244 | {/if} |
---|
| 245 | |
---|
[8378] | 246 | {if $display_info.privacy_level and isset($available_permission_levels)} |
---|
[5108] | 247 | <tr id="Privacy"> |
---|
[6025] | 248 | <td class="label">{'Who can see this photo?'|@translate}</td> |
---|
[8378] | 249 | <td class="value"> |
---|
[7975] | 250 | {combine_script id='core.scripts' load='async' path='themes/default/js/scripts.js'} |
---|
[8299] | 251 | {footer_script} |
---|
[2594] | 252 | {literal}function setPrivacyLevel(selectElement, rootUrl, id, level) |
---|
| 253 | { |
---|
| 254 | selectElement.disabled = true; |
---|
| 255 | var y = new PwgWS(rootUrl); |
---|
| 256 | y.callService( |
---|
| 257 | "pwg.images.setPrivacyLevel", {image_id: id, level:level} , |
---|
| 258 | { |
---|
[4513] | 259 | method: "POST", |
---|
[2594] | 260 | onFailure: function(num, text) { selectElement.disabled = false; alert(num + " " + text); }, |
---|
| 261 | onSuccess: function(result) { selectElement.disabled = false; } |
---|
| 262 | } |
---|
| 263 | ); |
---|
| 264 | }{/literal} |
---|
[8299] | 265 | {/footer_script} |
---|
[8378] | 266 | <select onchange="setPrivacyLevel(this, '{$ROOT_URL}', {$current.id}, this.options[selectedIndex].value)"> |
---|
[6507] | 267 | {foreach from=$available_permission_levels item=label key=level} |
---|
| 268 | <option label="{$label}" value="{$level}"{if $level == $current.level} selected="selected"{/if}>{$label}</option> |
---|
| 269 | {/foreach} |
---|
[2594] | 270 | </select> |
---|
| 271 | </td></tr> |
---|
| 272 | {/if} |
---|
[8757] | 273 | {/strip} |
---|
[859] | 274 | </table> |
---|
| 275 | |
---|
[2227] | 276 | {if isset($metadata)} |
---|
[8711] | 277 | <table id="Metadata" class="infoTable2"> |
---|
[2227] | 278 | {foreach from=$metadata item=meta} |
---|
[8378] | 279 | <tr> |
---|
| 280 | <th colspan="2">{$meta.TITLE}</th> |
---|
| 281 | </tr> |
---|
| 282 | {foreach from=$meta.lines item=value key=label} |
---|
| 283 | <tr> |
---|
| 284 | <td class="label">{$label}</td> |
---|
| 285 | <td class="value">{$value}</td> |
---|
| 286 | </tr> |
---|
| 287 | {/foreach} |
---|
[2227] | 288 | {/foreach} |
---|
[859] | 289 | </table> |
---|
[2227] | 290 | {/if} |
---|
[10804] | 291 | </div> |
---|
[859] | 292 | |
---|
[2227] | 293 | {if isset($COMMENT_COUNT)} |
---|
[859] | 294 | <div id="comments"> |
---|
[8378] | 295 | {if $COMMENT_COUNT > 0} |
---|
[2780] | 296 | <h3>{$pwg->l10n_dec('%d comment', '%d comments',$COMMENT_COUNT)}</h3> |
---|
[8378] | 297 | {/if} |
---|
| 298 | {if !empty($navbar)}{include file='navigation_bar.tpl'|@get_extent:'navbar'}{/if} |
---|
[859] | 299 | |
---|
[2481] | 300 | {if isset($comments)} |
---|
[3445] | 301 | {include file='comment_list.tpl'} |
---|
[2481] | 302 | {/if} |
---|
[859] | 303 | |
---|
[2481] | 304 | {if isset($comment_add)} |
---|
[8378] | 305 | <form method="post" action="{$comment_add.F_ACTION}" class="filter" id="addComment"> |
---|
[2481] | 306 | <fieldset> |
---|
[5021] | 307 | <legend>{'Add a comment'|@translate}</legend> |
---|
[2481] | 308 | {if $comment_add.SHOW_AUTHOR} |
---|
[5021] | 309 | <label>{'Author'|@translate}<input type="text" name="author"></label> |
---|
[2481] | 310 | {/if} |
---|
[5178] | 311 | <label>{'Comment'|@translate}<textarea name="content" id="contentid" rows="5" cols="80">{$comment_add.CONTENT}</textarea></label> |
---|
[3185] | 312 | <input type="hidden" name="key" value="{$comment_add.KEY}"> |
---|
[8774] | 313 | <input type="submit" value="{'Submit'|@translate}"> |
---|
[2481] | 314 | </fieldset> |
---|
| 315 | </form> |
---|
| 316 | {/if} |
---|
[1167] | 317 | </div> |
---|
[8378] | 318 | {/if}{*comments*} |
---|
[2205] | 319 | |
---|
[2352] | 320 | {if !empty($PLUGIN_PICTURE_AFTER)}{$PLUGIN_PICTURE_AFTER}{/if} |
---|
[10812] | 321 | |
---|
| 322 | {if isset($MENUBAR)} |
---|
| 323 | </div> |
---|
| 324 | {/if} |
---|