Changeset 14379

Show
Ignore:
Timestamp:
21.08.2007 09:49:53 (12 years ago)
Author:
anna
Message:

Added parameters p.a, p.s, p.sa, p.c in documentNode and hierarchicalContents templates to make the openbook link work properly.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • greenstone3/trunk/web/interfaces/classic/transform/document.xsl

    r13984 r14379  
    7979    <xsl:variable name="p.sa" select="/page/pageRequest/paramList/param[@name='p.sa']/@value"/> 
    8080    <xsl:variable name="p.s" select="/page/pageRequest/paramList/param[@name='p.s']/@value"/> 
     81    <xsl:variable name="p.c"><xsl:choose><xsl:when test="/page/pageRequest/paramList/param[@name='p.c']"><xsl:value-of select="/page/pageRequest/paramList/param[@name='p.c']/@value"/></xsl:when><xsl:otherwise><xsl:value-of select="$collName"/></xsl:otherwise></xsl:choose></xsl:variable> 
     82     
     83     
    8184    <div class="heading_image"> 
    82        <xsl:if test="string($doCoverImage) != 'false' and (@docType='paged' or @docType='hierarchy')"> 
     85       <xsl:if test="string($doCoverImage) != 'false' and (@docType='paged' or @docType='hierarchy')">        
    8386    <xsl:call-template name="coverImage"/>  
    8487       </xsl:if> 
    8588    </div> 
     89     
    8690    <div class="buttons" id="toc_buttons"> 
    8791        <xsl:call-template name="documentButtons"> 
     
    195199    <xsl:variable name="sib" select="/page/pageRequest/paramList/param[@name='sib']/@value"/> 
    196200    <xsl:variable name="ec" select="/page/pageRequest/paramList/param[@name='ec']/@value"/> 
     201     
     202    <!-- added parameters --> 
     203    <xsl:variable name="p.s" select="/page/pageRequest/paramList/param[@name='p.s']/@value"/> 
     204    <xsl:variable name="p.sa" select="/page/pageRequest/paramList/param[@name='p.sa']/@value"/> 
     205    <xsl:variable name="p.a" select="/page/pageRequest/paramList/param[@name='p.a']/@value"/> 
     206    <xsl:variable name="p.c"><xsl:choose><xsl:when test="/page/pageRequest/paramList/param[@name='p.c']"><xsl:value-of select="/page/pageRequest/paramList/param[@name='p.c']/@value"/></xsl:when><xsl:otherwise><xsl:value-of select="$collName"/></xsl:otherwise></xsl:choose></xsl:variable> 
     207     
    197208    <xsl:if test="documentNode[@nodeID]"> 
    198209    <tr valign='top'><td> 
     
    206217          <table> 
    207218        <xsl:for-each select="documentNode/documentNode[@nodeID]"> 
    208           <xsl:apply-templates select='.'><xsl:with-param name="collName" select="$collName"/><xsl:with-param name="ec" select="$ec"/></xsl:apply-templates> 
     219          <xsl:apply-templates select='.'> 
     220          <xsl:with-param name="collName" select="$collName"/><xsl:with-param name="ec" select="$ec"/> 
     221           
     222          <!-- added parameters --> 
     223          <xsl:with-param name="p.a" select="$p.a"/> 
     224          <xsl:with-param name="p.s" select="$p.s"/> 
     225          <xsl:with-param name="p.sa" select="$p.sa"/> 
     226          <xsl:with-param name="p.c" select="$p.c"/> 
     227           
     228        </xsl:apply-templates> 
    209229        </xsl:for-each> 
    210230          </table> 
     
    218238    <xsl:param name="collName"/> 
    219239    <xsl:param name="ec"/> 
     240     
     241    <!-- added these parameters to be carried when changing in toc --> 
     242    <xsl:param name="p.a"/> 
     243    <xsl:param name="p.s"/> 
     244    <xsl:param name="p.sa"/> 
     245    <xsl:param name="p.c"/> 
    220246    <!-- Display the appropriate image, depending on the node type --> 
     247         
    221248    <tr><td valign="top"> 
     249    <!-- 
    222250    <a><xsl:attribute name="href"><xsl:value-of select='$library_name'/>?a=d&amp;c=<xsl:value-of select='$collName'/>&amp;d=<xsl:value-of select='@nodeID'/><xsl:if test="documentNode">.pr</xsl:if><xsl:if test="@nodeType='leaf'">&amp;sib=1</xsl:if><xsl:if test="string($ec) = '1'">&amp;ec=1</xsl:if></xsl:attribute> 
     251    -->  
     252     
     253    <a><xsl:attribute name="href"><xsl:value-of select='$library_name'/>?a=d&amp;c=<xsl:value-of select='$collName'/>&amp;d=<xsl:value-of select='@nodeID'/><xsl:if test="documentNode">.pr</xsl:if>&amp;sib=1<xsl:if test="string($ec) = '1'">&amp;ec=1</xsl:if>&amp;p.a=<xsl:value-of select="$p.a"/>&amp;p.sa=<xsl:value-of select="$p.sa"/>&amp;p.s=<xsl:value-of select="$p.s"/>&amp;p.c=<xsl:value-of select="$p.c"/></xsl:attribute> 
     254     
    223255      <xsl:apply-templates select="." mode="displayNodeIcon"/> 
    224256    </a> 
     
    243275          <xsl:with-param name="collName" select="$collName"/> 
    244276          <xsl:with-param name="ec" select="$ec"/> 
     277           
     278          <!-- added parameters --> 
     279          <xsl:with-param name="p.a" select="$p.a"/><xsl:with-param name="p.s" select="$p.s"/><xsl:with-param name="p.sa" select="$p.sa"/><xsl:with-param name="p.c" select="$p.c"/> 
    245280          <!--<xsl:with-param name="depth" select="$depth + 1"/>--> 
    246281        </xsl:apply-templates>