source: extensions/sobre/trunk/template/picture.tpl @ 11942

Last change on this file since 11942 was 11942, checked in by Gotcha, 13 years ago

Compatible avec le plugin User Tags

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