source: extensions/gally/gally-black-graphite/template/picture.tpl @ 16017

Last change on this file since 16017 was 16017, checked in by grum, 12 years ago

feature:2664- compatibility with Piwigo 2.4

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