Changeset 18318 for greenstone3/trunk/web/interfaces/gs2/transform/pref.xsl
- Timestamp:
- 2009-01-06T14:52:16+13:00 (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
greenstone3/trunk/web/interfaces/gs2/transform/pref.xsl
r18315 r18318 11 11 <xsl:output method="html"/> 12 12 13 13 <!-- the main page layout template is here --> 14 14 <xsl:template match="page"> 15 15 <html> 16 <head>17 18 <!-- put a space in the title in case the actual value is missing - mozilla will not display a page with no title-->19 <xsl:call-template name="pageTitle"/><xsl:text> </xsl:text>20 21 22 23 </head>16 <head> 17 <title> 18 <!-- put a space in the title in case the actual value is missing - mozilla will not display a page with no title--> 19 <xsl:call-template name="pageTitle"/><xsl:text> </xsl:text> 20 </title> 21 <xsl:call-template name="globalStyle"/> 22 <xsl:call-template name="pageStyle"/> 23 </head> 24 24 <body class="bgimage"> 25 25 <xsl:attribute name="dir"><xsl:call-template name="direction"/></xsl:attribute> 26 26 <div id="page"> 27 28 27 <xsl:apply-templates select="pageResponse"/> 28 <xsl:call-template name="greenstoneFooter"/> 29 29 </div> 30 30 </body> … … 95 95 <xsl:param name="formstatus"/> 96 96 <xsl:param name="advancedstatus"/> 97 97 98 98 <!-- search type : 0(default, simple); 1(form) --> 99 99 <xsl:variable name="qt"><xsl:choose><xsl:when test="/page/pageRequest/paramList/param[@name='qt']"><xsl:value-of select="/page/pageRequest/paramList/param[@name='qt']/@value"/></xsl:when><xsl:otherwise>0</xsl:otherwise></xsl:choose></xsl:variable> … … 102 102 <!-- search mode: text, form, advanced --> 103 103 <xsl:variable name="mode"><xsl:choose><xsl:when test="$qt=0">text</xsl:when><xsl:when test="$queryfmode=0">form</xsl:when><xsl:when test="$queryfmode=1">advanced</xsl:when><xsl:otherwise>text</xsl:otherwise></xsl:choose></xsl:variable> 104 104 105 105 <table> 106 106 <tr><td> </td><td> </td><td align='right'><input type='submit' name="submit"><xsl:attribute name="value"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'pref.set_prefs')"/></xsl:attribute></input></td></tr> … … 110 110 111 111 <tr><td valign='baseline' class='col1'><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'pref.search_type')"/></td><td class='col2'><input type='radio' name='qfm' value='2' onclick="javascript:changePref(2)"><xsl:if test="$qt=0 or $queryfmode=2"><xsl:attribute name="checked"/></xsl:if></input></td><td class='col3'> <font><xsl:if test="$qt=0 or $queryfmode=2"><xsl:attribute name="style">font-weight: bold;</xsl:attribute></xsl:if><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'pref.search_type_text')"/></font> 112 113 114 115 116 112 113 <xsl:if test="$formstatus='y'"><input name="qfm" onclick="javascript:changePref(0)" type="radio" value="0"><xsl:if test="$mode='form'"><xsl:attribute name="checked"/></xsl:if></input> <font><xsl:if test="$mode='form'"><xsl:attribute name="style">font-weight: bold;</xsl:attribute></xsl:if><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'pref.search_type_simple_form')"/></font></xsl:if> 114 115 <xsl:if test="$advancedstatus='y'"><input name="qfm" onclick="javascript:changePref(1)" type="radio" value="1" ><xsl:if test="$mode='advanced'"><xsl:attribute name="checked"/></xsl:if></input> <font><xsl:if test="$mode='advanced'"><xsl:attribute name="style">font-weight: bold;</xsl:attribute></xsl:if><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'pref.search_type_advanced_form')"/></font></xsl:if> 116 </td></tr> 117 117 118 118 <!-- search options --> … … 135 135 <!-- <xsl:if test="$mode='form'"><xsl:apply-templates select="/page/pageResponse//service[@name='FieldQuery']"/></xsl:if> --> 136 136 <xsl:call-template name="advanced-search-prefs"><xsl:with-param name="display"><xsl:if test="$mode='advanced'">y</xsl:if><xsl:if test="$mode='text' or $mode='form'">n</xsl:if></xsl:with-param></xsl:call-template> 137 137 138 138 <!-- search type specific options --> 139 139 <xsl:apply-templates select="/page/pageResponse//service[@name='TextQuery']"> … … 157 157 158 158 <tr><td rowspan='2' valign='baseline'><xsl:value-of select="$sortparam/displayItem"/></td><td><input type='radio' name='{$sortvar}' value='{$optionVal}'><xsl:choose><xsl:when test="$cachedValue=$optionVal"><xsl:attribute name="checked"/></xsl:when><xsl:when test="normalize-space($cachedValue)='' and $optionVal=$defaultValue"><xsl:attribute name="checked"/></xsl:when></xsl:choose></input></td> 159 159 <td><xsl:value-of select="$sortparam/option[1]/displayItem"/></td></tr> 160 160 161 161 <xsl:variable name="optionVal" select="$sortparam/option[2]/@name"/> … … 170 170 <xsl:variable name="maxdocs"><xsl:choose><xsl:when test="/page/pageRequest/paramList/param[@name=$maxvar]"><xsl:value-of select="/page/pageRequest/paramList/param[@name=$maxvar]/@value"/></xsl:when><xsl:otherwise>50</xsl:otherwise></xsl:choose></xsl:variable> 171 171 <xsl:variable name="hits"><xsl:choose><xsl:when test="/page/pageRequest/paramList/param[@name='hitsPerPage']"><xsl:value-of select="/page/pageRequest/paramList/param[@name='hitsPerPage']/@value"/></xsl:when><xsl:otherwise>20</xsl:otherwise></xsl:choose></xsl:variable> 172 173 174 175 176 177 178 179 180 181 182 183 184 172 <xsl:variable name="maxdocs_param"><select name="{$ns}maxDocs"> 173 <option value="50"><xsl:if test="$maxdocs=50"><xsl:attribute name="selected"></xsl:attribute></xsl:if>50</option> 174 <option value="100"><xsl:if test="$maxdocs=100"><xsl:attribute name="selected"></xsl:attribute></xsl:if>100</option> 175 <option value="200"><xsl:if test="$maxdocs=200"><xsl:attribute name="selected"></xsl:attribute></xsl:if>200</option> 176 <option value="-1"><xsl:if test="$maxdocs=-1"><xsl:attribute name="selected"></xsl:attribute></xsl:if><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'pref.all')"/></option> 177 </select></xsl:variable> 178 <xsl:variable name="hits_param"><select name="hitsPerPage"> 179 <option value="10"><xsl:if test="$hits=10"><xsl:attribute name="selected"></xsl:attribute></xsl:if>10 </option> 180 <option value="20"><xsl:if test="$hits=20"><xsl:attribute name="selected"></xsl:attribute></xsl:if>20</option> 181 <option value="50"><xsl:if test="$hits=50"><xsl:attribute name="selected"></xsl:attribute></xsl:if>50</option> 182 <option value="-1"><xsl:if test="$hits=-1"><xsl:attribute name="selected"></xsl:attribute></xsl:if><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'pref.all')"/></option> 183 </select></xsl:variable> 184 <tr><td colspan='3'><xsl:value-of select="util:getInterfaceTextWithDOM($interface_name, /page/@lang, 'pref.hits', $maxdocs_param, $hits_param)" disable-output-escaping="yes"/></td></tr> 185 185 </xsl:if> 186 186 </xsl:template> 187 187 188 188 <xsl:template name="advanced-search-prefs"> 189 189 <xsl:param name="display">n</xsl:param> … … 191 191 <tr id="adv-qnb"><xsl:if test="$display='n'"><xsl:attribute name="style">display:none</xsl:attribute></xsl:if> 192 192 <td colspan='2'><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'pref.num_fields')"/></td><td><select name="qfn"> 193 194 195 196 197 193 <option value="2"><xsl:if test="$numbox=2"><xsl:attribute name="selected"></xsl:attribute></xsl:if>2</option> 194 <option value="4"><xsl:if test="$numbox=4"><xsl:attribute name="selected"></xsl:attribute></xsl:if>4</option> 195 <option value="6"><xsl:if test="$numbox=6"><xsl:attribute name="selected"></xsl:attribute></xsl:if>6</option> 196 <option value="8"><xsl:if test="$numbox=8"><xsl:attribute name="selected"></xsl:attribute></xsl:if>8</option> 197 </select></td><td/></tr> 198 198 </xsl:template> 199 199 … … 242 242 <xsl:variable name="value" select="@name"/> 243 243 <tr><xsl:attribute name="id"><xsl:value-of select="concat($prefix, '-', $paramIdx, '-', position())"/></xsl:attribute><xsl:if test="$display='n'"><xsl:attribute name="style">display:none</xsl:attribute></xsl:if> 244 245 246 244 <xsl:if test="position()=1"><td rowspan='{$numOptions}' valign='baseline'><xsl:value-of select="../displayItem"/></td></xsl:if> 245 <td><input type='radio' name='{$cachedName}' value="{$value}"><xsl:if test="$cachedValue=$value"><xsl:attribute name="checked">true</xsl:attribute></xsl:if></input></td> 246 <td><xsl:value-of select="displayItem"/></td> 247 247 </tr> 248 248 </xsl:for-each> 249 249 </xsl:template> 250 250 251 251 </xsl:stylesheet>
Note:
See TracChangeset
for help on using the changeset viewer.