Changeset 30311

Show
Ignore:
Timestamp:
04.11.2015 14:12:14 (4 years ago)
Author:
kjdon
Message:

added a variable and a couple of templates to make this more easily customizable without having to copy great wads of xslt. Done for the twso collection

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • main/trunk/greenstone3/web/interfaces/default/transform/pages/query.xsl

    r30156 r30311  
    2929    </xsl:template> 
    3030 
     31    <!-- do we display the line 'displaying 0 to 20 of 40 documents'--> 
     32    <!-- on by default. To turn off, add the following in <search> element in collectionConfig.xml: 
     33         <gsf:option name="hideStatus" value="true"/> --> 
     34    <xsl:variable name="display_status_bar"> 
     35      <xsl:if test="/page/pageResponse/format[@type='search']/gsf:option[@name='hideStatus']/@value='true'">false</xsl:if></xsl:variable> 
    3136    <!-- the page content --> 
    3237    <xsl:template match="/page"> 
     
    410415                    <xsl:if test="$currentPage != 1"> 
    411416                        <a href="{$library_name}?a=q&amp;sa={/page/pageRequest/@subaction}&amp;c={$collName}&amp;s={/page/pageResponse/service/@name}&amp;rt=rd&amp;{$startPageName}={$currentPage - 1}&amp;qs={/page/pageRequest/paramList/param[@name='qs']/@value}"> 
    412                             <img src="interfaces/default/images/previous.png"/> 
     417                          <xsl:call-template name="previousArrowImage"/> 
    413418                        </a> 
    414419                    </xsl:if> 
     
    420425                </td> 
    421426 
     427                <xsl:if test="$display_status_bar != 'false'"> 
    422428                <!-- Search result status bar (in english it reads "Displaying X to Y of Z documents") --> 
    423429                <xsl:if test="$docsPerPage &gt; 0"> 
     
    463469                    </td> 
    464470                </xsl:if> 
    465  
     471                </xsl:if> 
    466472                <!-- Next button --> 
    467473                <td id="nextTD"> 
     
    473479                    <xsl:if test="$docsPerPage &gt; 0 and ($currentPage * $docsPerPage + 1) &lt; $docMax"> 
    474480                        <a href="{$library_name}?a=q&amp;sa={/page/pageRequest/paramList/param[@name = 'sa']/@value}&amp;c={$collName}&amp;s={/page/pageResponse/service/@name}&amp;rt=rd&amp;{$startPageName}={$currentPage + 1}&amp;qs={/page/pageRequest/paramList/param[@name='qs']/@value}"> 
    475                             <img src="interfaces/default/images/next.png"/> 
     481                            <xsl:call-template name="nextArrowImage"/> 
    476482                        </a> 
    477483                    </xsl:if> 
     
    481487    </xsl:template> 
    482488 
     489    <xsl:template name="previousArrowImage"> 
     490      <img src="interfaces/default/images/previous.png"/> 
     491    </xsl:template> 
     492    <xsl:template name="nextArrowImage"> 
     493      <img src="interfaces/default/images/next.png"/> 
     494    </xsl:template> 
    483495    <!-- puts all the params into a=p&p=h type form - need to change this if use  
    484496    multi params  -->