Last change
on this file since 4255 was 4255, checked in by kjdon, 21 years ago |
auxiliary tempaltes can go in here - is it useful to have this??
|
-
Property svn:keywords
set to
Author Date Id Revision
|
File size:
1.9 KB
|
Line | |
---|
1 | <?xml version="1.0" encoding="ISO-8859-1"?>
|
---|
2 | <xsl:stylesheet version="1.0"
|
---|
3 | xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
|
---|
4 |
|
---|
5 | <xsl:template name="result-navigation">
|
---|
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>
|
---|
27 | </xsl:template>
|
---|
28 |
|
---|
29 | </xsl:stylesheet> |
---|
Note:
See
TracBrowser
for help on using the repository browser.