source: trunk/themes/default/template/picture.tpl @ 5875

Last change on this file since 5875 was 5875, checked in by flop25, 14 years ago

the picture stop_slideshow.png is never displayed because the code to stop the slideshow is in slideshow.tpl : so the code in picture.tpl is deleted

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