source: extensions/gally/gally-default/template/picture.tpl @ 11030

Last change on this file since 11030 was 11030, checked in by grum, 13 years ago

fix bug:2306 - Some translation keys are not correct

  • Property svn:executable set to *
File size: 17.3 KB
Line 
1<!-- **GBL** >PICTURE> -->
2
3{include file='dialogs.tpl'}
4
5<div id="content">
6
7  <div id="theImageHigh" style="display:none;">
8    <div id="theImgHighBg"></div>
9    <div id="theImgHighContainer">
10      <div id="theImgHighCloseButton" onclick="gallyPP.closeDisplayHigh();"></div>
11      <div id="theImgHighZoomButton" class="fit" onclick="gallyPP.switchZoomHigh();"></div>
12      <div id="theImgHighContainer2">
13        <img id="theImgHigh" src="" style="display:none;" alt="{$ALT_IMG}"
14          {if isset($COMMENT_IMG)}
15            title="{$COMMENT_IMG|@strip_tags:false|@replace:'"':' '}" {else} title="{$current.TITLE|@replace:'"':' '} - {$ALT_IMG}"
16          {/if}>
17      </div>
18    </div>
19  </div>
20
21  <div id="imageHeaderBar">
22    <div class="browsePath">
23      <h2>
24      [ {$SECTION_TITLE}{$LEVEL_SEPARATOR}{$current.TITLE} ]
25      </h2>
26    </div>
27    <div class="imageNumber">{$PHOTO}</div>
28    <h2>&nbsp;</h2>
29  </div> <!-- imageHeaderBar -->
30
31  {if !empty($PLUGIN_PICTURE_BEFORE)}{$PLUGIN_PICTURE_BEFORE}{/if}
32  <div id="imageToolBar">
33    <div id="imageToolBarContainer" class="uiImg">
34        <div class="imageToolBarBg">&nbsp;</div>
35
36        <div class="randomButtons">
37          {if isset($U_SLIDESHOW_START) }
38            <a id="icon_start_slideshow" class="button" href="{$U_SLIDESHOW_START}" title="{'Play of slideshow'|@translate}" rel="nofollow"></a>
39          {/if}
40          {if isset($U_SLIDESHOW_STOP) }
41            <a id="icon_stop_slideshow" class="button" href="{$U_SLIDESHOW_STOP}" title="{'Pause of slideshow'|@translate}" rel="nofollow"></a>
42          {/if}
43          {if isset($U_METADATA)}
44            <a id="icon_metadata" class="button" href="{$U_METADATA}" title="{'Show file metadata'|@translate}" rel="nofollow"></a>
45          {/if}
46
47          {if #displayHighResIcon#=="yes" and isset($high) }
48            <a id="icon_high_res" class="button pointer" onclick="gallyPP.openDisplayHigh('{$high.U_HIGH}');" title="" rel="nofollow" ></a>
49          {/if}
50
51          {if isset($current.U_DOWNLOAD) }
52            <a id="icon_save" class="button" href="{$current.U_DOWNLOAD}" title="{'download this file'|@translate}"></a>
53          {/if}
54
55          {if isset($PLUGIN_PICTURE_ACTIONS)}{$PLUGIN_PICTURE_ACTIONS}{/if}
56
57
58          {if isset($favorite) }
59            <a id="icon_{if $favorite.IS_FAVORITE}del_{/if}favorite" class="button" 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}"></a>
60          {/if}
61          {if !empty($U_SET_AS_REPRESENTATIVE) }
62            <a id="icon_representative" class="button" href="{$U_SET_AS_REPRESENTATIVE}" title="{'set as album representative'|@translate}"></a>
63          {/if}
64          {if isset($U_ADMIN) }
65            <a id="icon_preferences" class="button" href="{$U_ADMIN}" title="{'Modify information'|@translate}"></a>
66          {/if}
67          {if isset($U_CADDIE) }{*caddie management BEGIN*}
68          <script type="text/javascript">
69          {literal}
70          function addToCadie(aElement, rootUrl, id)
71          {
72            if (aElement.disabled) return;
73            aElement.disabled=true;
74            var y = new PwgWS(rootUrl);
75
76            y.callService(
77              "pwg.caddie.add", {image_id: id} ,
78              {
79                onFailure: function(num, text) { alert(num + " " + text); document.location=aElement.href; },
80                onSuccess: function(result) { aElement.disabled = false; }
81              }
82            );
83          }{/literal}
84          </script>
85          <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}"></a>
86          {/if} {*caddie management END*}
87        </div>
88        {include file='picture_nav_buttons.tpl'|@get_extent:'picture_nav_buttons'}
89
90        {if $SHOW_PICTURE_NAME_ON_TITLE }
91        <div><h2>{$current.TITLE}</h2></div>
92        {/if}
93
94    </div>
95  </div> <!-- imageToolBar -->
96
97  {if $DISPLAY_NAV_THUMB}
98    {if isset($previous) }
99    <div id="navThumbPrev">
100      <table id="navThumbPrevContainer" class="uiImg"><tr><td>
101        <div class="navThumbPrevBg">&nbsp;</div>
102        <div class="navThumbPrevContent">
103          <a class="navThumb" id="thumbPrev" href="{$previous.U_IMG}" title="{'Previous'|@translate} : {$previous.TITLE}" rel="prev">
104            <img src="{$previous.THUMB_SRC}" class="thumbLink" id="linkPrev" alt="{$previous.TITLE}">
105          </a>
106        </div>
107      </td></tr></table>
108    </div> <!-- navThumbPrev -->
109    {/if}
110
111    {if isset($next) }
112    <div id="navThumbNext">
113      <table id="navThumbNextContainer" class="uiImg"><tr><td>
114        <div class="navThumbNextBg">&nbsp;</div>
115        <div class="navThumbNextContent">
116          <a class="navThumb" id="thumbNext" href="{$next.U_IMG}" title="{'Next'|@translate} : {$next.TITLE}" rel="next">
117            <img src="{$next.THUMB_SRC}" class="thumbLink" id="linkNext" alt="{$next.TITLE}">
118          </a>
119        </div>
120      </td></tr></table>
121    </div> <!-- navThumbNext -->
122    {/if}
123  {/if}
124
125  <div id="theImage">
126    {$ELEMENT_CONTENT}
127
128    {if isset($COMMENT_IMG)}
129    <p>{$COMMENT_IMG}</p>
130    {else}
131    <p>&nbsp;</p>
132    {/if}
133
134    {if isset($U_SLIDESHOW_STOP) }
135    <p>
136      [ <a href="{$U_SLIDESHOW_STOP}">{'stop the slideshow'|@translate}</a> ]
137    </p>
138    {/if}
139  </div> <!-- theImage -->
140
141  <div id="theTabsContainer">
142  <div id="theTabs" class="uiImg">
143    {assign var='display_info_panel' value=false}
144    {foreach from=$display_info item=displayitem}
145      {if $displayitem}
146        {assign var='display_info_panel' value=true}
147      {/if}
148    {/foreach}
149
150    <ul id="theTabsheets">
151      {if $display_info_panel}
152        <li class="tab" id="tabImageInfos"><a href="#imageInfos">{'Informations'|@translate}</a></li>
153      {/if}
154
155      {if isset($metadata)}
156        {foreach from=$metadata item=meta key=id}
157          <li class="tab" id="tabImageMeta{$id}"><a href="#imageMeta{$id}">{$meta.TITLE|@translate}</a></li>
158        {/foreach}
159      {/if}
160
161      {if (isset($COMMENT_COUNT) and ($COMMENT_COUNT>0)) or isset($comment_add) }
162        <li class="tab" id="tabTheComment">
163          <a href="#theComments">{$pwg->l10n_dec('%d comment', '%d comments',$COMMENT_COUNT)}</a>
164        </li>
165      {/if}
166
167    </ul>
168    <div id="theTabsBg"></div>
169
170
171
172    {if $display_info_panel}
173      <div id="imageInfos" class="tabPanel">
174        <div id="imageInfosContainer">
175        <div class="imageInfosBg">&nbsp;</div>
176
177          <table class="infoTable">
178            <tr  class="emptyrow" style="line-height:0px;">
179              <td colspan="2">&nbsp;</td>
180              <td width="10px">&nbsp;</td>
181              <td width="12%">&nbsp;</td>
182              <td width="18%">&nbsp;</td>
183              <td width="10px">&nbsp;</td>
184              <td width="12%">&nbsp;</td>
185              <td width="18%">&nbsp;</td>
186            </tr>
187
188            {if $display_info.author or $display_info.created_on or $display_info.posted_on}
189            <tr>
190              {assign var='colspan' value=8}
191              {if $display_info.author}
192                {assign var='colspan' value=`$colspan-3`}
193                <td class="label">{'Author'|@translate}</td>
194                <td class="value" style="min-width:214px;">{if isset($INFO_AUTHOR)}{$INFO_AUTHOR}{else}{'N/A'|@translate}{/if}</td>
195                <td>&nbsp;</td>
196              {/if}
197
198              {if $display_info.created_on}
199                {assign var='colspan' value=`$colspan-3`}
200                <td class="label">{'Created on'|@translate}</td>
201                <td class="value">{if isset($INFO_CREATION_DATE)}{$INFO_CREATION_DATE}{else}{'N/A'|@translate}{/if}</td>
202                <td>&nbsp;</td>
203              {/if}
204
205              {if $display_info.posted_on}
206                {assign var='colspan' value=`$colspan-2`}
207                <td class="label">{'Posted on'|@translate}</td>
208                <td class="value">{$INFO_POSTED_DATE}</td>
209              {/if}
210
211              {if $colspan!=0}
212                <td colspan="{$colspan}">&nbsp;</td>
213              {/if}
214
215            </tr>
216            {/if}
217
218            {if $display_info.dimensions or $display_info.file or $display_info.filesize}
219            <tr>
220              {assign var='colspan' value=8}
221
222              {if $display_info.dimensions}
223                {assign var='colspan' value=`$colspan-3`}
224                <td class="label">{'Dimensions'|@translate}</td>
225                <td class="value">{if isset($INFO_DIMENSIONS)}{$INFO_DIMENSIONS|@replace:"*":"x"}{else}{'N/A'|@translate}{/if}</td>
226                <td>&nbsp;</td>
227              {/if}
228
229              {if $display_info.file}
230                {assign var='colspan' value=`$colspan-3`}
231                <td class="label">{'File'|@translate}</td>
232                <td class="value">{$INFO_FILE}</td>
233                <td>&nbsp;</td>
234              {/if}
235
236              {if $display_info.filesize}
237                {assign var='colspan' value=`$colspan-2`}
238                <td class="label">{'Filesize'|@translate}</td>
239                <td class="value">{if isset($INFO_FILESIZE)}{$INFO_FILESIZE}{else}{'N/A'|@translate}{/if}</td>
240              {/if}
241
242              {if $colspan!=0}
243                <td colspan="{$colspan}">&nbsp;</td>
244              {/if}
245            </tr>
246            {/if}
247
248            {if isset($related_tags) and $display_info.tags}
249              <tr class="emptyrow"><td colspan="8">&nbsp;</td></tr>
250              <tr id="infoTags">
251                <td class="label">{'Tags'|@translate}</td>
252                <td colspan="7" class="value">
253                    {foreach from=$related_tags item=tag name=tag_loop}{if !$smarty.foreach.tag_loop.first}, {/if}
254                    <a href="{$tag.URL}">{$tag.name}</a>{/foreach}
255                </td>
256              </tr>
257            {/if}
258
259            {if isset($related_categories) and $display_info.categories}
260              <tr class="emptyrow"><td colspan="8">&nbsp;</td></tr>
261              <tr id="infoCats">
262                <td class="label">{'Albums'|@translate}</td>
263                <td colspan="7" class="value">
264                  {foreach from=$related_categories item=cat name=tag_loop}{if !$smarty.foreach.tag_loop.first},&nbsp;{/if}
265                  {$cat}
266                  {/foreach}
267                </td>
268              </tr>
269            {/if}
270
271            {if $display_info.visits}
272              <tr class="emptyrow"><td colspan="8">&nbsp;</td><tr>
273              <tr>
274                <td class="label">{'Visits'|@translate}</td>
275                <td colspan="7" class="value">{$INFO_VISITS}</td>
276              </tr>
277            {/if}
278
279            {if (isset($rate_summary) or isset($rating)) and  $display_info.average_rate}
280              <tr>
281                {if isset($rate_summary)}
282                  <td class="label">{'Average rate'|@translate}</td>
283                  <td class="value" id="ratingSummary">
284                  {if $rate_summary.count}
285                    {assign var='rate_text' value='%.2f (rated %d times)'|@translate }
286                    {$pwg->sprintf($rate_text, $rate_summary.average, $rate_summary.count) }
287                  {else}
288                    {'no rate'|@translate}
289                  {/if}
290                  </td>
291                {else}
292                  <td colspan="2">&nbsp;</td>
293                {/if}
294                <td>&nbsp;</td>
295
296                {if isset($rating)}
297                  <td class="label" colspan="5">
298                    <span id="updateRate">{if isset($rating.USER_RATE)}{'Update your rating'|@translate}{else}{'Rate this photo'|@translate}{/if}</span>
299
300                    <form action="{$rating.F_ACTION}" method="post" id="rateForm" style="margin:0;">
301                    <div>&nbsp;
302                    {foreach from=$rating.marks item=mark name=rate_loop}
303                    {if !$smarty.foreach.rate_loop.first} | {/if}
304                    {if isset($rating.USER_RATE) && $mark==$rating.USER_RATE}
305                      <input type="button" name="rate" value="{$mark}" class="rateButtonSelected" title="{$mark}" />
306                    {else}
307                      <input type="submit" name="rate" value="{$mark}" class="rateButton" title="{$mark}" />
308                    {/if}
309                    {/foreach}
310                    <script type="text/javascript" src="{$ROOT_URL}themes/default/js/rating.js"></script>
311                    <script type="text/javascript">
312                    makeNiceRatingForm( {ldelim}rootUrl: '{$ROOT_URL|@escape:"javascript"}', image_id: {$current.id},
313                    updateRateText: "{'Update your rating'|@translate|@escape:'javascript'}", updateRateElement: document.getElementById("updateRate"),
314                    ratingSummaryText: "{'%.2f (rated %d times)'|@translate|@escape:'javascript'}", ratingSummaryElement: document.getElementById("ratingSummary") {rdelim} );
315                    </script>
316                    </div>
317                    </form>
318                  </td>
319                {else}
320                  <td colspan="5">&nbsp;</td>
321                {/if}
322              </tr>
323            {/if}
324
325          {if isset($available_permission_levels) and $display_info.privacy_level}
326            <tr>
327              <td class="label">{'Who can see this photo?'|@translate}:</td>
328              <td colspan="4" class="value">
329                <script type="text/javascript">
330                {literal}function setPrivacyLevel(selectElement, rootUrl, id, level)
331                {
332                selectElement.disabled = true;
333                var y = new PwgWS(rootUrl);
334                y.callService(
335                  "pwg.images.setPrivacyLevel", {image_id: id, level:level} ,
336                  {
337                    method: "POST",
338                    onFailure: function(num, text) { selectElement.disabled = false; alert(num + " " + text); },
339                    onSuccess: function(result) { selectElement.disabled = false; }
340                  }
341                  );
342                }{/literal}
343                </script>
344                <select onchange="setPrivacyLevel(this, '{$ROOT_URL|@escape:'javascript'}', {$current.id}, this.options[selectedIndex].value)">
345                  {foreach from=$available_permission_levels item=label key=level}
346                  <option label="{$label}" value="{$level}"{if $level == $current.level} selected="selected"{/if}>{$label}</option>
347                  {/foreach}
348                </select>
349              </td>
350            </tr>
351          {/if}
352
353          </table>
354
355        </div>
356      </div> <!-- imageInfos -->
357    {/if}
358
359    {if isset($metadata)}
360    {foreach from=$metadata item=meta key=id}
361    <div id="imageMeta{$id}" class="imageMeta tabPanel">
362      <div id="imageMetaContainer{$id}">
363        <div class="imageMetaBg">&nbsp;</div>
364
365        {if count($meta.lines)>0 and !array_key_exists('<!--rawContent-->', $meta.lines)}
366          <table id="displaymeta{$id}" class="displaymeta infoTable">
367            {foreach from=$meta.lines item=value key=label name=metaloop}
368              {if ($smarty.foreach.metaloop.iteration-1) % #metaNumCols# == 0}
369                {if !$smarty.foreach.metaloop.first}</tr>{/if}
370                {if !$smarty.foreach.metaloop.last}<tr>{/if}
371              {/if}
372              <td class="label">{$label|@translate}</td>
373              <td class="value">{$value}</td>
374            {/foreach}
375          </table>
376        {else}
377          {assign var='empty' value='<!--rawContent-->'}
378          {$meta.lines.$empty}
379        {/if}
380      </div>
381    </div> <!-- imageMeta -->
382    {/foreach}
383    {/if}
384
385
386    {if (isset($COMMENT_COUNT) and ($COMMENT_COUNT>0)) or isset($comment_add) }
387    <div id="theComments" class="tabPanel">
388      <div id='theCommentBG'>&nbsp;</div>
389
390      {if !empty($navbar) }{include file='navigation_bar.tpl'|@get_extent:'navbar'}{/if}
391
392      {if isset($comment_add) or isset($comments)}
393      <table id="theCommentContainer">
394        <tr style="vertical-align:top;">
395          {if isset($comment_add)}
396          {if isset($comments)}
397          <td width="50%">
398          {else}
399          <td>
400          {/if}
401            <h4>{'Add a comment'|@translate}</h4>
402            <form  method="post" action="{$comment_add.F_ACTION}" class="filter" id="addComment">
403              <table>
404                {if $comment_add.SHOW_AUTHOR}
405                <tr>
406                  <td>{'Author'|@translate}</td>
407                  <td><input type="text" name="author"></td>
408                </tr>
409                {/if}
410                <tr>
411                  <td {if $comment_add.SHOW_AUTHOR}colspan="2"{/if}><textarea name="content" id="contentid" rows="7" cols="80">{$comment_add.CONTENT}</textarea></td>
412                </tr>
413                <tr>
414                  <td {if $comment_add.SHOW_AUTHOR}colspan="2"{/if}>
415                    <input type="hidden" name="key" value="{$comment_add.KEY}" />
416                    <input class="submit" type="submit" value="{'Submit'|@translate}"/>
417                  </td>
418                </tr>
419              </table>
420            </form>
421          </td>
422          {/if}
423
424          {if isset($comments)}
425          {if isset($comment_add)}
426          <td width="50%">
427          {else}
428          <td>
429          {/if}
430            <div id="theCommentList">
431              {include file='comment_list.tpl' comment_separator=true}
432            </div>
433          </td>
434          {/if}
435
436        </tr>
437      </table>
438      {/if}
439    </div>
440    {/if} {*comments*}
441
442  </div><!-- theTabs -->
443  </div>
444
445  {if !empty($PLUGIN_PICTURE_AFTER)}{$PLUGIN_PICTURE_AFTER}{/if}
446
447</div>
448
449<!-- **GBL** <PICTURE< -->
450
Note: See TracBrowser for help on using the repository browser.