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

Last change on this file since 7263 was 7263, checked in by ddtddt, 14 years ago

[branche 2.1] extensions - sobre - localisation bug

File size: 11.1 KB
Line 
1{* $Id: picture.tpl By GOTCHA $Ver: 2010-05-21 *}
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}"/></a>
34    {if !$IS_HOME}{$LEVEL_SEPARATOR}{$SECTION_TITLE|replace:'<br/>':''}{/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="{if $favorite.IS_FAVORITE}{'delete this image from your favorites'|@translate}{else}{'add this image to your favorites'|@translate}{/if}"><img src="{$ROOT_URL}{$themeconf.icon_dir}/{if $favorite.IS_FAVORITE}del_favorite{else}favorite{/if}.png" class="button" alt="favorite" title="{if $favorite.IS_FAVORITE}{'delete this image from your favorites'|@translate}{else}{'add this image to your favorites'|@translate}{/if}"></a>    {/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{
67if (aElement.disabled) return;
68aElement.disabled=true;
69var y = new PwgWS(rootUrl);
70
71y.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        {if isset($PLUGIN_PICTURE_ACTIONS)}{$PLUGIN_PICTURE_ACTIONS}{/if}
83  </div>
84  {include file='picture_nav_buttons.tpl'|@get_extent:'picture_nav_buttons'}
85</div> <!-- imageToolBar -->
86
87<div id="theImage">
88<p></p>
89{$ELEMENT_CONTENT}
90<table>
91  <tr>
92    <td>
93          {if isset($COMMENT_IMG)}
94            <p>{$COMMENT_IMG}</p>
95          {/if}
96        </td>
97  </tr>
98</table>
99
100{if isset($U_SLIDESHOW_STOP) }
101  <p>
102    [ <a href="{$U_SLIDESHOW_STOP}">{'stop the slideshow'|@translate}</a> ]
103  </p>
104{/if}
105
106</div>
107
108{if $DISPLAY_NAV_THUMB}
109  {if isset($previous) }
110    <a class="navThumb" id="linkPrev" href="{$previous.U_IMG}" title="{'Previous'|@translate} : {$previous.TITLE}" rel="prev">
111      <img src="{$previous.THUMB_SRC}" alt="{$previous.TITLE}">
112    </a>
113  {/if}
114  {if isset($next) }
115    <a class="navThumb" id="linkNext" href="{$next.U_IMG}" title="{'Next'|@translate} : {$next.TITLE}" rel="next">
116      <img src="{$next.THUMB_SRC}" alt="{$next.TITLE}">
117    </a>
118  {/if}
119{/if}
120
121<table id="standard" class="infoTable" summary="{'Some info about this picture'|@translate}">
122
123   <tr>
124    {if $display_info.author}
125          <td id="Author" class="label">{'Author'|@translate}</td>
126      <td class="value"><p>{if isset($INFO_AUTHOR)}{$INFO_AUTHOR}{else}{'N/A'|@translate}{/if}</p></td>
127        {/if}
128      <td class="label">{'Licence area'|@translate}</td>
129      <td class="value"><p>{if isset($COMMENT_LIC)}{$COMMENT_LIC}{else}{'N/A'|@translate}{/if}</p></td>
130  </tr>
131
132  <tr>
133        {if $display_info.created_on}
134      <td id="datecreate" class="label">{'Created on'|@translate}</td>
135      <td class="value">{if isset($INFO_CREATION_DATE)}{$INFO_CREATION_DATE}{else}{'N/A'|@translate}{/if}</td>
136        {/if}
137    {if $display_info.posted_on}
138      <td id="datepost" class="label">{'Posted on'|@translate}</td>
139      <td class="value">{$INFO_POSTED_DATE}</td>
140    {/if}
141  </tr>
142
143  <tr>
144    {if $display_info.tags}
145      <td id="Tags" class="label">{'Tags'|@translate}</td>
146      <td class="value">
147            <p>
148        {if isset($related_tags)}
149          {foreach from=$related_tags item=tag name=tag_loop}{if !$smarty.foreach.tag_loop.first}, {/if}
150          <a href="{$tag.URL}" {if !empty($tag.radu_class)}class="{$tag.radu_class}"{/if}>{$tag.name}</a>
151                  {/foreach}
152                {/if}
153                </p>
154          </td>
155        {/if}
156    {if $display_info.categories}
157      <td id="Categories" class="label">{'Categories'|@translate}</td>
158      <td class="value">
159        {if isset($related_categories)}
160          <ul>
161            {foreach from=$related_categories item=cat}
162              <li><p>{$cat}</p></li>
163            {/foreach}
164          </ul>
165         {/if}
166          </td>
167        {/if}
168  </tr>
169
170  <tr>
171    {if $display_info.file}
172      <td id="File" class="label">{'File'|@translate}</td>
173      <td class="value"><p>{$INFO_FILE}, <small>
174            {if $display_info.dimensions}{if isset($INFO_DIMENSIONS)}{$INFO_DIMENSIONS}{else}{'N/A'|@translate}{/if}, {/if}
175                {if $display_info.filesize}{if isset($INFO_FILESIZE)}{$INFO_FILESIZE}{else}{'N/A'|@translate}{/if}{/if}
176          </small></p></td>
177        {/if}
178    {if $display_info.visits}
179      <td id="Visits" class="label">{'Informations area'|@translate}</td>
180      <td class="value">
181            <p>
182          {$INFO_VISITS} {'Visits'|@translate}
183          {if $display_info.average_rate and isset($rate_summary)}, <span id="Average" class="ratingSummary">
184                 
185            {if $rate_summary.count}
186                          {assign var='rate_text' value='%.2f (rated %d times)'|@translate}
187                          {$pwg->sprintf($rate_text, $rate_summary.average, $rate_summary.count)}
188                    {else}
189                          {'no rate'|@translate}
190            {/if}
191
192                  </span>{/if}
193                </p>
194      </td>
195    {/if}
196  </tr>
197
198  <tr>
199    {if isset($rating)}
200          <td id="rating" class="label">
201                <span id="updateRate">
202        {if isset($rating.USER_RATE)}
203          {'Update your rating'|@translate}
204        {else}
205          {'Rate this picture'|@translate}
206        {/if}
207        </span>
208          </td>
209          <td class="value">
210        <p>
211                <form action="{$rating.F_ACTION}" method="post" id="rateForm" style="margin:0;">
212                <div>&nbsp;
213                  {foreach from=$rating.marks item=mark name=rate_loop}
214                  {if !$smarty.foreach.rate_loop.first} | {/if}
215                  {if isset($rating.USER_RATE) && $mark==$rating.USER_RATE}
216                    <input type="button" name="rate" value="{$mark}" class="rateButtonSelected" title="{$mark}">
217                  {else}
218                        <input type="submit" name="rate" value="{$mark}" class="rateButton" title="{$mark}">
219                  {/if}
220                  {/foreach}
221                        <script type="text/javascript" src="{$ROOT_URL}themes/default/js/rating.js"></script>
222                        <script type="text/javascript">
223                        makeNiceRatingForm( {ldelim}rootUrl: '{$ROOT_URL|@escape:"javascript"}', image_id: {$current.id},
224                        updateRateText: "{'Update your rating'|@translate|@escape:'javascript'}", updateRateElement: document.getElementById("updateRate"),
225                        ratingSummaryText: "{'%.2f (rated %d times)'|@translate|@escape:'javascript'}", ratingSummaryElement: document.getElementById("ratingSummary") {rdelim} );
226                        </script>
227                  </div>
228                </form>
229                <p>
230          </td>
231    {/if}
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                <script type="text/javascript">
236                {literal}function setPrivacyLevel(selectElement, rootUrl, id, level)
237                {
238                selectElement.disabled = true;
239                var y = new PwgWS(rootUrl);
240                y.callService(
241                        "pwg.images.setPrivacyLevel", {image_id: id, level:level} ,
242                        {
243                                method: "POST",
244                                onFailure: function(num, text) { selectElement.disabled = false; alert(num + " " + text); },
245                                onSuccess: function(result) { selectElement.disabled = false; }
246                        }
247                        );
248                }{/literal}
249                </script>
250                        <select onchange="setPrivacyLevel(this, '{$ROOT_URL|@escape:'javascript'}', {$current.id}, this.options[selectedIndex].value)">
251                {foreach from=$available_permission_levels item=label key=level}
252                <option label="{$label}" value="{$level}"{if $level == $current.level} selected="selected"{/if}>{$label}</option>
253                {/foreach}
254                        </select>
255          </td>
256    {/if}
257  </tr>
258</table>
259
260<p>{if isset($metadata)}</p>
261<table id="Metadata" class="infoTable" 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" align="center">
309              <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>
310            </td>
311            <td>
312             {'Comment'|@translate}<br />
313            </td>
314              </tr>
315      </table>
316          </fieldset>
317        </form>
318    {/if}
319  </div>
320{/if} {*comments*}
321
322{if !empty($PLUGIN_PICTURE_AFTER)}{$PLUGIN_PICTURE_AFTER}{/if}
Note: See TracBrowser for help on using the repository browser.