source: extensions/sobre/template/picture.tpl @ 5582

Last change on this file since 5582 was 5582, checked in by Gotcha, 14 years ago

Configuring picture.tpl

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