Ignore:
Timestamp:
Jun 24, 2012, 9:26:25 PM (12 years ago)
Author:
grum
Message:

feature:2664- compatibility with Piwigo 2.4

File:
1 edited

Legend:

Unmodified
Added
Removed
  • extensions/gally/gally-default/template/picture.tpl

    r12604 r16016  
    11<!-- **GBL** >PICTURE> -->
    22
    3 {include file='dialogs.tpl'}
     3{include file='infos_errors.tpl'}
    44
    55<div id="content" {if isset($MENUBAR)}class="pictureContent"{/if}>
     
    1111      <div id="theImgHighZoomButton" class="fit" onclick="gallyPP.switchZoomHigh();"></div>
    1212      <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}>
     13        <img id="theImgHigh" src="" style="display:none;" alt="{$ALT_IMG}">
    1714      </div>
    1815    </div>
    1916  </div>
    20 
    2117
    2218{if isset($MENUBAR)}
     
    3733{/if}
    3834
     35
     36
    3937    <div class="browsePath">
    4038      <h2>
     
    4442    <div class="imageNumber">{$PHOTO}</div>
    4543    <h2>&nbsp;</h2>
    46   </div> <!-- imageHeaderBar -->
     44  </div>
    4745
    4846  {if !empty($PLUGIN_PICTURE_BEFORE)}{$PLUGIN_PICTURE_BEFORE}{/if}
    4947
     48  {if $DISPLAY_NAV_THUMB}
     49    {if isset($previous) }
     50    <div id="navThumbPrev">
     51      <table id="navThumbPrevContainer" class="uiImg"><tr><td>
     52        <div class="navThumbPrevBg">&nbsp;</div>
     53        <div class="navThumbPrevContent">
     54          <a class="navThumb" id="thumbPrev" href="{$previous.U_IMG}" title="{'Previous'|@translate} : {$previous.TITLE}" rel="prev">
     55            <img src="{$previous.derivatives.square->get_url()}" class="thumbLink" id="linkPrev" alt="{$previous.TITLE}">
     56          </a>
     57        </div>
     58      </td></tr></table>
     59    </div> <!-- navThumbPrev -->
     60    {/if}
     61
     62    {if isset($next) }
     63    <div id="navThumbNext">
     64      <table id="navThumbNextContainer" class="uiImg"><tr><td>
     65        <div class="navThumbNextBg">&nbsp;</div>
     66        <div class="navThumbNextContent">
     67          <a class="navThumb" id="thumbNext" href="{$next.U_IMG}" title="{'Next'|@translate} : {$next.TITLE}" rel="next">
     68            <img src="{$next.derivatives.square->get_url()}" class="thumbLink" id="linkNext" alt="{$next.TITLE}">
     69          </a>
     70        </div>
     71      </td></tr></table>
     72    </div> <!-- navThumbNext -->
     73    {/if}
     74  {/if}
     75
    5076  <div id="imageToolBar">
    51     <div id="imageToolBarContainer" class="uiImg">
     77        <div id="imageToolBarContainer" class="uiImg">
    5278        <div class="imageToolBarBg">&nbsp;</div>
    5379
     80        {if count($current.unique_derivatives)>1}
     81        <div id="derivativeSwitchBox" class="switchBox">
     82        <div class="switchBoxTitle">{'Photo sizes'|@translate}</div>
     83        {foreach from=$current.unique_derivatives item=derivative key=derivative_type}
     84        <span class="switchCheck" id="derivativeChecked{$derivative_type}"{if $derivative->get_type() ne $current.selected_derivative->get_type()} style="visibility:hidden"{/if}>&#x2714; </span>
     85        <a onclick="gallyPP.changeImgSrc('{$derivative->get_url()|@escape:javascript}','{$derivative_type}','{$derivative->get_type()}', '{$COOKIE_PATH}')">
     86          {$derivative->get_type()|@translate}<span class="derivativeSizeDetails"> ({$derivative->get_size_hr()})</span>
     87        </a><br>
     88        {/foreach}
     89        {if isset($U_ORIGINAL)}
     90        <span class="switchCheck" style="visibility:hidden">&#x2714; </span><a onclick="gallyPP.openDisplayHigh('{$U_ORIGINAL}');">{'Original'|@translate}</a>
     91        {/if}
     92        </div>
     93        {/if}
     94
    5495        <div class="randomButtons">
    55           {if isset($U_SLIDESHOW_START) }
    56             <a id="icon_start_slideshow" class="button" href="{$U_SLIDESHOW_START}" title="{'Play of slideshow'|@translate}" rel="nofollow"></a>
    57           {/if}
    58           {if isset($U_SLIDESHOW_STOP) }
    59             <a id="icon_stop_slideshow" class="button" href="{$U_SLIDESHOW_STOP}" title="{'Pause of slideshow'|@translate}" rel="nofollow"></a>
    60           {/if}
     96
     97          {if count($current.unique_derivatives)>1}
     98            <a id="icon_derivatives" title="{'Photo sizes'|@translate}" rel="nofollow" class="button" ></a>
     99          {/if}
     100
     101          {if isset($U_SLIDESHOW_START)}
     102            <a href="{$U_SLIDESHOW_START}" title="{'slideshow'|@translate}" rel="nofollow" id="icon_start_slideshow" class="button" ></a>
     103          {/if}
     104
    61105          {if isset($U_METADATA)}
    62             <a id="icon_metadata" class="button" href="{$U_METADATA}" title="{'Show file metadata'|@translate}" rel="nofollow"></a>
    63           {/if}
    64 
    65           {if #displayHighResIcon#=="yes" and isset($high) }
    66             <a id="icon_high_res" class="button pointer" onclick="gallyPP.openDisplayHigh('{$high.U_HIGH}');" title="" rel="nofollow" ></a>
    67           {/if}
    68 
    69           {if isset($current.U_DOWNLOAD) }
    70             <a id="icon_save" class="button" href="{$current.U_DOWNLOAD}" title="{'download this file'|@translate}"></a>
     106            <a href="{$U_METADATA}" title="{'Show file metadata'|@translate}" rel="nofollow" id="icon_metadata" class="button" ></a>
     107          {/if}
     108
     109          {if isset($current.U_DOWNLOAD)}
     110            <a href="{$current.U_DOWNLOAD}" title="{'Download this file'|@translate}" id="icon_save" class="button" ></a>
    71111          {/if}
    72112
    73113          {if isset($PLUGIN_PICTURE_ACTIONS)}{$PLUGIN_PICTURE_ACTIONS}{/if}
    74114
    75 
    76           {if isset($favorite) }
    77             <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>
    78           {/if}
    79           {if !empty($U_SET_AS_REPRESENTATIVE) }
    80             <a id="icon_representative" class="button" href="{$U_SET_AS_REPRESENTATIVE}" title="{'set as album representative'|@translate}"></a>
    81           {/if}
    82           {if isset($U_ADMIN) }
    83             <a id="icon_preferences" class="button" href="{$U_ADMIN}" title="{'Modify information'|@translate}"></a>
     115          {if isset($favorite)}
     116            <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>
     117          {/if}
     118          {if isset($U_SET_AS_REPRESENTATIVE)}
     119            <a href="{$U_SET_AS_REPRESENTATIVE}" title="{'set as album representative'|@translate}" id="icon_representative" class="button" ></a>
     120          {/if}
     121          {if isset($U_ADMIN)}
     122            <a href="{$U_ADMIN}" title="{'Modify information'|@translate}" id="icon_preferences" class="button"></a>
    84123          {/if}
    85124          {if isset($U_CADDIE) }{*caddie management BEGIN*}
    86           <script type="text/javascript">
    87           {literal}
    88           function addToCadie(aElement, rootUrl, id)
     125          {footer_script}
     126          {literal}function addToCadie(aElement, rootUrl, id)
    89127          {
    90128            if (aElement.disabled) return;
    91129            aElement.disabled=true;
    92130            var y = new PwgWS(rootUrl);
    93 
    94131            y.callService(
    95132              "pwg.caddie.add", {image_id: id} ,
     
    100137            );
    101138          }{/literal}
    102           </script>
    103           <a id="icon_caddie" class="button" onclick="addToCadie(this, '{$ROOT_URL|@escape:'javascript'}', {$current.id}); return false;" title="{'add to caddie'|@translate}"></a>
    104           {/if}
    105           <script type="text/javascript">
    106             $('div.randomButtons a.button').addClass('sTipOnRight');
    107           </script>
     139          {/footer_script}
     140          <a onclick="addToCadie(this, '{$ROOT_URL|@escape:'javascript'}', {$current.id}); return false;" title="{'Add to caddie'|@translate}" id="icon_caddie" class="button"></a>
     141          {/if}{*caddie management END*}
     142          {footer_script}
     143            $('div.randomButtons a.button').addClass('sTipOnTop');
     144          {/footer_script}
    108145        </div>
    109146
    110147        {include file='picture_nav_buttons.tpl'|@get_extent:'picture_nav_buttons'}
    111148
    112         {if $SHOW_PICTURE_NAME_ON_TITLE }
    113         <div><h2>{$current.TITLE}</h2></div>
    114         {/if}
    115 
    116149    </div>
    117   </div> <!-- imageToolBar -->
    118 
    119   {if $DISPLAY_NAV_THUMB}
    120     {if isset($previous) }
    121     <div id="navThumbPrev">
    122       <table id="navThumbPrevContainer" class="uiImg"><tr><td>
    123         <div class="navThumbPrevBg">&nbsp;</div>
    124         <div class="navThumbPrevContent">
    125           <a class="navThumb" id="thumbPrev" href="{$previous.U_IMG}" title="{'Previous'|@translate} : {$previous.TITLE}" rel="prev">
    126             <img src="{$previous.THUMB_SRC}" class="thumbLink" id="linkPrev" alt="{$previous.TITLE}">
    127           </a>
    128         </div>
    129       </td></tr></table>
    130     </div> <!-- navThumbPrev -->
    131     {/if}
    132 
    133     {if isset($next) }
    134     <div id="navThumbNext">
    135       <table id="navThumbNextContainer" class="uiImg"><tr><td>
    136         <div class="navThumbNextBg">&nbsp;</div>
    137         <div class="navThumbNextContent">
    138           <a class="navThumb" id="thumbNext" href="{$next.U_IMG}" title="{'Next'|@translate} : {$next.TITLE}" rel="next">
    139             <img src="{$next.THUMB_SRC}" class="thumbLink" id="linkNext" alt="{$next.TITLE}">
    140           </a>
    141         </div>
    142       </td></tr></table>
    143     </div> <!-- navThumbNext -->
    144     {/if}
    145   {/if}
     150  </div>{*<!-- imageToolBar -->*}
    146151
    147152  <div id="theImage">
     
    153158    <p>&nbsp;</p>
    154159    {/if}
    155 
    156     {if isset($U_SLIDESHOW_STOP) }
     160    {if isset($U_SLIDESHOW_STOP)}
    157161    <p>
    158162      [ <a href="{$U_SLIDESHOW_STOP}">{'stop the slideshow'|@translate}</a> ]
     
    201205            <tr  class="emptyrow" style="line-height:0px;">
    202206              <td colspan="2">&nbsp;</td>
    203               <td width="10px">&nbsp;</td>
    204               <td width="12%">&nbsp;</td>
    205               <td width="18%">&nbsp;</td>
    206               <td width="10px">&nbsp;</td>
    207               <td width="12%">&nbsp;</td>
    208               <td width="18%">&nbsp;</td>
     207              <td class='cTitle'>&nbsp;</td>
     208              <td class='cNfo' >&nbsp;</td>
     209              <td class='cTitle'>&nbsp;</td>
     210              <td class='cNfo' >&nbsp;</td>
    209211            </tr>
    210212
    211213            {if $display_info.author or $display_info.created_on or $display_info.posted_on}
    212214            <tr>
    213               {assign var='colspan' value=8}
     215              {assign var='colspan' value=6}
    214216              {if $display_info.author}
    215                 {assign var='colspan' value=`$colspan-3`}
     217                {assign var='colspan' value=`$colspan-2`}
    216218                <td class="label">{'Author'|@translate}</td>
    217219                <td class="value" style="min-width:214px;">{if isset($INFO_AUTHOR)}{$INFO_AUTHOR}{else}{'N/A'|@translate}{/if}</td>
    218                 <td>&nbsp;</td>
    219220              {/if}
    220221
    221222              {if $display_info.created_on}
    222                 {assign var='colspan' value=`$colspan-3`}
     223                {assign var='colspan' value=`$colspan-2`}
    223224                <td class="label">{'Created on'|@translate}</td>
    224225                <td class="value">{if isset($INFO_CREATION_DATE)}{$INFO_CREATION_DATE}{else}{'N/A'|@translate}{/if}</td>
    225                 <td>&nbsp;</td>
    226226              {/if}
    227227
     
    241241            {if $display_info.dimensions or $display_info.file or $display_info.filesize}
    242242            <tr>
    243               {assign var='colspan' value=8}
     243              {assign var='colspan' value=6}
    244244
    245245              {if $display_info.dimensions}
    246                 {assign var='colspan' value=`$colspan-3`}
     246                {assign var='colspan' value=`$colspan-2`}
    247247                <td class="label">{'Dimensions'|@translate}</td>
    248248                <td class="value">{if isset($INFO_DIMENSIONS)}{$INFO_DIMENSIONS|@replace:"*":"x"}{else}{'N/A'|@translate}{/if}</td>
    249                 <td>&nbsp;</td>
    250249              {/if}
    251250
    252251              {if $display_info.file}
    253                 {assign var='colspan' value=`$colspan-3`}
     252                {assign var='colspan' value=`$colspan-2`}
    254253                <td class="label">{'File'|@translate}</td>
    255254                <td class="value">{$INFO_FILE}</td>
    256                 <td>&nbsp;</td>
    257255              {/if}
    258256
     
    270268
    271269            {if isset($related_tags) and $display_info.tags}
    272               <tr class="emptyrow"><td colspan="8">&nbsp;</td></tr>
     270              <tr class="emptyrow"><td colspan="6">&nbsp;</td></tr>
    273271              <tr id="infoTags">
    274272                <td class="label">{'Tags'|@translate}</td>
    275                 <td colspan="7" class="value">
     273                <td colspan="5" class="value">
    276274                    {foreach from=$related_tags item=tag name=tag_loop}{if !$smarty.foreach.tag_loop.first}, {/if}
    277275                    <a href="{$tag.URL}">{$tag.name}</a>{/foreach}
     
    281279
    282280            {if isset($related_categories) and $display_info.categories}
    283               <tr class="emptyrow"><td colspan="8">&nbsp;</td></tr>
     281              <tr class="emptyrow"><td colspan="6">&nbsp;</td></tr>
    284282              <tr id="infoCats">
    285283                <td class="label">{'Albums'|@translate}</td>
    286                 <td colspan="7" class="value">
     284                <td colspan="5" class="value">
    287285                  {foreach from=$related_categories item=cat name=tag_loop}{if !$smarty.foreach.tag_loop.first},&nbsp;{/if}
    288286                  {$cat}
     
    291289              </tr>
    292290            {/if}
    293 
    294291            {if $display_info.visits}
    295               <tr class="emptyrow"><td colspan="8">&nbsp;</td><tr>
     292              <tr class="emptyrow"><td colspan="6">&nbsp;</td><tr>
    296293              <tr>
    297294                <td class="label">{'Visits'|@translate}</td>
    298                 <td colspan="7" class="value">{$INFO_VISITS}</td>
     295                <td {if !($display_info.privacy_level and isset($available_permission_levels))}colspan="5"{/if} class="value">{$INFO_VISITS}</td>
     296
     297                  {if $display_info.privacy_level and isset($available_permission_levels)}
     298                      <td colspan="4" class="label"><a id="iPrivacyLevelLink">{'Who can see this photo?'|@translate}</a>
     299
     300                        <div id="privacyLevelBox" class="switchBox">
     301                          {foreach from=$available_permission_levels item=label key=level}
     302                          <span id="levelCheck{$level}" class="switchCheck" {if $level != $current.level} style="visibility:hidden"{/if}>&#x2714; </span>
     303                          <a id="switchLevel{$level}" onclick="gallyPP.setPrivacyLevel('{$ROOT_URL}', {$current.id}, {$level})">{$label}</a><br>
     304                          {/foreach}
     305                        </div>
     306                     </td>
     307                  {/if}
     308
    299309              </tr>
    300310            {/if}
     
    315325                  <td colspan="2">&nbsp;</td>
    316326                {/if}
    317                 <td>&nbsp;</td>
    318327
    319328                {if isset($rating)}
    320                   <td class="label" colspan="5">
     329                  <td class="label" colspan="4">
    321330                    <span id="updateRate">{if isset($rating.USER_RATE)}{'Update your rating'|@translate}{else}{'Rate this photo'|@translate}{/if}</span>
    322331
     
    355364                  </td>
    356365                {else}
    357                   <td colspan="5">&nbsp;</td>
     366                  <td colspan="4">&nbsp;</td>
    358367                {/if}
    359               </tr>
    360             {/if}
    361 
    362           {if isset($available_permission_levels) and $display_info.privacy_level}
    363             <tr>
    364               <td class="label">{'Who can see this photo?'|@translate}:</td>
    365               <td colspan="4" class="value">
    366                 <script type="text/javascript">
    367                 {literal}function setPrivacyLevel(selectElement, rootUrl, id, level)
    368                 {
    369                 selectElement.disabled = true;
    370                 var y = new PwgWS(rootUrl);
    371                 y.callService(
    372                   "pwg.images.setPrivacyLevel", {image_id: id, level:level} ,
    373                   {
    374                     method: "POST",
    375                     onFailure: function(num, text) { selectElement.disabled = false; alert(num + " " + text); },
    376                     onSuccess: function(result) { selectElement.disabled = false; }
    377                   }
    378                   );
    379                 }{/literal}
    380                 </script>
    381                 <select onchange="setPrivacyLevel(this, '{$ROOT_URL|@escape:'javascript'}', {$current.id}, this.options[selectedIndex].value)">
    382                   {foreach from=$available_permission_levels item=label key=level}
    383                   <option label="{$label}" value="{$level}"{if $level == $current.level} selected="selected"{/if}>{$label}</option>
    384                   {/foreach}
    385                 </select>
    386               </td>
    387368            </tr>
    388369          {/if}
     
    437418          {/if}
    438419            <h4>{'Add a comment'|@translate}</h4>
    439             <form  method="post" action="{$comment_add.F_ACTION}" class="filter" id="addComment">
     420            <form method="post" action="{$comment_add.F_ACTION}" class="filter" id="addComment">
    440421              <table>
    441422                {if $comment_add.SHOW_AUTHOR}
     
    450431                <tr>
    451432                  <td {if $comment_add.SHOW_AUTHOR}colspan="2"{/if}>
    452                     <input type="hidden" name="key" value="{$comment_add.KEY}" />
    453                     <input class="submit" type="submit" value="{'Submit'|@translate}"/>
     433                    <input type="hidden" name="key" value="{$comment_add.KEY}">
     434                    <input class="submit" type="submit" value="{'Submit'|@translate}">
    454435                  </td>
    455436                </tr>
Note: See TracChangeset for help on using the changeset viewer.