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

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

Compatible minimum with BBcode_Bar v2.1.a

File size: 10.7 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="{$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 class="value"><p>{if isset($INFO_AUTHOR)}{$INFO_AUTHOR}{else}{'N/A'|@translate}{/if}</p></td>
128        {/if}
129      <td class="label">{'Licence area'|@translate}</td>
130      <td class="value"><p>{if isset($COMMENT_LIC)}{$COMMENT_LIC}{else}{'N/A'|@translate}{/if}</p></td>
131  </tr>
132
133  <tr>
134        {if $display_info.created_on}
135      <td id="datecreate" class="label">{'Created on'|@translate}</td>
136      <td class="value">{if isset($INFO_CREATION_DATE)}{$INFO_CREATION_DATE}{else}{'N/A'|@translate}{/if}</td>
137        {/if}
138    {if $display_info.posted_on}
139      <td id="datepost" class="label">{'Posted on'|@translate}</td>
140      <td class="value">{$INFO_POSTED_DATE}</td>
141    {/if}
142  </tr>
143
144  <tr>
145    {if $display_info.tags}
146      <td id="Tags" class="label">{'Tags'|@translate}</td>
147      <td class="value">
148            <p>
149        {if isset($related_tags)}
150          {foreach from=$related_tags item=tag name=tag_loop}{if !$smarty.foreach.tag_loop.first}, {/if}
151          <a href="{$tag.URL}" {if !empty($tag.radu_class)}class="{$tag.radu_class}"{/if}>{$tag.name}</a>
152                  {/foreach}
153                {/if}
154                </p>
155          </td>
156        {/if}
157    {if $display_info.categories}
158      <td id="Categories" class="label">{'Categories'|@translate}</td>
159      <td class="value">
160        {if isset($related_categories)}
161          <ul>
162            {foreach from=$related_categories item=cat}
163              <li><p>{$cat}</p></li>
164            {/foreach}
165          </ul>
166         {/if}
167          </td>
168        {/if}
169  </tr>
170
171  <tr>
172    {if $display_info.file}
173      <td id="File" class="label">{'File'|@translate}</td>
174      <td class="value"><p>{$INFO_FILE}, <small>
175            {if $display_info.dimensions}{if isset($INFO_DIMENSIONS)}{$INFO_DIMENSIONS}{else}{'N/A'|@translate}{/if}, {/if}
176                {if $display_info.filesize}{if isset($INFO_FILESIZE)}{$INFO_FILESIZE}{else}{'N/A'|@translate}{/if}{/if}
177          </small></p></td>
178        {/if}
179    {if $display_info.visits}
180      <td id="Visits" class="label">{'Informations'|@translate}</td>
181      <td class="value">
182            <p>
183          {$INFO_VISITS} {'Visits'|@translate}
184          {if $display_info.average_rate and isset($rate_summary)}, <span id="Average" class="ratingSummary">
185                 
186            {if $rate_summary.count}
187                          {assign var='rate_text' value='%.2f (rated %d times)'|@translate}
188                          {$pwg->sprintf($rate_text, $rate_summary.average, $rate_summary.count)}
189                    {else}
190                          {'no rate'|@translate}
191            {/if}
192
193                  </span>{/if}
194                </p>
195      </td>
196    {/if}
197  </tr>
198
199  <tr>
200    {if isset($rating)}
201          <td id="rating" class="label">
202                <span id="updateRate">
203        {if isset($rating.USER_RATE)}
204          {'Update your rating'|@translate}
205        {else}
206          {'Rate this picture'|@translate}
207        {/if}
208        </span>
209          </td>
210          <td class="value">
211        <p>
212                <form action="{$rating.F_ACTION}" method="post" id="rateForm" style="margin:0;">
213                <div>&nbsp;
214                  {foreach from=$rating.marks item=mark name=rate_loop}
215                  {if !$smarty.foreach.rate_loop.first} | {/if}
216                  {if isset($rating.USER_RATE) && $mark==$rating.USER_RATE}
217                    <input type="button" name="rate" value="{$mark}" class="rateButtonSelected" title="{$mark}">
218                  {else}
219                        <input type="submit" name="rate" value="{$mark}" class="rateButton" title="{$mark}">
220                  {/if}
221                  {/foreach}
222                        <script type="text/javascript" src="{$ROOT_URL}themes/default/js/rating.js"></script>
223                        <script type="text/javascript">
224                        makeNiceRatingForm( {ldelim}rootUrl: '{$ROOT_URL|@escape:"javascript"}', image_id: {$current.id},
225                        updateRateText: "{'Update your rating'|@translate|@escape:'javascript'}", updateRateElement: document.getElementById("updateRate"),
226                        ratingSummaryText: "{'%.2f (rated %d times)'|@translate|@escape:'javascript'}", ratingSummaryElement: document.getElementById("ratingSummary") {rdelim} );
227                        </script>
228                  </div>
229                </form>
230                <p>
231          </td>
232    {/if}
233    {if $display_info.privacy_level and isset($available_permission_levels) }
234          <td id="Privacy" class="label">{'Who can see this photo?'|@translate}:</td>
235          <td class="value">
236                <script type="text/javascript">
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                }{/literal}
250                </script>
251                        <select onchange="setPrivacyLevel(this, '{$ROOT_URL|@escape:'javascript'}', {$current.id}, this.options[selectedIndex].value)">
252                        {html_options options=$available_permission_levels selected=$current.level}
253                        </select>
254          </td>
255    {/if}
256  </tr>
257</table>
258
259<p>{if isset($metadata)}</p>
260<table id="Metadata" class="infoTable" summary="{'Some more (technical) info about this picture'|@translate}">
261{foreach from=$metadata item=meta}
262  <tr id="{$meta.TITLE}">
263    <th colspan="2">{$meta.TITLE}</th>
264  </tr>
265  {foreach from=$meta.lines item=value key=label}
266  <tr id="{$label}" >
267    <td class="label">{$label}</td>
268    <td class="value">{$value}</td>
269  </tr>
270  {/foreach}
271{/foreach}
272</table>
273{/if}
274
275
276<hr class="separation">
277
278{if isset($COMMENT_COUNT)}
279<div id="comments">
280  {if $COMMENT_COUNT > 0}
281                <h3>{$pwg->l10n_dec('%d comment', '%d comments',$COMMENT_COUNT)}</h3>
282  {/if}
283  {if !empty($navbar) }{include file='navigation_bar.tpl'|@get_extent:'navbar'}{/if}
284
285        {if isset($comments)}
286                {include file='comment_list.tpl'}
287        {/if}
288
289        {if isset($comment_add)}
290        <form  method="post" action="{$comment_add.F_ACTION}" class="filter" id="addComment">
291          <fieldset>
292                <legend>{'Add a comment'|@translate}</legend>
293        <table class="commentr">
294              <tr>
295                <td>
296                      <p>
297              {if $comment_add.SHOW_AUTHOR}
298                        <label>{'upload author'|@translate}
299                  <input type="text" name="author">
300                </label>
301              {/if}
302              <br />
303              </p>
304              <input type="hidden" name="key" value="{$comment_add.KEY}">
305              <input class="submit" type="submit" value="{'Submit comment'|@translate}">
306                </td>
307            <td class="center" align="center">
308              <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>
309            </td>
310            <td>
311             {'Comment'|@translate}<br />
312            </td>
313              </tr>
314      </table>
315          </fieldset>
316        </form>
317    {/if}
318  </div>
319{/if} {*comments*}
320
321{if !empty($PLUGIN_PICTURE_AFTER)}{$PLUGIN_PICTURE_AFTER}{/if}
Note: See TracBrowser for help on using the repository browser.