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