source: trunk/gsdl3/web/interfaces/nzdl/transform/pref.xsl@ 4274

Last change on this file since 4274 was 4274, checked in by kjdon, 21 years ago

lots of pref stuff added

  • Property svn:keywords set to Author Date Id Revision
File size: 6.2 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:include href="style.xsl"/>
6 <!--<xsl:include href="pref_text.xsl"/>-->
7 <xsl:include href="page_common.xsl"/>
8
9 <xsl:output method="html"/>
10
11 <xsl:template name="pageHead">
12 <head>
13 <title>Preferences</title>
14 </head>
15 <xsl:call-template name="headScript"/>
16 </xsl:template>
17
18 <xsl:template match="pageResponse">
19 <xsl:variable name='library' select='ancestor::page/pageExtra/config/library_name'/>
20 <xsl:variable name="collName" select="ancestor::page/pageRequest/paramList/param[@name='c']/@value"/>
21 <center>
22 <xsl:call-template name="collectionPageBanner">
23 <xsl:with-param name="collName" select="$collName"/>
24 <xsl:with-param name="pageType">pref</xsl:with-param>
25 </xsl:call-template>
26
27 <form name="PrefForm" method="get" action="/gsdl3/{$library}">
28 <input type='hidden' name='a' value='p'/>
29 <input type='hidden' name='sa' value='pref'/>
30 <table>
31 <tr><td><h3>Presentation preferences</h3></td></tr>
32 <tr><td><xsl:call-template name="pres-prefs"/></td></tr>
33 <tr><td><xsl:call-template name="greenBar"/></td></tr>
34 <tr><td><h3>Search Preferences</h3></td></tr>
35 <tr><td><xsl:call-template name="search-prefs"/></td></tr>
36 <tr><td><xsl:call-template name="greenBar"/></td></tr>
37 </table>
38 </form>
39 </center>
40 </xsl:template>
41
42
43 <xsl:template name="pres-prefs">
44 <table>
45 <tr><td>Interface language:</td><td align='left'>x</td></tr>
46 <tr><td>Encoding:</td><td align='left'>x</td></tr>
47 <tr><td>Interface format:</td><td align='left'>x</td></tr>
48 </table>
49 </xsl:template>
50
51 <xsl:template name="search-prefs">
52 <table>
53 <tr><td></td><td align='right'><input type='submit' value='set prefs'/></td></tr>
54 <!-- query box size -->
55 <xsl:variable name="boxsize"><xsl:choose><xsl:when test="ancestor::page/pageRequest/paramList/param[@name='qb']"><xsl:value-of select="ancestor::page/pageRequest/paramList/param[@name='qb']/@value"/></xsl:when><xsl:otherwise>0</xsl:otherwise></xsl:choose></xsl:variable>
56 <tr><td valign='baseline'>Query box size:</td><td><input type='radio' name='qb' value='0'><xsl:if test="$boxsize=0"><xsl:attribute name="checked"></xsl:attribute></xsl:if></input> regular query box<br />
57 <input type='radio' name='qb' value='1'><xsl:if test="$boxsize=1"><xsl:attribute name="checked"></xsl:attribute></xsl:if></input> large query box</td></tr>
58 <!-- case folding -->
59 <xsl:variable name="case"><xsl:choose><xsl:when test="ancestor::page/pageRequest/paramList/param[@name='case']"><xsl:value-of select="ancestor::page/pageRequest/paramList/param[@name='case']/@value"/></xsl:when><xsl:otherwise>1</xsl:otherwise></xsl:choose></xsl:variable>
60 <tr><td valign='baseline'>Case differences:</td><td><input type='radio' name='ca' value='1'><xsl:if test="$case=1"><xsl:attribute name="checked"></xsl:attribute></xsl:if></input> ignore case differences<br />
61 <input type='radio' name='ca' value='0'><xsl:if test="$case=0"><xsl:attribute name="checked"></xsl:attribute></xsl:if></input> upper/lower case must match</td></tr>
62 <!-- stemming -->
63 <xsl:variable name="stem"><xsl:choose><xsl:when test="ancestor::page/pageRequest/paramList/param[@name='stem']"><xsl:value-of select="ancestor::page/pageRequest/paramList/param[@name='stem']/@value"/></xsl:when><xsl:otherwise>0</xsl:otherwise></xsl:choose></xsl:variable>
64 <tr><td valign='baseline'>Word endings:</td><td><input type='radio' name='st' value='1'><xsl:if test="$stem=1"><xsl:attribute name="checked"></xsl:attribute></xsl:if></input> ignore word endings<br />
65 <input type='radio' name='st' value='0'><xsl:if test="$stem=0"><xsl:attribute name="checked"></xsl:attribute></xsl:if></input> whole word must match</td></tr>
66 <!-- query mode -->
67 <xsl:variable name="querymode"><xsl:choose><xsl:when test="ancestor::page/pageRequest/paramList/param[@name='qm']"><xsl:value-of select="ancestor::page/pageRequest/paramList/param[@name='qm']/@value"/></xsl:when><xsl:otherwise>0</xsl:otherwise></xsl:choose></xsl:variable>
68 <tr><td valign='baseline'>Query mode:</td><td><input type='radio' name='qm' value='0'><xsl:if test="$querymode=0"><xsl:attribute name="checked"></xsl:attribute></xsl:if></input> simple query mode<br />
69 <input type='radio' name='qm' value='1'><xsl:if test="$querymode=1"><xsl:attribute name="checked"></xsl:attribute></xsl:if></input> advanced query mode (allows boolean searching using !, &amp;, |, and parentheses)</td></tr>
70 <!-- hit display -->
71 <xsl:variable name="maxdocs"><xsl:choose><xsl:when test="ancestor::page/pageRequest/paramList/param[@name='maxDocs']"><xsl:value-of select="ancestor::page/pageRequest/paramList/param[@name='maxDocs']/@value"/></xsl:when><xsl:otherwise>50</xsl:otherwise></xsl:choose></xsl:variable>
72 <xsl:variable name="hits"><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>
73 <tr><td colspan='2'>Return up to
74 <select name="md">
75 <option value="50"><xsl:if test="$maxdocs=50"><xsl:attribute name="selected"></xsl:attribute></xsl:if>50</option>
76 <option value="100"><xsl:if test="$maxdocs=100"><xsl:attribute name="selected"></xsl:attribute></xsl:if>100</option>
77 <option value="200"><xsl:if test="$maxdocs=200"><xsl:attribute name="selected"></xsl:attribute></xsl:if>200</option>
78 <option value="-1"><xsl:if test="$maxdocs=-1"><xsl:attribute name="selected"></xsl:attribute></xsl:if>all</option>
79 </select>
80 hits with
81 <select name="hp">
82 <option value="10"><xsl:if test="$hits=10"><xsl:attribute name="selected"></xsl:attribute></xsl:if>10 </option>
83 <option value="20"><xsl:if test="$hits=20"><xsl:attribute name="selected"></xsl:attribute></xsl:if>20</option>
84 <option value="50"><xsl:if test="$hits=50"><xsl:attribute name="selected"></xsl:attribute></xsl:if>50</option>
85 <option value="-1"><xsl:if test="$hits=-1"><xsl:attribute name="selected"></xsl:attribute></xsl:if>all</option>
86 </select>
87 hits per page.
88 </td></tr>
89 </table>
90 </xsl:template>
91
92</xsl:stylesheet>
Note: See TracBrowser for help on using the repository browser.