Ignore:
Timestamp:
Dec 13, 2009, 11:35:47 PM (14 years ago)
Author:
grum
Message:

[Template:Gally] feature 1096, feature 1097, feature 1098, feature 1099, feature 1313
And some other improvments...

File:
1 edited

Legend:

Unmodified
Added
Removed
  • extensions/gally/picture.tpl

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