Ignore:
Timestamp:
2007-09-05T16:28:14+12:00 (17 years ago)
Author:
anna
Message:

Added the right-to-left direction display for Arabic etc. language.

File:
1 edited

Legend:

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

    r14391 r14419  
    1818      <xsl:call-template name="pageHead"/>
    1919      <body>
     20        <xsl:attribute name="dir"><xsl:call-template name="direction"/></xsl:attribute>
    2021        <div id="page">
    2122           <xsl:apply-templates select="pageResponse"/>
     
    8182  <xsl:template name="documentArrows">
    8283    <xsl:param name="collName"/>
     84    <xsl:variable name="dir"><xsl:call-template name="direction"/></xsl:variable>   
     85    <xsl:variable name="firstDir"><xsl:choose><xsl:when test="$dir='rtl'">forward</xsl:when><xsl:otherwise>back</xsl:otherwise></xsl:choose></xsl:variable>
     86    <xsl:variable name="secondDir"><xsl:choose><xsl:when test="$dir='rtl'">back</xsl:when><xsl:otherwise>forward</xsl:otherwise></xsl:choose></xsl:variable>
     87   
    8388    <div class="documentarrows">
    8489       <xsl:call-template name="documentArrow">
    8590        <xsl:with-param name="collName" select="$collName"/>
    86        <xsl:with-param name="direction">back</xsl:with-param>
     91        <xsl:with-param name="direction" select="$firstDir"/>
     92        <xsl:with-param name="pageDir" select="$dir"/>
    8793     </xsl:call-template>
    8894    <xsl:call-template name="documentArrow">
    8995      <xsl:with-param name="collName" select="$collName"/>
    90       <xsl:with-param name="direction">forward</xsl:with-param>
     96      <xsl:with-param name="direction" select="$secondDir"/>
     97      <xsl:with-param name="pageDir" select="$dir"/>
    9198    </xsl:call-template>
    9299    </div>   
     
    96103    <xsl:param name="collName"/>
    97104    <xsl:param name="direction"/>
     105    <xsl:param name="pageDir"/>
     106           
    98107    <xsl:variable name="request-params" select="/page/pageRequest/paramList"/>
    99108    <xsl:if test='$request-params/param[@name="dt"]/@value != "simple"'> 
    100     <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="@selectedNode"/><xsl:choose><xsl:when test="$direction='back'">.pp</xsl:when><xsl:otherwise>.np</xsl:otherwise></xsl:choose>&amp;sib=1&amp;p.s=<xsl:value-of select='$request-params/param[@name="p.s"]/@value'/>&amp;p.sa=<xsl:value-of select='$request-params/param[@name="p.sa"]/@value'/>&amp;p.a=<xsl:value-of select='$request-params/param[@name="p.a"]/@value'/></xsl:attribute><xsl:choose><xsl:when test="$direction='back'"><img class="lessarrow" src="interfaces/default/images/less.gif" /></xsl:when><xsl:otherwise><img class="morearrow" src="interfaces/default/images/more.gif"  /></xsl:otherwise></xsl:choose></a>
    101     </xsl:if>
     109    <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="@selectedNode"/><xsl:choose><xsl:when test="$direction='back'">.pp</xsl:when><xsl:otherwise>.np</xsl:otherwise></xsl:choose>&amp;sib=1&amp;p.s=<xsl:value-of select='$request-params/param[@name="p.s"]/@value'/>&amp;p.sa=<xsl:value-of select='$request-params/param[@name="p.sa"]/@value'/>&amp;p.a=<xsl:value-of select='$request-params/param[@name="p.a"]/@value'/></xsl:attribute><xsl:choose>
     110    <xsl:when test="$direction='back'"><img class="lessarrow{$pageDir}" src="interfaces/default/images/less.gif" /></xsl:when><xsl:otherwise><img class="morearrow{$pageDir}" src="interfaces/default/images/more.gif"  /></xsl:otherwise></xsl:choose></a>
     111    </xsl:if>
    102112  </xsl:template>
    103113         
Note: See TracChangeset for help on using the changeset viewer.