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

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

Compatible with r6025

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