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

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

feature:2499 - compatibility with Piwigo 2.3

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