source: extensions/gally/piwigo-2.0/picture.tpl @ 28160

Last change on this file since 28160 was 4517, checked in by grum, 15 years ago

[Template:Gally] Fixes some bugs

  • Property svn:executable set to *
File size: 14.6 KB
Line 
1<!-- **GBL** >PICTURE> -->
2
3{include file='dialogs.tpl'}
4
5<div id="content">
6
7  <div id="imageHeaderBar">
8    <div class="browsePath">
9      <h2>
10      [ <a href="{$U_HOME}" rel="home">{'home'|@translate}</a>
11      {if !$IS_HOME}{$LEVEL_SEPARATOR}{$SECTION_TITLE}{/if}
12      {$LEVEL_SEPARATOR}{$current.TITLE} ]
13      </h2>
14    </div>
15    <div class="imageNumber">{$PHOTO}</div>
16    <h2>&nbsp;</h2>
17  </div> <!-- imageHeaderBar -->
18
19  {if !empty($PLUGIN_PICTURE_BEFORE)}{$PLUGIN_PICTURE_BEFORE}{/if}
20  <div id="imageToolBar">
21    <div id="imageToolBarContainer" class="uiImg">
22        <div class="imageToolBarBg">&nbsp;</div>
23
24        <div class="randomButtons">
25          {if isset($U_SLIDESHOW_START) }
26            <a id="icon_start_slideshow" class="button" 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>
27          {/if}
28          {if isset($U_SLIDESHOW_STOP) }
29            <a id="icon_stop_slideshow" class="button" href="{$U_SLIDESHOW_STOP}" title="{'slideshow_stop'|@translate}" rel="nofollow"><!--<img src="{$ROOT_URL}{$themeconf.icon_dir}/stop_slideshow.png" class="button" alt="{'slideshow_stop'|@translate}">--></a>
30          {/if}
31            <a id="icon_metadata" class="button" href="{$U_METADATA}" title="{'picture_show_metadata'|@translate}" rel="nofollow"><!--<img src="{$ROOT_URL}{$themeconf.icon_dir}/metadata.png" class="button" alt="metadata" />--></a>
32          {if isset($current.U_DOWNLOAD) }
33            <a id="icon_save" class="button" href="{$current.U_DOWNLOAD}" title="{'download_hint'|@translate}"><!--<img src="{$ROOT_URL}{$themeconf.icon_dir}/save.png" class="button" alt="{'download'|@translate}">--></a>
34          {/if}
35          {if isset($PLUGIN_PICTURE_ACTIONS)}{$PLUGIN_PICTURE_ACTIONS}{/if}
36          {if isset($favorite) }
37            <a id="icon_{$favorite.FAVORITE_IMG|@regex_replace:'/(.*\/)*(del_)*(favorite)+(\.png)*/i':'$2$3'}" class="button" href="{$favorite.U_FAVORITE}" title="{$favorite.FAVORITE_HINT}"><!-- <img src="{$favorite.FAVORITE_IMG}" class="button" alt="favorite" title="{$favorite.FAVORITE_HINT}"> --></a>
38          {/if}
39          {if !empty($U_SET_AS_REPRESENTATIVE) }
40            <a id="icon_representative" class="button" href="{$U_SET_AS_REPRESENTATIVE}" title="{'set as category representative'|@translate}"><!-- <img src="{$ROOT_URL}{$themeconf.icon_dir}/representative.png" class="button" alt="{'representative'|@translate}"> --></a>
41          {/if}
42          {if isset($U_ADMIN) }
43            <a id="icon_preferences" class="button" href="{$U_ADMIN}" title="{'link_info_image'|@translate}"><!-- <img src="{$ROOT_URL}{$themeconf.icon_dir}/preferences.png" class="button" alt="{'edit'|@translate}"> --></a>
44          {/if}
45          {if isset($U_CADDIE) }{*caddie management BEGIN*}
46          <script type="text/javascript">
47          {literal}
48          function addToCadie(aElement, rootUrl, id)
49          {
50            if (aElement.disabled) return;
51            aElement.disabled=true;
52            var y = new PwgWS(rootUrl);
53
54            y.callService(
55              "pwg.caddie.add", {image_id: id} ,
56              {
57                onFailure: function(num, text) { alert(num + " " + text); document.location=aElement.href; },
58                onSuccess: function(result) { aElement.disabled = false; }
59              }
60            );
61          }{/literal}
62          </script>
63          <a id="icon_caddie" class="button" href="{$U_CADDIE}" onclick="addToCadie(this, '{$ROOT_URL|@escape:'javascript'}', {$current.id}); return false;" title="{'add to caddie'|@translate}"><!-- <img src="{$ROOT_URL}{$themeconf.icon_dir}/caddie_add.png" class="button" alt="{'caddie'|@translate}"> --></a>
64          {/if} {*caddie management END*}
65        </div>
66        {include file='picture_nav_buttons.tpl'|@get_extent:'picture_nav_buttons'}
67
68        {if $SHOW_PICTURE_NAME_ON_TITLE }
69        <div><h2>{$current.TITLE}</h2></div>
70        {/if}
71
72    </div>
73  </div> <!-- imageToolBar -->
74
75  {if isset($previous) }
76  <div id="navThumbPrev">
77    <table id="navThumbPrevContainer" class="uiImg"><tr><td>
78      <div class="navThumbPrevBg">&nbsp;</div>
79      <div class="navThumbPrevContent">
80        <a class="navThumb" id="thumbPrev" href="{$previous.U_IMG}" title="{'previous_page'|@translate} : {$previous.TITLE}" rel="prev">
81          <img src="{$previous.THUMB_SRC}" class="thumbLink" id="linkPrev" alt="{$previous.TITLE}">
82        </a>
83      </div>
84    </td></tr></table>
85  </div> <!-- navThumbPrev -->
86  {/if}
87
88  {if isset($next) }
89  <div id="navThumbNext">
90    <table id="navThumbNextContainer" class="uiImg"><tr><td>
91      <div class="navThumbNextBg">&nbsp;</div>
92      <div class="navThumbNextContent">
93        <a class="navThumb" id="thumbNext" href="{$next.U_IMG}" title="{'next_page'|@translate} : {$next.TITLE}" rel="next">
94          <img src="{$next.THUMB_SRC}" class="thumbLink" id="linkNext" alt="{$next.TITLE}">
95        </a>
96      </div>
97    </td></tr></table>
98  </div> <!-- navThumbNext -->
99  {/if}
100
101
102    <div id="theImage">
103        {$ELEMENT_CONTENT}
104
105        {if isset($COMMENT_IMG)}
106        <p>{$COMMENT_IMG}</p>
107        {else}
108        <p>&nbsp;</p>
109        {/if}
110
111        {if isset($U_SLIDESHOW_STOP) }
112        <p>
113          [ <a href="{$U_SLIDESHOW_STOP}">{'slideshow_stop'|@translate}</a> ]
114        </p>
115        {/if}
116    </div> <!-- theImage -->
117
118
119  <div id="theTabsContainer">
120  <div id="theTabs" class="uiImg">
121    <ul id="theTabsheets">
122      <li class="tab" id="tabImageInfos"><a href="#imageInfos">{"Informations"|@translate}</a></li>
123      {if isset($metadata)}
124        {foreach from=$metadata item=meta key=id}
125          <li class="tab" id="tabImageMeta"><a href="#imageMeta{$id}">{$meta.TITLE|@translate}</a></li>
126        {/foreach}
127      {/if}
128      {if (isset($COMMENT_COUNT) and ($COMMENT_COUNT>0)) or isset($comment_add) }
129        <li class="tab" id="tabTheComment">
130          <a href="#theComments">{$pwg->l10n_dec('%d comment', '%d comments',$COMMENT_COUNT)}</a>
131          <!-- <span class="comment_icon"><img src="{$ROOT_URL}{$themeconf.icon_dir}/comments.png" alt=""/></span> -->
132        </li>
133      {/if}
134    </ul>
135    <div id="theTabsBg"></div>
136
137    <div id="imageInfos" class="tabPanel">
138      <div id="imageInfosContainer">
139      <div class="imageInfosBg">&nbsp;</div>
140
141    <table class="infoTable" summary="Some info about this picture">
142      <tr  class="emptyrow" style="line-height:0px;">
143        <td colspan="2" width="49.75%">&nbsp;</td>
144        <td>&nbsp;</td>
145        <td colspan="2" width="49.75%">&nbsp;</td>
146      </tr>
147
148      <tr>
149        <td class="label">{'Author'|@translate}</td>
150        <td class="value" style="min-width:214px;">{if isset($INFO_AUTHOR)}{$INFO_AUTHOR}{else}{'N/A'|@translate}{/if}</td>
151        <td>&nbsp;</td>
152        <td class="label">{'Dimensions'|@translate}</td>
153        <td class="value">{if isset($INFO_DIMENSIONS)}{$INFO_DIMENSIONS|@replace:"*":"x"}{else}{'N/A'|@translate}{/if}</td>
154      </tr>
155      <tr>
156        <td class="label">{'Created on'|@translate}</td>
157        <td class="value">{if isset($INFO_CREATION_DATE)}{$INFO_CREATION_DATE}{else}{'N/A'|@translate}{/if}</td>
158        <td>&nbsp;</td>
159        <td class="label">{'File'|@translate}</td>
160        <td class="value">{$INFO_FILE}</td>
161      </tr>
162      <tr>
163        <td class="label">{'Posted on'|@translate}</td>
164        <td class="value">{$INFO_POSTED_DATE}</td>
165        <td>&nbsp;</td>
166        <td class="label">{'Filesize'|@translate}</td>
167        <td class="value">{if isset($INFO_FILESIZE)}{$INFO_FILESIZE}{else}{'N/A'|@translate}{/if}</td>
168      </tr>
169      {if isset($related_tags)}
170        <tr class="emptyrow"><td colspan="5">&nbsp;</td></tr>
171        <tr id="infoTags">
172          <td class="label">{'Tags'|@translate}</td>
173          <td colspan="4" class="value">
174              {foreach from=$related_tags item=tag name=tag_loop}{if !$smarty.foreach.tag_loop.first}, {/if}
175              <a href="{$tag.URL}">{$tag.name}</a>{/foreach}
176          </td>
177        </tr>
178      {/if}
179      {if isset($related_categories)}
180        <tr class="emptyrow"><td colspan="5">&nbsp;</td></tr>
181        <tr id="infoCats">
182          <td class="label">{'Categories'|@translate}</td>
183          <td colspan="4" class="value">
184            {foreach from=$related_categories item=cat name=tag_loop}{if !$smarty.foreach.tag_loop.first},&nbsp;{/if}
185            {$cat}
186            {/foreach}
187          </td>
188        </tr>
189      {/if}
190      <tr class="emptyrow"><td colspan="5">&nbsp;</td><tr>
191      <tr>
192        <td class="label">{'Visits'|@translate}</td>
193        <td colspan="4" class="value">{$INFO_VISITS}</td>
194      </tr>
195
196    {if isset($rate_summary) or isset($rating)}
197      <tr>
198        {if isset($rate_summary)}
199          <td class="label">{'Average rate'|@translate}</td>
200          <td class="value" id="ratingSummary">
201          {if $rate_summary.count}
202            {assign var='rate_text' value='%.2f (rated %d times, standard deviation = %.2f)'|@translate }
203            {$pwg->sprintf($rate_text, $rate_summary.average, $rate_summary.count, $rate_summary.std) }
204          {else}
205            {'no_rate'|@translate}
206          {/if}
207          </td>
208        {else}
209          <td colspan="2">&nbsp;</td>
210        {/if}
211        <td>&nbsp;</td>
212        {if isset($rating)}
213          <td class="label">
214            <span id="updateRate">{if isset($rating.USER_RATE)}{'update_rate'|@translate}{else}{'new_rate'|@translate}{/if}</span>
215          </td>
216          <td class="value">
217            <form action="{$rating.F_ACTION}" method="post" id="rateForm" style="margin:0;">
218            <div>&nbsp;
219            {foreach from=$rating.marks item=mark name=rate_loop}
220            {if !$smarty.foreach.rate_loop.first} | {/if}
221            {if isset($rating.USER_RATE) && $mark==$rating.USER_RATE}
222              <input type="button" name="rate" value="{$mark}" class="rateButtonSelected" title="{$mark}" />
223            {else}
224              <input type="submit" name="rate" value="{$mark}" class="rateButton" title="{$mark}" />
225            {/if}
226            {/foreach}
227            <script type="text/javascript" src="{$ROOT_URL}template/{$themeconf.template}/rating.js"></script>
228            <script type="text/javascript">
229            makeNiceRatingForm( {ldelim}rootUrl: '{$ROOT_URL|@escape:"javascript"}', image_id: {$current.id},
230            updateRateText: "{'update_rate'|@translate|@escape:'javascript'}", updateRateElement: document.getElementById("updateRate"),
231            ratingSummaryText: "{'%.2f (rated %d times, standard deviation = %.2f)'|@translate|@escape:'javascript'}", ratingSummaryElement: document.getElementById("ratingSummary") {rdelim} );
232            </script>
233            </div>
234            </form>
235          </td>
236        {else}
237          <td colspan="2">&nbsp;</td>
238        {/if}
239      </tr>
240    {/if}
241
242    {if isset($available_permission_levels) }
243      <tr>
244        <td class="label">{'Privacy level'|@translate}:</td>
245        <td colspan="4" class="value">
246    <script type="text/javascript">
247    {literal}function setPrivacyLevel(selectElement, rootUrl, id, level)
248    {
249    selectElement.disabled = true;
250    var y = new PwgWS(rootUrl);
251    y.callService(
252      "pwg.images.setPrivacyLevel", {image_id: id, level:level} ,
253      {
254        method: "POST",
255        onFailure: function(num, text) { selectElement.disabled = false; alert(num + " " + text); },
256        onSuccess: function(result) { selectElement.disabled = false; }
257      }
258      );
259    }{/literal}
260    </script>
261      <select onchange="setPrivacyLevel(this, '{$ROOT_URL|@escape:'javascript'}', {$current.id}, this.options[selectedIndex].value)">
262      {foreach from=$available_permission_levels item=level}
263        <option value="{$level}"{if $current.level==$level} selected="selected"{/if}>{$pwg->l10n($pwg->sprintf('Level %d',$level))}</option>
264      {/foreach}
265      </select>
266      </td></tr>
267    {/if}
268
269    </table>
270
271      </div>
272    </div> <!-- imageInfos -->
273
274
275
276
277    {if isset($metadata)}
278    {foreach from=$metadata item=meta key=id}
279    <div id="imageMeta{$id}" class="imageMeta tabPanel">
280      <div id="imageMetaContainer{$id}">
281        <div class="imageMetaBg">&nbsp;</div>
282        <table id="displaymeta{$id}" class="displaymeta infoTable">
283          {foreach from=$meta.lines item=value key=label name=metaloop}
284          {if ($smarty.foreach.metaloop.iteration-1) % #metaNumCols# == 0}
285            {if !$smarty.foreach.metaloop.first}</tr>{/if}
286            {if !$smarty.foreach.metaloop.last}<tr>{/if}
287          {/if}
288            <td class="label">{$label|@translate}</td>
289            <td class="value">{$value|@replace:',':', '}</td>
290        {/foreach}
291        </table>
292      </div>
293    </div> <!-- imageMeta -->
294    {/foreach}
295    {/if}
296
297
298    {if (isset($COMMENT_COUNT) and ($COMMENT_COUNT>0)) or isset($comment_add) }
299    <div id="theComments" class="tabPanel">
300      <div id='theCommentBG'>&nbsp;</div>
301
302      {if !empty($COMMENT_NAV_BAR)}
303      <div class="navigationBar">{$COMMENT_NAV_BAR}</div>
304      {/if}
305
306
307      {if isset($comment_add) or isset($comments)}
308      <table id="theCommentContainer">
309        <tr style="vertical-align:top;">
310          {if isset($comment_add)}
311          {if isset($comments)}
312          <td width="50%">
313          {else}
314          <td>
315          {/if}
316            <h4>{'comments_add'|@translate}</h4>
317            <form  method="post" action="{$comment_add.F_ACTION}" class="filter" id="addComment">
318              <table>
319                {if $comment_add.SHOW_AUTHOR}
320                <tr>
321                  <td>{'upload_author'|@translate}</td>
322                  <td><input type="text" name="author"></td>
323                </tr>
324                {/if}
325                <tr>
326                  <td {if $comment_add.SHOW_AUTHOR}colspan="2"{/if}><textarea name="content" id="contentid" rows="7" cols="80">{$comment_add.CONTENT}</textarea></td>
327                </tr>
328                <tr>
329                  <td {if $comment_add.SHOW_AUTHOR}colspan="2"{/if}>
330                    <input type="hidden" name="key" value="{$comment_add.KEY}" />
331                    <input class="submit" type="submit" value="{'Submit'|@translate}"/>
332                  </td>
333                </tr>
334              </table>
335            </form>
336          </td>
337          {/if}
338
339          {if isset($comments)}
340          {if isset($comment_add)}
341          <td width="50%">
342          {else}
343          <td>
344          {/if}
345            <div id="theCommentList">
346              {include file='comment_list.tpl' comment_separator=true}
347            </div>
348          </td>
349          {/if}
350
351        </tr>
352      </table>
353      {/if}
354    </div>
355    {/if} {*comments*}
356
357  </div><!-- theTabs -->
358  </div>
359
360  {if !empty($PLUGIN_PICTURE_AFTER)}{$PLUGIN_PICTURE_AFTER}{/if}
361
362</div>
363
364<!-- **GBL** <PICTURE< -->
365
Note: See TracBrowser for help on using the repository browser.