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