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