Ignore:
Timestamp:
Mar 4, 2012, 5:28:42 PM (12 years ago)
Author:
Zaphod
Message:

feature 2588: template modification for v2.4
-> #content on picture & slideshow page
-> class 'browsePathSeparator' on LEVEL_SEPARATOR on browsePath
-> derivativeSwitchLink replaced by pwg-size icon (with associated css modification on themes)
-> new id #theImageAndInfos that contains #theImage and #imageInfos

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/themes/default/template/picture.tpl

    r13224 r13474  
    22{include file='include/autosize.inc.tpl'}
    33*}
    4 {if isset($MENUBAR)}
    5 {$MENUBAR}
    6 <div id="content" class="contentWithMenu">
    7 {/if}
     4{if isset($MENUBAR)}{$MENUBAR}{/if}
     5<div id="content" {if isset($MENUBAR)}class="contentWithMenu"{/if}>
    86{if isset($errors) or not empty($infos)}
    97{include file='infos_errors.tpl'}
     
    1311<div id="imageHeaderBar">
    1412        <div class="browsePath">
    15                 {$SECTION_TITLE} {$LEVEL_SEPARATOR} <h2>{$current.TITLE}</h2>
     13                {$SECTION_TITLE}<span class="browsePathSeparator">{$LEVEL_SEPARATOR}</span><h2>{$current.TITLE}</h2>
    1614        </div>
    1715        <div class="imageNumber">{$PHOTO}</div>
     
    2018<div id="imageToolBar">
    2119<div class="actionButtons">
     20
     21{if count($current.unique_derivatives)>1}
     22{footer_script}{literal}
     23function changeImgSrc(url,typeSave,typeMap,typeDisplay)
     24{
     25        var theImg = document.getElementById("theMainImage");
     26        if (theImg)
     27        {
     28                theImg.removeAttribute("width");theImg.removeAttribute("height");
     29                theImg.src = url;
     30                var elt = document.getElementById("derivativeSwitchLink");
     31                if (elt) elt.innerHTML = typeDisplay;
     32                theImg.useMap = "#map"+typeMap;
     33        }
     34        document.cookie = 'picture_deriv='+typeSave+';path={/literal}{$COOKIE_PATH}{literal}';
     35}
     36
     37function toggleDerivativeSwitchBox()
     38{
     39        var elt = document.getElementById("derivativeSwitchBox"),
     40                ePos = document.getElementById("derivativeSwitchLink");
     41        if (elt.style.display==="none")
     42        {
     43                elt.style.position = "absolute";
     44                elt.style.left = (ePos.offsetLeft+10)+"px";
     45                elt.style.top = (ePos.offsetTop+ePos.offsetHeight)+"px";
     46                elt.style.display="";
     47        }
     48        else
     49                elt.style.display="none";
     50}
     51{/literal}{/footer_script}
     52{strip}<a id="derivativeSwitchLink" href="javascript:toggleDerivativeSwitchBox()" title="{'Photo sizes'|@translate}" class="pwg-state-default pwg-button" rel="nofollow">
     53<span class="pwg-icon pwg-icon-sizes">&nbsp;</span><span class="pwg-button-text">{'Photo sizes'|@translate}</span></a>
     54<div id="derivativeSwitchBox" onclick="toggleDerivativeSwitchBox()" style="display:none">
     55{foreach from=$current.unique_derivatives item=derivative key=derivative_type}
     56<a href="javascript:changeImgSrc('{$derivative->get_url()|@escape:javascript}','{$derivative_type}','{$derivative->get_type()}','{$derivative->get_type()|@translate|@escape:javascript}')">{$derivative->get_type()|@translate} ({$derivative->get_size_hr()})</a><br>
     57{/foreach}
     58{if isset($U_ORIGINAL)}
     59<a href="javascript:phpWGOpenWindow('{$U_ORIGINAL}','xxx','scrollbars=yes,toolbar=no,status=no,resizable=yes')" rel="nofollow">{'Original'|@translate}</a>
     60{/if}
     61</div>
     62{/strip}{/if}
     63
     64
    2265{strip}{if isset($U_SLIDESHOW_START)}
    2366        <a href="{$U_SLIDESHOW_START}" title="{'slideshow'|@translate}" class="pwg-state-default pwg-button" rel="nofollow">
     
    76119</div>{*<!-- imageToolBar -->*}
    77120
     121<div id="theImageAndInfos">
    78122<div id="theImage">
    79123{$ELEMENT_CONTENT}
     
    269313{/if}
    270314</div>
     315</div>
    271316
    272317{if isset($COMMENT_COUNT)}
     
    274319        {if $COMMENT_COUNT > 0}
    275320                <h3>{$pwg->l10n_dec('%d comment', '%d comments',$COMMENT_COUNT)}</h3>
    276         {if $COMMENT_COUNT > 2}
    277                 <a href="{$COMMENTS_ORDER_URL}#comments" rel="nofollow">{$COMMENTS_ORDER_TITLE}</a>
    278         {/if}
     321                {if $COMMENT_COUNT > 2}
     322                        <a href="{$COMMENTS_ORDER_URL}#comments" rel="nofollow">{$COMMENTS_ORDER_TITLE}</a>
     323                {/if}
     324        {else}
     325                <h3 class="noCommentText">{$pwg->l10n_dec('%d comment', '%d comments',$COMMENT_COUNT)}</h3>
    279326        {/if}
    280327        {if !empty($navbar)}{include file='navigation_bar.tpl'|@get_extent:'navbar'}{/if}
Note: See TracChangeset for help on using the changeset viewer.