Changeset 4270
- Timestamp:
- 2003-05-12T16:31:41+12:00 (21 years ago)
- Location:
- trunk/gsdl3/web/interfaces/default/transform
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gsdl3/web/interfaces/default/transform/basicquery.xsl
r4253 r4270 78 78 <tr valign="top"> 79 79 <xsl:for-each select="documentNodeList/documentNode"> 80 <xsl:if test=" position()> (($hn - 1)*$hp) and position() <= ($hn * $hp)">80 <xsl:if test="$hp=-1 or (position()> (($hn - 1)*$hp) and position() <= ($hn * $hp))"> 81 81 <tr> 82 82 <xsl:apply-templates select="."> -
trunk/gsdl3/web/interfaces/default/transform/querytools.xsl
r4255 r4270 5 5 <xsl:template name="result-navigation"> 6 6 <xsl:param name="library"/> 7 <xsl:variable name="hp">20</xsl:variable> 8 <xsl:variable name="hn" select="ancestor::page/pageRequest/paramList/param[@name='hn']/@value"/> 9 <xsl:variable name="sa" select="ancestor::page/pageRequest/@subaction"/> 10 <xsl:variable name="prev" select="$hn - 1"/> 11 <xsl:variable name="next" select="$hn + 1"/> 12 <xsl:variable name="count" select="count(documentNodeList/documentNode)"/> 13 <p /> 14 <center> 15 <table cellspacing='0' cellpadding='0' width='100%'> 16 <tr> 17 <td align='left'> 18 <xsl:if test="$hn > 1"><a href="{$library}?a=q&rt=r&hn={$prev}"><img src="interfaces/default/images/less.gif" width='30' height='16' border='0' align='top'/><xsl:call-template name="text"><xsl:with-param name="key">query.matches</xsl:with-param></xsl:call-template><xsl:text> </xsl:text><xsl:value-of select="number(($prev - 1)*$hp + 1)"/> - <xsl:value-of select="number(($prev * $hp))"/></a></xsl:if> 19 </td> 20 <td align='right'> 21 <xsl:if test="(($hn * $hp) + 1) < $count"> 22 <xsl:variable name='m' select="number($next * $hp)"/> 23 <xsl:variable name='mm'><xsl:choose><xsl:when test="$m < $count"><xsl:value-of select='$m'/></xsl:when><xsl:otherwise><xsl:value-of select='$count'/></xsl:otherwise></xsl:choose></xsl:variable> 24 <a href="{$library}?a=q&sa={$sa}&rt=r&hn={$next}"><xsl:call-template name="text"><xsl:with-param name="key">query.matches</xsl:with-param></xsl:call-template><xsl:text> </xsl:text><xsl:value-of select="number(($next - 1)*$hp + 1)"/> - <xsl:value-of select="$mm"/><img src="interfaces/default/images/more.gif" width='30' height='16' border='0' align='top'/></a></xsl:if></td> </tr> 25 </table> 26 </center> 7 <xsl:variable name="hp"><xsl:choose><xsl:when test="ancestor::page/pageRequest/paramList/param[@name='hp']"><xsl:value-of select="ancestor::page/pageRequest/paramList/param[@name='hp']/@value"/></xsl:when><xsl:otherwise>20</xsl:otherwise></xsl:choose></xsl:variable> 8 <xsl:if test="not($hp=-1)"> 9 <xsl:variable name="hn"><xsl:choose><xsl:when test="ancestor::page/pageRequest/paramList/param[@name='hn']"><xsl:value-of select="ancestor::page/pageRequest/paramList/param[@name='hn']/@value"/></xsl:when><xsl:otherwise>1</xsl:otherwise></xsl:choose></xsl:variable> 10 <xsl:variable name="sa" select="ancestor::page/pageRequest/@subaction"/> 11 <xsl:variable name="prev" select="$hn - 1"/> 12 <xsl:variable name="next" select="$hn + 1"/> 13 <xsl:variable name="count" select="count(documentNodeList/documentNode)"/> 14 <p /> 15 <center> 16 <table cellspacing='0' cellpadding='0' width='537'> 17 <tr> 18 <td align='left'> 19 <xsl:if test="$hn > 1"><a href="{$library}?a=q&rt=r&hn={$prev}"><img src="interfaces/default/images/less.gif" width='30' height='16' border='0' align='top'/><xsl:call-template name="text"><xsl:with-param name="key">query.matches</xsl:with-param></xsl:call-template><xsl:text> </xsl:text><xsl:value-of select="number(($prev - 1)*$hp + 1)"/> - <xsl:value-of select="number(($prev * $hp))"/></a></xsl:if> 20 </td> 21 <td align='right'> 22 <xsl:if test="(($hn * $hp) + 1) < $count"> 23 <xsl:variable name='m' select="number($next * $hp)"/> 24 <xsl:variable name='mm'><xsl:choose><xsl:when test="$m < $count"><xsl:value-of select='$m'/></xsl:when><xsl:otherwise><xsl:value-of select='$count'/></xsl:otherwise></xsl:choose></xsl:variable> 25 <a href="{$library}?a=q&sa={$sa}&rt=r&hn={$next}"><xsl:call-template name="text"><xsl:with-param name="key">query.matches</xsl:with-param></xsl:call-template><xsl:text> </xsl:text><xsl:value-of select="number(($next - 1)*$hp + 1)"/> - <xsl:value-of select="$mm"/><img src="interfaces/default/images/more.gif" width='30' height='16' border='0' align='top'/></a></xsl:if></td> </tr> 26 </table> 27 </center> 28 </xsl:if> 27 29 </xsl:template> 28 30 29 31 </xsl:stylesheet> 32 33
Note:
See TracChangeset
for help on using the changeset viewer.