Changeset 19988 for greenstone3/trunk
- Timestamp:
- 2009-07-14T09:09:40+12:00 (15 years ago)
- Location:
- greenstone3/trunk/web/interfaces/oran
- Files:
-
- 12 edited
Legend:
- Unmodified
- Added
- Removed
-
greenstone3/trunk/web/interfaces/oran/interfaceConfig.xml
r19858 r19988 16 16 <action name='a' class='AppletAction' xslt='applet.xsl'/> 17 17 <action name='xd' class='XMLDocumentAction'> 18 <subaction name='toc' xslt=' document-toc.xsl'/>19 <subaction name='text' xslt=' document-content.xsl'/>18 <subaction name='toc' xslt='gberg/document-toc.xsl'/> 19 <subaction name='text' xslt='gberg/document-content.xsl'/> 20 20 </action> 21 21 <action name='pr' class='ProcessAction' xslt='process.xsl'/> 22 22 <action name='s' class='SystemAction' xslt='system.xsl'/> 23 23 <action name='g' class='GeneralAction'> 24 <subaction name="authen" xslt=' authen.xsl'/>24 <subaction name="authen" xslt='pages/authen.xsl'/> 25 25 <subaction name="berry" xslt='pages/berry.xsl'/> 26 26 </action> -
greenstone3/trunk/web/interfaces/oran/style/core.css
r19855 r19988 1 html { 2 height: 100%; 3 margin-bottom: 1px; 4 } 1 5 body { 2 6 font-family: sans-serif; … … 9 13 position: relative; 10 14 margin: 0 auto 20px auto; 11 max-width: 1 200px;15 max-width: 1000px; 12 16 padding: 0; 13 17 line-height: 160%; … … 28 32 background: transparent url('../images/gsdlhead.gif') scroll no-repeat left top; 29 33 padding: 10px 20px 30px 20px; 34 min-height: 80px; 30 35 max-height: 110px; 31 36 position: relative; … … 82 87 83 88 89 84 90 /* some text should not be rendered as it is just there for search engines */ 85 91 #collectionLinks a b { … … 88 94 89 95 /* make sure h1s and h2s are readable on the green banner */ 90 #banner h1, #banner h2, #banner h1 a, #banner h2 a { 91 color: #fff; 92 text-decoration: none; 93 } 94 95 #banner h1 { 96 font-size: 16px; 96 #breadcrumbs, #banner h2, #breadcrumbs a, #banner h2 a { 97 color: #fff; 98 } 99 body.dAction #banner h2 { 100 max-width: 600px; 101 font-size: 100%; 102 } 103 104 #breadcrumbs { 97 105 margin: 0 0 10px 0; 106 height: 30px; 107 line-height: 30px; 98 108 } 99 109 #banner h2 { … … 148 158 right: 0; 149 159 padding: 0 15px 0 0; 160 text-transform: lowercase; 150 161 } 151 162 … … 218 229 } 219 230 220 /* style the classifier results */221 # classifierResults {231 /* style the search and classifier results */ 232 #results { 222 233 margin: 0; 223 234 padding: 0; … … 225 236 } 226 237 227 # classifierResults ul {238 #results ul { 228 239 margin: 0 0 0 20px; 229 240 padding: 0; 230 241 } 231 242 232 # classifierResults li {243 #results li { 233 244 list-style: none; 234 245 margin: 0 0 .2em 0; … … 236 247 } 237 248 238 # classifierResults li a {249 #results li a { 239 250 padding: 3px 3px 3px 28px; 240 251 background-repeat: no-repeat; … … 243 254 244 255 245 # classifierResults .document a { background-image: url('../images/book.png'); }246 # classifierResults .document a:visited { background-image: url('../images/book-visited.png'); color: #999; }247 248 # classifierResults .shelf>a { background-image: url('../images/bookshelf.png'); }256 #results .document a { background-image: url('../images/book.png'); } 257 #results .document a:visited { background-image: url('../images/book-visited.png'); color: #999; } 258 259 #results .shelf>a { background-image: url('../images/bookshelf.png'); } 249 260 250 261 /* corners of the banner */ … … 666 677 } 667 678 679 /* -------- SEARCH ------- */ 680 .paramLabel { 681 float: left; 682 min-width: 250px; 683 } 684 .paramValue { 685 float: left; 686 } 687 688 689 table{ 690 border-collapse:collapse;border-spacing:0; 691 } 692 -
greenstone3/trunk/web/interfaces/oran/transform/layouts/main.xsl
r19856 r19988 8 8 exclude-result-prefixes="util java util"> 9 9 10 <!-- the name of the site --> 11 <xsl:template name="site-title">My Greenstone Library</xsl:template> 12 <xsl:template name="site-linked-title"><a href="./">My Greenstone Library</a></xsl:template> 10 <!-- put the URL or path of your site here site --> 11 <!-- eg 'http://www.example.com/mysite' or '/mysite' --> 12 <xsl:template name="siteURL">/</xsl:template> 13 13 14 14 15 <!-- the output format for this layout is html --> … … 21 22 22 23 <head> 23 <title><xsl:call-template name=" title"/> :: <xsl:call-template name="site-title"/></title>24 <title><xsl:call-template name="pageTitle"/> :: <xsl:call-template name="siteName"/></title> 24 25 <link rel="stylesheet" href="interfaces/{$interface_name}/style/core.css" type="text/css"/> 25 26 <script type="text/javascript" src="interfaces/oran/js/jquery.js"><xsl:text> </xsl:text></script> … … 27 28 </head> 28 29 29 <body><xsl:call-template name="textDirectionAttribute"/> 30 <body><xsl:call-template name="textDirectionAttribute"/><xsl:call-template name="actionClass"/> 31 32 <xsl:call-template name="displayErrorsIfAny"/> 30 33 31 34 <div id="container"><div id="container2"><div id="container3"><div id="container4"> 32 <xsl:call-template name="displayErrorsIfAny"/>33 35 34 36 <div id="banner"> 35 37 36 38 <!-- show the title --> 37 < h1><xsl:call-template name="site-linked-title"/> /</h1>38 <h2><xsl:call-template name=" linked-title"/></h2>39 <div id="breadcrumbs"><xsl:call-template name="breadcrumbs"/><xsl:text> </xsl:text></div> 40 <h2><xsl:call-template name="pageTitle"/></h2> 39 41 40 42 <!-- show home, help, preferences links --> … … 49 51 </li> 50 52 51 <!-- help 53 <!-- help --> 52 54 <li> 53 55 <a href="{$library_name}?a=p&amp;sa=help&amp;c={$collName}"> … … 56 58 </a> 57 59 </li> 58 -->59 60 60 <!-- home61 61 <li> 62 62 <a href="{$library_name}?a=p&amp;sa=home"> … … 65 65 </a> 66 66 </li> 67 -->68 67 69 68 </ul> … … 86 85 --> 87 86 <xsl:apply-templates select="/page"/> 87 88 88 </div> 89 89 -
greenstone3/trunk/web/interfaces/oran/transform/pages/about.xsl
r19856 r19988 8 8 exclude-result-prefixes="java util"> 9 9 10 <!-- set to the oranlayout -->10 <!-- use the 'main' layout --> 11 11 <xsl:include href="layouts/main.xsl"/> 12 12 13 < xsl:template name="title"><gslib:aboutCollectionPageTitle/></xsl:template>14 <xsl:template name=" linked-title"><a href=""><gslib:aboutCollectionPageTitle/></a></xsl:template>13 <!-- set page title --> 14 <xsl:template name="pageTitle"><gslib:collectionName/></xsl:template> 15 15 16 <!-- <xsl:template name="linked-title"><a href=""><gslib:aboutCollectionPageTitle/></a></xsl:template> --> 16 <!-- set page breadcrumbs --> 17 <xsl:template name="breadcrumbs"><gslib:siteLink/><gslib:rightArrow/></xsl:template> 17 18 19 <!-- the page content --> 18 20 <xsl:template match="/page"> 19 21 -
greenstone3/trunk/web/interfaces/oran/transform/pages/berry.xsl
r19856 r19988 8 8 exclude-result-prefixes="java util"> 9 9 10 <!-- make this pageuse the 'main' layout -->10 <!-- use the 'main' layout --> 11 11 <xsl:include href="layouts/main.xsl"/> 12 12 13 <!-- set page title and subtitle--> 14 <xsl:template name="title"><xsl:value-of select="/page/pageResponse/serviceCluster/metadataList/metadata[@name='Title']"/> Berry Basket</xsl:template> 15 <xsl:template name="linked-title"><a href=""><xsl:value-of select="/page/pageResponse/serviceCluster/metadataList/metadata[@name='Title']"/> Berry Basket</a></xsl:template> 13 <!-- set page title --> 14 <xsl:template name="pageTitle"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'pref.berrybasket')"/></xsl:template> 16 15 17 <!-- the main page layout template is here --> 16 <!-- set page breadcrumbs --> 17 <xsl:template name="breadcrumbs"><gslib:siteLink/><gslib:rightArrow/></xsl:template> 18 19 <!-- the page content --> 18 20 <xsl:template match="/page"> 19 21 <xsl:variable name="clusterName"><xsl:value-of select="/page/pageRequest/paramList/param[@name='c']/@value"/></xsl:variable> 20 22 <script type="text/javascript" src="/interfaces/oran/js/berrycheckout.js"><xsl:text> </xsl:text></script> 21 23 <script type="text/javascript"> 24 <xsl:text> </xsl:text> 22 25 <xsl:for-each select="/page/pageResponse/collection/item"> 23 26 <xsl:text disable-output-escaping="yes">var doc = new Array(); -
greenstone3/trunk/web/interfaces/oran/transform/pages/classifier.xsl
r19856 r19988 8 8 exclude-result-prefixes="java util"> 9 9 10 <xsl:include href=".old/berrytools.xsl"/> 11 12 <!-- make this page use the 'main' layout --> 10 <!-- use the 'main' layout --> 13 11 <xsl:include href="layouts/main.xsl"/> 14 12 15 <!-- set page title and subtitle--> 16 <xsl:template name="title"><gslib:aboutCollectionPageTitle/></xsl:template> 17 <xsl:template name="linked-title"><a href=""><gslib:aboutCollectionPageTitle/></a></xsl:template> 13 <!-- set page title --> 14 <xsl:template name="pageTitle"><gslib:serviceName/></xsl:template> 18 15 19 <!-- the page content is here --> 16 <!-- set page breadcrumbs --> 17 <xsl:template name="breadcrumbs"><gslib:siteLink/><gslib:rightArrow/> <gslib:collectionNameLinked/><gslib:rightArrow/></xsl:template> 18 19 <!-- the page content --> 20 20 <xsl:template match="/page/pageResponse"> 21 21 … … 43 43 the two templates at the bottom of this file 44 44 --> 45 <ul id=" classifierResults">45 <ul id="results"> 46 46 <xsl:apply-templates select="classifier/*"/> 47 47 </ul> -
greenstone3/trunk/web/interfaces/oran/transform/pages/document.xsl
r19856 r19988 12 12 <xsl:include href=".old/berrytools.xsl"/> 13 13 14 <!-- make this pageuse the 'main' layout -->14 <!-- use the 'main' layout --> 15 15 <xsl:include href="layouts/main.xsl"/> 16 16 17 <!-- set page title and subtitle--> 18 <xsl:template name="title"><gslib:collectionName/></xsl:template> 19 <xsl:template name="linked-title"><a><xsl:attribute name="href">/<xsl:value-of select="collection/@name"/></xsl:attribute><gslib:collectionName/></a></xsl:template> 17 <!-- set page title --> 18 <xsl:template name="pageTitle"><gslib:documentTitle/></xsl:template> 20 19 20 <!-- set page breadcrumbs --> 21 <xsl:template name="breadcrumbs"><gslib:siteLink/><gslib:rightArrow/></xsl:template> 22 23 <!-- the page content --> 21 24 <xsl:template match="/page/pageResponse/document"> 22 25 … … 59 62 <xsl:variable name="p.c"><xsl:choose><xsl:when test="/page/pageRequest/paramList/param[@name='p.c']"><xsl:value-of select="/page/pageRequest/paramList/param[@name='p.c']/@value"/></xsl:when><xsl:otherwise><xsl:value-of select="$collName"/></xsl:otherwise></xsl:choose></xsl:variable> 60 63 64 <!-- 61 65 <div id="documentheading"> 62 66 63 <!- -<a href="{$library_name}?a={$p.a}&sa={$p.sa}&s={$p.s}&c={$p.c}&rt=rd"><xsl:call-template name="openbookimg"><xsl:with-param name="title"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'close_book')"/></xsl:with-param></xsl:call-template></a>-->67 <!- -<a href="{$library_name}?a={$p.a}&sa={$p.sa}&s={$p.s}&c={$p.c}&rt=rd"><xsl:call-template name="openbookimg"><xsl:with-param name="title"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'close_book')"/></xsl:with-param></xsl:call-template></a>- -> 64 68 65 69 <xsl:choose> … … 69 73 70 74 </div> 75 --> 71 76 72 77 <div class="documenttext"> … … 102 107 <!-- formulate the link --> 103 108 <xsl:variable name="contentsLink"> 104 <xsl:value-of select='$library_name'/>? 105 a=d& 106 c=<gslib:collectionShortName/>& 107 d=<xsl:value-of select='@nodeID'/><xsl:if test="documentNode">.pr</xsl:if>& 108 sib=1& 109 <!--<xsl:if test="string($ec) = '1'">ec=1&</xsl:if> 109 <xsl:value-of select='$library_name'/>?a=d&c=<gslib:collectionNameShort/>&d=<xsl:value-of select='@nodeID'/><xsl:if test="documentNode">.pr</xsl:if>&sib=1<!--&<xsl:if test="string($ec) = '1'">ec=1&</xsl:if> 110 110 p.a=<xsl:value-of select="$p.a"/>& 111 111 p.sa=<xsl:value-of select="$p.sa"/>& -
greenstone3/trunk/web/interfaces/oran/transform/pages/help.xsl
r19856 r19988 1 1 <?xml version="1.0" encoding="ISO-8859-1"?> 2 2 <xsl:stylesheet version="1.0" 3 xmlns:xsl="http://www.w3.org/1999/XSL/Transform" 4 xmlns:java="http://xml.apache.org/xslt/java" 5 xmlns:util="xalan://org.greenstone.gsdl3.util.XSLTUtil" 6 extension-element-prefixes="java util" 7 exclude-result-prefixes="java util"> 8 9 <!-- choose the main layout --> 3 xmlns:xsl="http://www.w3.org/1999/XSL/Transform" 4 xmlns:java="http://xml.apache.org/xslt/java" 5 xmlns:util="xalan://org.greenstone.gsdl3.util.XSLTUtil" 6 xmlns:gslib="http://www.greenstone.org/skinning" 7 extension-element-prefixes="java util" 8 exclude-result-prefixes="java util"> 9 10 <!-- use the 'main' layout --> 10 11 <xsl:include href="layouts/main.xsl"/> 11 12 12 <!-- title --> 13 <xsl:template name="title">Help</xsl:template> 14 <xsl:template name="linked-title">Help</xsl:template> 13 <!-- set page title --> 14 <xsl:template name="pageTitle"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'help_b')"/></xsl:template> 15 15 16 <!-- the main page layout template is here --> 16 <!-- set page breadcrumbs --> 17 <xsl:template name="breadcrumbs"><gslib:siteLink/><gslib:rightArrow/></xsl:template> 18 19 <!-- the page content --> 17 20 <xsl:template match="page"> 18 21 Help text goes here 19 22 </xsl:template> 20 21 22 23 </xsl:stylesheet> -
greenstone3/trunk/web/interfaces/oran/transform/pages/home.xsl
r19856 r19988 6 6 xmlns:gslib="http://www.greenstone.org/skinning" 7 7 extension-element-prefixes="java util" 8 exclude-result-prefixes=" utiljava util">8 exclude-result-prefixes="java util"> 9 9 10 <!-- make this pageuse the 'main' layout -->10 <!-- use the 'main' layout --> 11 11 <xsl:include href="layouts/main.xsl"/> 12 12 13 <!-- set page title and subtitle--> 14 <xsl:template name="title"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'home_t')"/></xsl:template> 15 <xsl:template name="linked-title"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'home_t')"/></xsl:template> 13 <!-- set page title --> 14 <xsl:template name="pageTitle"><gslib:siteName/></xsl:template> 16 15 17 <!-- the page content is here --> 16 <!-- set page breadcrumbs --> 17 <xsl:template name="breadcrumbs"></xsl:template> 18 19 <!-- the page content --> 18 20 <xsl:template match="/page/pageResponse"> 19 21 -
greenstone3/trunk/web/interfaces/oran/transform/pages/pref.xsl
r19856 r19988 4 4 xmlns:java="http://xml.apache.org/xslt/java" 5 5 xmlns:util="xalan://org.greenstone.gsdl3.util.XSLTUtil" 6 xmlns:gslib="http://www.greenstone.org/skinning" 6 7 extension-element-prefixes="java util" 7 8 exclude-result-prefixes="java util"> 8 9 9 <!-- style includes global params interface_name, library_name --> 10 <xsl:include href=".old/style.xsl"/> 11 12 <!-- make this page use the 'main' layout --> 10 <!-- use the 'main' layout --> 13 11 <xsl:include href="layouts/main.xsl"/> 14 12 15 <!-- set page title and subtitle--> 16 <xsl:template name="title"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'pref_b')"/></xsl:template> 17 <xsl:template name="linked-title"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'pref_b')"/></xsl:template> 13 <!-- set page title --> 14 <xsl:template name="pageTitle"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'pref_b')"/></xsl:template> 18 15 19 <!-- the page content is here --> 16 <!-- set page breadcrumbs --> 17 <xsl:template name="breadcrumbs"><gslib:siteLink/><gslib:rightArrow/></xsl:template> 18 19 <!-- the page content --> 20 20 <xsl:template match="/page"> 21 21 … … 32 32 <!-- presentation preferences --> 33 33 <h3 class="formheading"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'pref.prespref')"/></h3> 34 <ul id="presprefs"> 35 <li> 34 <div id="presprefs"> 35 36 <!-- language --> 37 <div class="paramLabel"> 36 38 <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'pref.interfacelang')"/> 39 </div> 40 <div class="paramValue"> 37 41 <select name="l"> 38 42 <xsl:for-each select="/page/pageResponse/languageList/language"> … … 41 45 </select> 42 46 43 </li> 44 <li> 47 </div> 48 <br class="clear"/> 49 50 <!-- encoding --> 51 <div class="paramValue"> 45 52 <span class="rightspace"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'pref.encoding')"/></span> 46 </li> 47 </ul> 53 </div> 54 <br class="clear"/> 55 56 </div> 48 57 49 58 <!-- berry baskets --> 50 < ulid="berrybasketprefs">59 <div id="berrybasketprefs"> 51 60 <xsl:variable name="berrybasket"><xsl:choose><xsl:when test="/page/pageRequest/paramList/param[@name='berrybasket']"><xsl:value-of select="/page/pageRequest/paramList/param[@name='berrybasket']/@value"/></xsl:when><xsl:otherwise>off</xsl:otherwise></xsl:choose></xsl:variable> 52 < li>61 <div class="paramLabel"> 53 62 <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'pref.berrybasket')"/> 63 </div> 64 <div class="paramValue"> 54 65 <select name="berrybasket"> 55 66 <option value="on"><xsl:if test="$berrybasket='on'"><xsl:attribute name="selected"></xsl:attribute></xsl:if><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'pref.berrybasket.on')"/></option> 56 67 <option value="off"><xsl:if test="$berrybasket='off'"><xsl:attribute name="selected"></xsl:attribute></xsl:if><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'pref.berrybasket.off')"/></option> 57 68 </select> 58 </li> 59 </ul> 69 </div> 70 <br class="clear"/> 71 </div> 60 72 61 73 <!-- tidy (?) --> 62 74 <xsl:if test="$tidyoption='tidy'"> 63 75 <xsl:variable name="book"><xsl:choose><xsl:when test="/page/pageRequest/paramList/param[@name='book']"><xsl:value-of select="/page/pageRequest/paramList/param[@name='book']/@value"/></xsl:when><xsl:otherwise>off</xsl:otherwise></xsl:choose></xsl:variable> 64 <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'pref.book')"/> <select name="book"> 65 <option value="on"><xsl:if test="$book='on'"><xsl:attribute name="selected"></xsl:attribute></xsl:if><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'pref.berrybasket.on')"/></option> 66 <option value="off"><xsl:if test="$book='off'"><xsl:attribute name="selected"></xsl:attribute></xsl:if><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'pref.berrybasket.off')"/></option> 67 </select> 76 <div class="paramLabel"> 77 <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'pref.book')"/> 78 </div> 79 <div class="paramValue"> 80 <select name="book"> 81 <option value="on"><xsl:if test="$book='on'"><xsl:attribute name="selected"></xsl:attribute></xsl:if><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'pref.berrybasket.on')"/></option> 82 <option value="off"><xsl:if test="$book='off'"><xsl:attribute name="selected"></xsl:attribute></xsl:if><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'pref.berrybasket.off')"/></option> 83 </select> 84 </div> 85 <br class="clear"/> 68 86 </xsl:if> 69 87 70 88 <!-- search preferences --> 71 89 <h3><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'pref.searchpref')"/></h3> 72 < ulid="searchprefs">90 <div id="searchprefs"> 73 91 <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> 74 <li> 75 <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'pref.hitsperpage')"/> 92 <div class="paramLabel"> 93 <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'pref.hitsperpage')"/> 94 </div> 95 <div class="paramValue"> 76 96 <select name="hitsPerPage"> 77 97 <option value="20"><xsl:if test="$hits=20"><xsl:attribute name="selected"></xsl:attribute></xsl:if>20</option> … … 80 100 <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> 81 101 </select> 82 </li> 83 </ul> 102 </div> 103 <br class="clear"/> 104 </div> 105 106 <br/> 84 107 85 108 <input type='submit'><xsl:attribute name="value"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'pref.set_prefs')"/></xsl:attribute></input> -
greenstone3/trunk/web/interfaces/oran/transform/pages/query.xsl
r19856 r19988 8 8 exclude-result-prefixes="java util"> 9 9 10 <!-- make this pageuse the 'main' layout -->10 <!-- use the 'main' layout --> 11 11 <xsl:include href="layouts/main.xsl"/> 12 12 13 <!-- set page title and subtitle--> 14 <xsl:template name="title"><gslib:aboutCollectionPageTitle/></xsl:template> 15 <xsl:template name="linked-title"><a href=""><gslib:aboutCollectionPageTitle/></a></xsl:template> 16 17 <!-- the main page layout template is here --> 18 <xsl:template match="/page/pageResponse/service"> 19 20 <form name="QueryForm" method="get" action="{$library_name}"> 21 <div> 22 <input type="hidden" name="a" value="q"/> 23 <input type="hidden" name="sa"><xsl:attribute name="value"><xsl:value-of select="/page/pageRequest/@subaction"/></xsl:attribute></input> 24 <input type="hidden" name="rt" value="rd"/> 25 <input type="hidden" name="s" value="{@name}"/> 26 <input type="hidden" name="c" value="{$collName}"/> 27 <xsl:if test="not(paramList/param[@name='startPage'])"> 28 <input type="hidden" name="startPage" value="1"/> 29 </xsl:if> 30 31 <xsl:apply-templates select="paramList"/> 32 33 <input type="submit"><xsl:attribute name="value"><xsl:value-of select="displayItem[@name='submit']"/></xsl:attribute></input> 13 <!-- set page title --> 14 <xsl:template name="pageTitle"><gslib:serviceName/></xsl:template> 15 16 <!-- set page breadcrumbs --> 17 <xsl:template name="breadcrumbs"> <gslib:siteLink/><gslib:rightArrow/> <gslib:collectionNameLinked/><gslib:rightArrow/></xsl:template> 18 19 <!-- the page content --> 20 <xsl:template match="/page"> 21 <xsl:choose> 22 <xsl:when test="not(pageResponse/documentNodeList)"> 23 <xsl:for-each select="pageResponse/service"> 24 <form name="QueryForm" method="get" action="{$library_name}"> 25 <div> 26 <input type="hidden" name="a" value="q"/> 27 <input type="hidden" name="sa"><xsl:attribute name="value"><xsl:value-of select="/page/pageRequest/@subaction"/></xsl:attribute></input> 28 <input type="hidden" name="rt" value="rd"/> 29 <input type="hidden" name="s" value="{@name}"/> 30 <input type="hidden" name="c" value="{$collName}"/> 31 <xsl:if test="not(paramList/param[@name='startPage'])"> 32 <input type="hidden" name="startPage" value="1"/> 33 </xsl:if> 34 35 <xsl:variable name="ns">s1.</xsl:variable> 36 <xsl:for-each select="paramList/param"> 37 <xsl:choose> 38 <xsl:when test="@type='multi'"> 39 <xsl:apply-templates select="."><xsl:with-param name="ns" select="$ns"/></xsl:apply-templates> 40 </xsl:when> 41 <xsl:otherwise> 42 <xsl:variable name="pvalue"><xsl:apply-templates select="." mode="calculate-default"><xsl:with-param name="ns" select="$ns"/></xsl:apply-templates></xsl:variable> 43 <div class="paramLabel"><xsl:value-of select="displayItem[@name='name']"/></div> 44 <div class="paramValue"> 45 <xsl:apply-templates select="."> 46 <xsl:with-param name="default" select="$pvalue"/> 47 <xsl:with-param name="ns" select="$ns"/> 48 </xsl:apply-templates> 49 </div> 50 <br class="clear"/> 51 </xsl:otherwise> 52 </xsl:choose> 53 </xsl:for-each> 54 55 <br/> 56 57 <input type="submit"><xsl:attribute name="value"><xsl:value-of select="displayItem[@name='submit']"/></xsl:attribute></input> 34 58 35 </div> 36 </form> 37 38 <xsl:if test="contains(/page/pageRequest/paramList/param[@name='rt']/@value, 'r')"> 39 <xsl:call-template name="query-response"> 40 <xsl:with-param name="collName" select="$collName"/> 41 </xsl:call-template> 59 </div> 60 </form> 61 <xsl:if test="contains(/page/pageRequest/paramList/param[@name='rt']/@value, 'r')"> 62 <xsl:call-template name="query-response"> 63 <xsl:with-param name="collName" select="$collName"/> 64 </xsl:call-template> 65 </xsl:if> 66 67 </xsl:for-each> 68 69 </xsl:when> 70 71 <xsl:otherwise> 72 73 <ul id="results"> 74 <xsl:for-each select="pageResponse/documentNodeList/documentNode"> 75 <li class="document"> 76 <a> 77 <xsl:attribute name="href"><xsl:value-of select="$library_name"/>?a=d&c=<xsl:value-of select="/page/pageResponse/collection/@name"/>&d=<xsl:value-of select="@nodeID"/>&dt=<xsl:value-of select="@docType"/>&p.a=b&p.s=<xsl:value-of select="/page/pageResponse/service/@name"/></xsl:attribute> 78 <xsl:value-of disable-output-escaping="yes" select="metadataList/metadata[@name='Title']"/> 79 </a> 80 <xsl:call-template name="documentBerryForClassifierOrSearchPage"/> 81 </li> 82 </xsl:for-each> 83 </ul> 84 </xsl:otherwise> 85 86 </xsl:choose> 87 88 </xsl:template> 89 90 91 <!-- puts all the params into a=p&p=h type form - need to change this if use 92 multi params --> 93 <xsl:template match="paramList" mode="cgi"> 94 <xsl:param name="ns">s1.</xsl:param> 95 <xsl:for-each select="param"> 96 <xsl:variable name='pname' select="@name"/> 97 <xsl:text>&</xsl:text><xsl:value-of select="$ns"/><xsl:value-of select="@name"/>=<xsl:apply-templates select="." mode="calculate-default"><xsl:with-param name='ns' select='$ns'/></xsl:apply-templates> 98 </xsl:for-each> 99 </xsl:template> 100 101 <xsl:template match="param" mode="calculate-default"> 102 <xsl:param name="ns">s1.</xsl:param> 103 <xsl:variable name="pname"><xsl:value-of select="$ns"/><xsl:value-of select="@name"/></xsl:variable> 104 <xsl:choose> 105 <xsl:when test="/page/pageRequest/paramList/param[@name=$pname]"> 106 <xsl:choose> 107 <xsl:when test="@type='enum_multi'"><xsl:text>,</xsl:text> 108 <xsl:for-each select="/page/pageRequest/paramList/param[@name=$pname]"> 109 <xsl:value-of select="@value"/>, 110 </xsl:for-each> 111 </xsl:when> 112 <xsl:otherwise> 113 <xsl:value-of select="/page/pageRequest/paramList/param[@name=$pname]/@value"/> 114 </xsl:otherwise> 115 </xsl:choose> 116 </xsl:when> 117 <xsl:otherwise> 118 <xsl:value-of select="@default"/> 119 </xsl:otherwise> 120 </xsl:choose> 121 </xsl:template> 122 123 <!-- invisible params - used by other stuff. in the query form, we set to teh default --> 124 <xsl:template match="param[@type='invisible']"> 125 <xsl:param name="ns">s1.</xsl:param> 126 <input type='hidden' name='{$ns}{@name}' value='{@default}'/> 127 </xsl:template> 128 129 <!-- boolean params --> 130 <xsl:template match="param[@type='boolean']"> 131 <xsl:param name="ns">s1.</xsl:param> 132 <xsl:param name="default"/> 133 <select name='{$ns}{@name}'> 134 <option value="0"><xsl:if test="$default='0'"><xsl:attribute name="selected"></xsl:attribute></xsl:if><xsl:value-of select="option[@name='0']/displayItem[@name='name']"/></option> 135 <option value="1"><xsl:if test="$default='1'"><xsl:attribute name="selected"></xsl:attribute></xsl:if><xsl:value-of select="option[@name='1']/displayItem[@name='name']"/></option> 136 </select> 137 </xsl:template> 138 139 <!-- integer params --> 140 <xsl:template match="param[@type='integer']"> 141 <xsl:param name="ns">s1.</xsl:param> 142 <xsl:param name="default"/> 143 <input type="text" name="{$ns}{@name}" size="3" value="{$default}"/> 144 </xsl:template> 145 146 <!-- single selection enum params --> 147 <xsl:template match="param[@type='enum_single']"> 148 <xsl:param name="ns">s1.</xsl:param> 149 <xsl:param name="default"/> 150 <xsl:choose> 151 <xsl:when test="count(option) = 1"> 152 <xsl:value-of select="option/displayItem[@name='name']"/> 153 <input type='hidden' name='{$ns}{@name}'><xsl:attribute name='value'><xsl:value-of select='option/@name'/></xsl:attribute></input> 154 </xsl:when> 155 <xsl:otherwise> 156 <select name="{$ns}{@name}"> 157 <xsl:for-each select="option"> 158 <option value="{@name}"><xsl:if test="@name=$default"><xsl:attribute name="selected"></xsl:attribute></xsl:if><xsl:value-of select="displayItem[@name='name']"/></option> 159 </xsl:for-each> 160 </select> 161 </xsl:otherwise> 162 </xsl:choose> 163 </xsl:template> 164 165 166 <!-- multiple selection enum params --> 167 <!-- how to do defaults for this?? --> 168 <xsl:template match="param[@type='enum_multi']"> 169 <xsl:param name="ns">s1.</xsl:param> 170 <xsl:param name="default"/> 171 <select name="{$ns}{@name}" size="2"> 172 <xsl:attribute name="multiple"></xsl:attribute> 173 <xsl:for-each select="option"> 174 <option value="{@name}"><xsl:if test="contains($default, concat(',', @name, ','))"><xsl:attribute name="selected"></xsl:attribute></xsl:if><xsl:value-of select="displayItem[@name='name']"/></option> 175 </xsl:for-each> 176 </select> 177 </xsl:template> 178 179 <!-- string params --> 180 <xsl:template match="param[@type='string']"> 181 <xsl:param name="ns">s1.</xsl:param> 182 <xsl:param name="default"/> 183 <input type="text" name="{$ns}{@name}" size="30" value="{$default}"/> 184 </xsl:template> 185 186 <!-- large string params --> 187 <xsl:template match="param[@type='text']"> 188 <xsl:param name="ns">s1.</xsl:param> 189 <xsl:param name="default"/> 190 <textarea name="{$ns}{@name}" cols="50" rows="3"><xsl:value-of select='$default'/></textarea> 191 </xsl:template> 192 193 <!-- multi params - params that are combinations of other params --> 194 <xsl:template match="param[@type='multi']"> 195 <xsl:param name="ns">s1.</xsl:param> 196 <xsl:variable name="parent" select="@name"/> 197 198 <table> 199 <tr class="queryfieldheading"> 200 <xsl:value-of select="displayItem[@name='name']"/> 201 <xsl:for-each select="param"> 202 <td class="queryfieldname"><xsl:value-of select="displayItem[@name='name']"/></td> 203 </xsl:for-each> 204 </tr> 205 <xsl:apply-templates select="." mode="contents"> 206 <xsl:with-param name="occurs" select="@occurs"/> 207 <xsl:with-param name="ns" select="$ns"/> 208 </xsl:apply-templates> 209 </table> 210 211 </xsl:template> 212 213 <xsl:template match="param[@type='multi']" mode="contents"> 214 <xsl:param name="ns">s1.</xsl:param> 215 <xsl:param name="occurs">1</xsl:param> 216 <xsl:variable name="pos" select="@occurs - $occurs"/> 217 <tr class="queryfieldrow"> 218 <xsl:for-each select="param"> 219 <xsl:variable name="pname" select="@name"/> 220 <xsl:variable name="values" select="/page/pageRequest/paramList/param[@name=$pname]/@value"/> 221 <td class="queryfieldcell"> 222 <xsl:choose> 223 <xsl:when test="not(@ignore) or @ignore != $pos"> 224 <xsl:apply-templates select="."><xsl:with-param name="default" select="java:org.greenstone.gsdl3.util.XSLTUtil.getNumberedItem($values, $pos)"/><xsl:with-param name="ns" select="$ns"/></xsl:apply-templates> 225 </xsl:when> 226 <xsl:otherwise><!-- put in a hidden placeholder --> 227 <input type="hidden" name='{$ns}{@name}' value=''/> 228 </xsl:otherwise> 229 </xsl:choose> 230 </td> 231 </xsl:for-each> 232 </tr> 233 234 <!-- recursively call this template to get multiple entries --> 235 <xsl:if test="$occurs > 1"> 236 <xsl:apply-templates select="." mode="contents"><xsl:with-param name="occurs" select="$occurs - 1"/><xsl:with-param name="ns" select="$ns"/></xsl:apply-templates> 42 237 </xsl:if> 43 44 </xsl:template> 45 46 <xsl:template match="/page"><xsl:apply-templates select="/page/pageResponse/service"/></xsl:template> 47 48 49 <!-- the default param list handling --> 50 <xsl:template match="paramList"> 51 <xsl:param name="ns">s1.</xsl:param> 52 <ul id="queryitemlist"> 53 <xsl:for-each select="param"> 54 <xsl:choose> 55 <xsl:when test="@type='multi'"> 56 <li><xsl:apply-templates select='.'><xsl:with-param name="ns" select="$ns"/></xsl:apply-templates></li> 57 </xsl:when> 58 <xsl:otherwise> 59 <xsl:variable name="pvalue"><xsl:apply-templates select="." mode="calculate-default"><xsl:with-param name="ns" select="$ns"/></xsl:apply-templates></xsl:variable> 60 <li><xsl:value-of select="displayItem[@name='name']"/><xsl:apply-templates select="."><xsl:with-param name="default" select="$pvalue"/><xsl:with-param name="ns" select="$ns"/></xsl:apply-templates></li> 61 </xsl:otherwise> 62 </xsl:choose> 63 </xsl:for-each> 64 </ul> 65 </xsl:template> 66 67 <!-- puts all the params into a=p&p=h type form - need to change this if use 68 multi params --> 69 <xsl:template match="paramList" mode="cgi"> 70 <xsl:param name="ns">s1.</xsl:param> 71 <xsl:for-each select="param"> 72 <xsl:variable name='pname' select="@name"/> 73 <xsl:text>&</xsl:text><xsl:value-of select="$ns"/><xsl:value-of select="@name"/>=<xsl:apply-templates select="." mode="calculate-default"><xsl:with-param name='ns' select='$ns'/></xsl:apply-templates> 74 </xsl:for-each> 75 </xsl:template> 76 77 <xsl:template match="param" mode="calculate-default"> 78 <xsl:param name="ns">s1.</xsl:param> 79 <xsl:variable name="pname"><xsl:value-of select="$ns"/><xsl:value-of select="@name"/></xsl:variable> 80 <xsl:choose> 81 <xsl:when test="/page/pageRequest/paramList/param[@name=$pname]"> 82 <xsl:choose> 83 <xsl:when test="@type='enum_multi'"><xsl:text>,</xsl:text> 84 <xsl:for-each select="/page/pageRequest/paramList/param[@name=$pname]"> 85 <xsl:value-of select="@value"/>, 86 </xsl:for-each> 87 </xsl:when> 88 <xsl:otherwise> 89 <xsl:value-of select="/page/pageRequest/paramList/param[@name=$pname]/@value"/> 90 </xsl:otherwise> 91 </xsl:choose> 92 </xsl:when> 93 <xsl:otherwise> 94 <xsl:value-of select="@default"/> 95 </xsl:otherwise> 96 </xsl:choose> 97 </xsl:template> 98 99 <!-- invisible params - used by other stuff. in the query form, we set to teh default --> 100 <xsl:template match="param[@type='invisible']"> 101 <xsl:param name="ns">s1.</xsl:param> 102 <input type='hidden' name='{$ns}{@name}' value='{@default}'/> 103 </xsl:template> 104 <!-- boolean params --> 105 <xsl:template match="param[@type='boolean']"> 106 <xsl:param name="ns">s1.</xsl:param> 107 <xsl:param name="default"/> 108 <select name='{$ns}{@name}'> 109 <option value="0"><xsl:if test="$default='0'"><xsl:attribute name="selected"></xsl:attribute></xsl:if><xsl:value-of select="option[@name='0']/displayItem[@name='name']"/></option> 110 <option value="1"><xsl:if test="$default='1'"><xsl:attribute name="selected"></xsl:attribute></xsl:if><xsl:value-of select="option[@name='1']/displayItem[@name='name']"/></option> 111 </select> 112 </xsl:template> 113 114 <!-- integer params --> 115 <xsl:template match="param[@type='integer']"> 116 <xsl:param name="ns">s1.</xsl:param> 117 <xsl:param name="default"/> 118 <input type="text" name="{$ns}{@name}" size="3" value="{$default}"/> 119 </xsl:template> 120 121 <!-- single selection enum params --> 122 <xsl:template match="param[@type='enum_single']"> 123 <xsl:param name="ns">s1.</xsl:param> 124 <xsl:param name="default"/> 125 <xsl:choose> 126 <xsl:when test="count(option) = 1"> 127 <xsl:value-of select="option/displayItem[@name='name']"/> 128 <input type='hidden' name='{$ns}{@name}'><xsl:attribute name='value'><xsl:value-of select='option/@name'/></xsl:attribute></input> 129 </xsl:when> 130 <xsl:otherwise> 131 <select name="{$ns}{@name}"> 132 <xsl:for-each select="option"> 133 <option value="{@name}"><xsl:if test="@name=$default"><xsl:attribute name="selected"></xsl:attribute></xsl:if><xsl:value-of select="displayItem[@name='name']"/></option> 134 </xsl:for-each> 135 </select> 136 </xsl:otherwise> 137 </xsl:choose> 138 </xsl:template> 139 140 141 <!-- multiple selection enum params --> 142 <!-- how to do defaults for this?? --> 143 <xsl:template match="param[@type='enum_multi']"> 144 <xsl:param name="ns">s1.</xsl:param> 145 <xsl:param name="default"/> 146 <select name="{$ns}{@name}" size='2'><xsl:attribute name="multiple"></xsl:attribute> 147 <xsl:for-each select="option"> 148 <option value="{@name}"><xsl:if test="contains($default, concat(',', @name, ','))"><xsl:attribute name="selected"></xsl:attribute></xsl:if><xsl:value-of select="displayItem[@name='name']"/></option> 149 </xsl:for-each> 150 </select> 151 </xsl:template> 152 153 <!-- string params --> 154 <xsl:template match="param[@type='string']"> 155 <xsl:param name="ns">s1.</xsl:param> 156 <xsl:param name="default"/> 157 <input type="text" name="{$ns}{@name}" size="50" value="{$default}"/> 158 </xsl:template> 159 160 <!-- large string params --> 161 <xsl:template match="param[@type='text']"> 162 <xsl:param name="ns">s1.</xsl:param> 163 <xsl:param name="default"/> 164 <textarea name="{$ns}{@name}" cols="50" rows="3"><xsl:value-of select='$default'/></textarea> 165 </xsl:template> 166 167 <!-- multi params - params that are combinations of other params --> 168 <xsl:template match="param[@type='multi']"> 169 <xsl:param name="ns">s1.</xsl:param> 170 <xsl:variable name="parent" select="@name"/> 171 <table> 172 <tr class="queryfieldheading"><xsl:value-of select="displayItem[@name='name']"/> 173 <xsl:for-each select="param"> 174 <td class="queryfieldname"><xsl:value-of select="displayItem[@name='name']"/></td> 175 </xsl:for-each> 176 </tr> 177 178 <xsl:apply-templates select="." mode="contents"><xsl:with-param name="occurs" select="@occurs"/><xsl:with-param name="ns" select="$ns"/></xsl:apply-templates> 179 </table> 180 </xsl:template> 181 182 <xsl:template match="param[@type='multi']" mode="contents"> 183 <xsl:param name="ns">s1.</xsl:param> 184 <xsl:param name="occurs">1</xsl:param> 185 <xsl:variable name="pos" select="@occurs - $occurs"/> 186 <tr class="queryfieldrow"><xsl:for-each select="param"> 187 <xsl:variable name="pname" select="@name"/> 188 <xsl:variable name="values" select="/page/pageRequest/paramList/param[@name=$pname]/@value"/> 189 <td class="queryfieldcell"><xsl:choose> 190 <xsl:when test="not(@ignore) or @ignore != $pos"> 191 <xsl:apply-templates select='.'><xsl:with-param name="default" select="java:org.greenstone.gsdl3.util.XSLTUtil.getNumberedItem($values, $pos)"/><xsl:with-param name="ns" select="$ns"/></xsl:apply-templates> 192 </xsl:when> 193 <xsl:otherwise><!-- put in a hidden placeholder --> 194 <input type="hidden" name='{$ns}{@name}' value=''/> 195 </xsl:otherwise> 196 </xsl:choose></td> 197 </xsl:for-each></tr> 198 <!-- recursively call this template to get multiple entries --> 199 <xsl:if test="$occurs > 1"> 200 <xsl:apply-templates select="." mode="contents"><xsl:with-param name="occurs" select="$occurs - 1"/><xsl:with-param name="ns" select="$ns"/></xsl:apply-templates> 201 </xsl:if> 202 </xsl:template> 203 238 </xsl:template> 204 239 205 240 </xsl:stylesheet> -
greenstone3/trunk/web/interfaces/oran/transform/util.xsl
r19856 r19988 1 1 <?xml version="1.0" encoding="UTF-8"?> 2 <xsl:stylesheet version="1.0" 3 xmlns:xsl="http://www.w3.org/1999/XSL/Transform" 2 <xsl:stylesheet version="1.0" 3 xmlns:xsl="http://www.w3.org/1999/XSL/Transform" 4 4 xmlns:gslib="http://www.greenstone.org/XSL/Library" 5 5 xmlns:util="http://org.greenstone.gsdl3.util.XSLTUtil" … … 9 9 <xsl:param name="interface_name"/> 10 10 <xsl:param name="library_name"/> 11 11 12 12 <!-- every pages ....................................................................... --> 13 13 <xsl:template name="siteName"><xsl:value-of select="/page/pageResponse/metadataList/metadata[@name='siteName']"/></xsl:template> 14 <xsl:template name="siteLink"><a href="./"><xsl:call-template name="siteName"/></a></xsl:template> 15 14 16 <xsl:variable name="a"><xsl:value-of select="/page/pageRequest/paramList/param[@name='a']/@value"/> </xsl:variable> 15 17 <xsl:variable name="collections" select="/page/pageResponse/collectionList/collection"/> … … 18 20 <xsl:variable name="berryBasketOn" select="/page/pageRequest/paramList/param[@name='berrybasket' and @value='on']"/> 19 21 20 22 <!-- template to get the name of the current collection --> 23 <xsl:template name="collectionName"> 24 <xsl:choose> 25 <xsl:when test="/page/pageResponse/collection"><xsl:value-of select="/page/pageResponse/collection/displayItem[@name='name']"/></xsl:when> 26 <xsl:otherwise>All Collections</xsl:otherwise> 27 </xsl:choose> 28 </xsl:template> 29 30 <xsl:template name="collectionNameShort"> 31 <xsl:value-of select="/page/pageResponse/collection/@name"/> 32 </xsl:template> 33 34 <xsl:template name="collectionNameLinked"> 35 <xsl:choose> 36 <xsl:when test="/page/pageResponse/collection"> 37 <a> 38 <xsl:attribute name="href"><xsl:call-template name="siteURL"/><xsl:value-of select="$library_name"/>?a=p&sa=about&c=<xsl:call-template name="collectionNameShort"/></xsl:attribute> 39 <xsl:call-template name="collectionName"/> 40 </a> 41 </xsl:when> 42 <xsl:otherwise> 43 <a> 44 <xsl:attribute name="href"><xsl:call-template name="siteURL"/></xsl:attribute> 45 All Collections 46 </a> 47 </xsl:otherwise> 48 </xsl:choose> 49 </xsl:template> 50 51 <!-- text to get the name of the current service ("Browse","Search" etc) --> 52 <xsl:template name="serviceName"> 53 <xsl:value-of select="/page/pageResponse/service/displayItem[@name='name']"/> 54 </xsl:template> 55 21 56 <xsl:template name="textDirectionAttribute"> 22 57 <xsl:attribute name="dir"> … … 24 59 <xsl:when test="/page/@lang='ar' or /page/@lang='fa' or /page/@lang='he' or /page/@lang='ur' or /page/@lang='ps' or /page/@lang='prs'">rtl</xsl:when> 25 60 <xsl:otherwise>ltr</xsl:otherwise> 26 </xsl:choose> 61 </xsl:choose> 27 62 </xsl:attribute> 28 </xsl:template> 29 63 </xsl:template> 64 65 <xsl:template name="actionClass"> 66 <xsl:attribute name="class"><xsl:value-of select="/page/pageRequest/@action"/>Action <xsl:if test="/page/pageRequest/@subaction"><xsl:value-of select="/page/pageRequest/@subaction"/>Subaction</xsl:if></xsl:attribute> 67 </xsl:template> 68 69 <!-- username, if logged in --> 70 <!-- 71 <xsl:template name="username"> 72 <xsl:if test="$un_s!=''"> 73 <xsl:if test="$asn!='' and $asn!='0'"> 74 <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'authen.username')"/> : <xsl:value-of select="$un_s"/> 75 </xsl:if> 76 </xsl:if> 77 </xsl:template> 78 --> 79 30 80 <xsl:template name="defaultDividerBar"> 31 81 <xsl:param name='text'/> … … 37 87 <div class="divbar"><xsl:text disable-output-escaping="yes">&nbsp;</xsl:text></div> 38 88 </xsl:otherwise> 39 </xsl:choose> 89 </xsl:choose> 40 90 </xsl:template> 41 42 91 92 43 93 <xsl:template match="error"> 44 94 Error: <xsl:value-of select="."/> 45 95 </xsl:template> 46 47 96 97 48 98 <xsl:template name="displayErrorsIfAny"> 49 99 <xsl:if test="descendant::error"> … … 67 117 removeAllChildren(hide_link); 68 118 hide_link.appendChild(document.createTextNode("</xsl:text><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'show_error')"/><xsl:text disable-output-escaping="yes">")); 69 } 119 } 70 120 } 71 121 </xsl:text> … … 85 135 86 136 <xsl:template name="poweredByGS3TextBar"> 87 <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'gs3power')"/> 88 </xsl:template> 89 90 137 <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'gs3power')"/> 138 </xsl:template> 139 140 <xsl:template name="rightArrow"><xsl:text disable-output-escaping="yes"> &raquo; </xsl:text></xsl:template> 141 142 143 91 144 <!-- site home ....................................................................... --> 92 145 … … 100 153 <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'home.select_a_collection')"/> 101 154 </xsl:template> 102 103 104 155 <xsl:template name="crossCollectionQuickSearchForm"> 105 156 <xsl:apply-templates select="serviceList/service[@name='TextQuery']"/> 106 </xsl:template> 157 </xsl:template> 107 158 108 159 <xsl:template match="service[@name='TextQuery']"> … … 127 178 </xsl:when> 128 179 <xsl:otherwise> 129 <a href="{$library_name}?a=p&sa=about&c={@name}"> 180 <a href="{$library_name}?a=p&sa=about&c={@name}"> 130 181 <xsl:value-of select="displayItem[@name='name']"/> 131 182 </a> 132 183 </xsl:otherwise> 133 </xsl:choose> 184 </xsl:choose> 134 185 </xsl:template> 135 186 … … 137 188 <xsl:template name="serviceClusterList"> 138 189 <xsl:apply-templates select="serviceClusterList"/> 139 </xsl:template> 190 </xsl:template> 140 191 141 192 <xsl:template match="serviceClusterList"> 142 <xsl:for-each select="serviceCluster"> 193 <xsl:for-each select="serviceCluster"> 143 194 <a href="{$library_name}?a=p&sa=about&c={@name}"><xsl:value-of select='@name'/><xsl:value-of select="displayItem[@name='name']"/></a> 144 195 </xsl:for-each> 145 196 </xsl:template> 146 197 147 148 <xsl:template name="serviceLink"> 149 <a href="{$library_name}?a=q&rt=d&s={@name}"><xsl:value-of select="displayItem[@name='name']"/></a><xsl:value-of select="displayItem[@name='description']"/> 150 </xsl:template> 151 152 198 199 <xsl:template name="serviceLink"> 200 <div class="paramLabel"><a href="{$library_name}?a=q&rt=d&s={@name}"><xsl:value-of select="displayItem[@name='name']"/></a></div> 201 <div class="paramValue"><xsl:value-of select="displayItem[@name='description']"/></div> 202 <br class="clear"/> 203 </xsl:template> 204 205 153 206 <xsl:template name="authenticationLink"> 154 207 <xsl:for-each select="serviceList/service[@type='authen']"> 155 208 <li><a href="{$library_name}?a=g&rt=r&sa=authen&s={@name}&s1.aup=Login&s1.un=&s1.asn="><xsl:value-of select="displayItem[@name='name']"/></a><xsl:value-of select="displayItem[@name='description']"/></li></xsl:for-each> 156 </xsl:template> 157 158 209 </xsl:template> 159 210 <xsl:template name="libraryInterfaceLink"> 160 211 <li><a href="{$library_name}?a=p&sa=gli4gs3"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'home.librarian_interface')"/></a></li> 161 </xsl:template> 162 163 212 </xsl:template> 164 213 <xsl:template name="greenstoneLogoAlternateText"> 165 214 <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'gsdl')"/> … … 224 273 225 274 226 <xsl:template name="preferencesButtonTop"> 227 <xsl:choose> 228 <xsl:when test="$pageType='pref'"> 229 <li><a><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'pref_b')"/></a></li> 230 </xsl:when> 231 <xsl:otherwise> 232 <li><a href="{$library_name}?a=p&sa=pref&c={$collName}"><xsl:attribute name="title"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'pref_tip')"/></xsl:attribute> 233 <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'pref_b')"/> 234 </a></li> 235 </xsl:otherwise> 236 </xsl:choose> 237 </xsl:template> 238 239 <xsl:template name="servicesNavigationBar"> 240 <xsl:for-each select="$this-element/serviceList/service"> 241 <xsl:variable name="action"><xsl:choose> 242 <xsl:when test="@name=$this-service">CURRENT</xsl:when> 243 <xsl:when test="@type='query'">q</xsl:when> 244 <xsl:when test="@type='browse'">b</xsl:when> 245 <xsl:when test="@type='process'">pr</xsl:when> 246 <xsl:when test="@type='applet'">a</xsl:when> 247 <xsl:otherwise>DO_NOT_DISPLAY</xsl:otherwise> 248 </xsl:choose></xsl:variable> 249 <xsl:choose> 250 <xsl:when test="$action='CURRENT'"> 251 <li><a><xsl:value-of select="displayItem[@name='name']"/></a></li> 252 </xsl:when> 253 <xsl:when test="$action !='DO_NOT_DISPLAY'"> 254 <li><a href="{$library_name}?a={$action}&rt=d&s={@name}&c={$collName}"><xsl:if test="displayItem[@name='description']"><xsl:attribute name='title'><xsl:value-of select="displayItem[@name='description']"/></xsl:attribute></xsl:if><xsl:value-of select="displayItem[@name='name']"/></a></li> 255 </xsl:when> 256 </xsl:choose> 257 </xsl:for-each> 258 </xsl:template> 259 260 261 <xsl:template name="collectionDescriptionTextAndServicesLinks"> 262 <xsl:apply-templates select="pageResponse/collection|serviceCluster"/> 263 </xsl:template> 264 265 <xsl:template match="collection|serviceCluster"> 266 <xsl:value-of select="displayItem[@name='description']" disable-output-escaping="yes"/> 267 268 <xsl:apply-templates select="serviceList"> 269 <xsl:with-param name="collName" select="$collName"/> 270 </xsl:apply-templates> 271 </xsl:template> 272 273 274 <xsl:template match="serviceList"> 275 <xsl:param name="collName"/> 276 <h3><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'about.services')"/></h3> 277 <xsl:choose> 278 <xsl:when test="service"> 279 <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'about.servicehelp')"/> 280 </xsl:when> 281 <xsl:otherwise> 282 <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'about.noservices')"/> 283 </xsl:otherwise> 284 </xsl:choose> 285 286 287 <xsl:if test="service"> 288 <ul id="servicelist"> 289 <xsl:for-each select="service"> 290 <xsl:variable name="action"><xsl:choose> 291 <xsl:when test="@type='query'">q</xsl:when> 292 <xsl:when test="@type='browse'">b</xsl:when> 293 <xsl:when test="@type='process'">pr</xsl:when> 294 <xsl:when test="@type='applet'">a</xsl:when> 295 <xsl:otherwise>DO_NOT_DISPLAY</xsl:otherwise> 296 </xsl:choose></xsl:variable> 297 <xsl:if test="$action !='DO_NOT_DISPLAY'"> 298 <li><a href="{$library_name}?a={$action}&rt=d&s={@name}&c={$collName}"><xsl:value-of select="displayItem[@name='name']"/></a><xsl:value-of select="displayItem[@name='description']"/></li> 299 </xsl:if> 300 </xsl:for-each> 301 </ul> 302 </xsl:if> 303 </xsl:template> 275 <xsl:template name="preferencesButtonTop"> 276 <xsl:choose> 277 <xsl:when test="$pageType='pref'"> 278 <li><a><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'pref_b')"/></a></li> 279 </xsl:when> 280 <xsl:otherwise> 281 <li><a href="{$library_name}?a=p&sa=pref&c={$collName}"><xsl:attribute name="title"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'pref_tip')"/></xsl:attribute> 282 <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'pref_b')"/> 283 </a></li> 284 </xsl:otherwise> 285 </xsl:choose> 286 </xsl:template> 287 288 <xsl:template name="servicesNavigationBar"> 289 <xsl:for-each select="$this-element/serviceList/service"> 290 <xsl:variable name="action"><xsl:choose> 291 <xsl:when test="@name=$this-service">CURRENT</xsl:when> 292 <xsl:when test="@type='query'">q</xsl:when> 293 <xsl:when test="@type='browse'">b</xsl:when> 294 <xsl:when test="@type='process'">pr</xsl:when> 295 <xsl:when test="@type='applet'">a</xsl:when> 296 <xsl:otherwise>DO_NOT_DISPLAY</xsl:otherwise> 297 </xsl:choose></xsl:variable> 298 <xsl:choose> 299 <xsl:when test="$action='CURRENT'"> 300 <li><a><xsl:value-of select="displayItem[@name='name']"/></a></li> 301 </xsl:when> 302 <xsl:when test="$action !='DO_NOT_DISPLAY'"> 303 <li><a href="{$library_name}?a={$action}&rt=d&s={@name}&c={$collName}"><xsl:if test="displayItem[@name='description']"><xsl:attribute name='title'><xsl:value-of select="displayItem[@name='description']"/></xsl:attribute></xsl:if><xsl:value-of select="displayItem[@name='name']"/></a></li> 304 </xsl:when> 305 </xsl:choose> 306 </xsl:for-each> 307 </xsl:template> 308 309 310 <xsl:template name="collectionDescriptionTextAndServicesLinks"> 311 <xsl:apply-templates select="pageResponse/collection|serviceCluster"/> 312 </xsl:template> 313 314 <xsl:template match="collection|serviceCluster"> 315 <xsl:value-of select="displayItem[@name='description']" disable-output-escaping="yes"/> 316 <xsl:apply-templates select="serviceList"> 317 <xsl:with-param name="collName" select="$collName"/> 318 </xsl:apply-templates> 319 </xsl:template> 320 321 322 <xsl:template match="serviceList"> 323 <xsl:param name="collName"/> 324 <h3><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'about.services')"/></h3> 325 <p> 326 <xsl:choose> 327 <xsl:when test="service"> 328 <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'about.servicehelp')"/> 329 </xsl:when> 330 <xsl:otherwise> 331 <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'about.noservices')"/> 332 </xsl:otherwise> 333 </xsl:choose> 334 </p> 335 336 <xsl:if test="service"> 337 <div id="servicelist"> 338 <xsl:for-each select="service"> 339 <xsl:sort select="position()" order="descending" data-type="number"/> 340 341 <xsl:variable name="action"><xsl:choose> 342 <xsl:when test="@type='query'">q</xsl:when> 343 <xsl:when test="@type='browse'">b</xsl:when> 344 <xsl:when test="@type='process'">pr</xsl:when> 345 <xsl:when test="@type='applet'">a</xsl:when> 346 <xsl:otherwise>DO_NOT_DISPLAY</xsl:otherwise> 347 </xsl:choose></xsl:variable> 348 <xsl:if test="$action != 'DO_NOT_DISPLAY'"> 349 <div class="paramLabel"><a href="{$library_name}?a={$action}&rt=d&s={@name}&c={$collName}"><xsl:value-of select="displayItem[@name='name']"/></a></div> 350 <div class="paramLabel"><xsl:value-of select="displayItem[@name='description']"/></div> 351 <br class="clear"/> 352 </xsl:if> 353 </xsl:for-each> 354 </div> 355 </xsl:if> 356 </xsl:template> 304 357 305 358 306 359 307 360 <!-- classifier page ............................................................................ --> 308 <xsl:template name="collectionName"> 309 <xsl:value-of select="/page/pageResponse/collection/displayItem[@name='name']"/> 310 </xsl:template> 311 312 <xsl:template name="collectionShortName"> 313 <xsl:value-of select="/page/pageResponse/collection/@name"/> 314 </xsl:template> 361 315 362 316 363 <xsl:template name="navigationTab"> … … 351 398 </xsl:template> 352 399 400 <!-- query page ............................................................................ --> 401 402 <xsl:template name="indexName"> 403 <xsl:value-of select="/page/pageResponse/service/displayItem[@name='name']"/> 404 </xsl:template> 405 406 <xsl:template name="queryPageCollectionName"> 407 <xsl:choose><xsl:when test="/page/pageResponse/collection"><gslib:aboutCollectionPageTitle/></xsl:when><xsl:otherwise>Cross-Collection</xsl:otherwise></xsl:choose> 408 </xsl:template> 409 410 411 412 413 353 414 <!-- 354 415 BERRY BASKET TEMPLATES … … 382 443 <script type="text/javascript" src="interfaces/{$interface_name}/js/ygDDOnTop.js"><xsl:text> </xsl:text></script> 383 444 <script type="text/javascript" src="interfaces/{$interface_name}/js/berrybasket.js"><xsl:text> </xsl:text></script> 384 <link rel="stylesheet" href="interfaces/{$interface_name}/style/berry.css" type="text/css"/> 445 <link rel="stylesheet" href="interfaces/{$interface_name}/style/berry.css" type="text/css"/> 385 446 </xsl:template> 386 447 … … 445 506 446 507 447 448 508 </xsl:stylesheet>
Note:
See TracChangeset
for help on using the changeset viewer.