Changeset 24115
- Timestamp:
- 2011-06-07T16:28:15+12:00 (12 years ago)
- Location:
- main/trunk/greenstone3/web/interfaces
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
main/trunk/greenstone3/web/interfaces/default/transform/classifier.xsl
r23972 r24115 73 73 <!-- <xsl:variable name="tok" select="fn:tokenize($fmt,'/s+')"/> --> 74 74 75 75 <!--<div id="format"> 76 76 <p> 77 77 <b>Format string here</b> 78 78 <i> 79 <xsl:value-of select="$fmt"/> 79 <xsl:value-of select="$fmt"/>--> 80 80 <!-- <xsl:value-of select="$tok"/> --> 81 < /i>81 <!--</i> 82 82 </p> 83 </div> 83 </div>--> 84 84 <!-- </xsl:if> --> 85 85 -
main/trunk/greenstone3/web/interfaces/oran/style/core.css
r24052 r24115 422 422 423 423 424 #results .document a { background-image: url('../images/book.png'); } 424 /*#results .document a { background-image: url('../images/book.png'); }*/ 425 425 #results .document a:visited { background-image: url('../images/book-visited.png'); color: #999; } 426 426 #results .shelf>a { background-image: url('../images/bookshelf.png'); } -
main/trunk/greenstone3/web/interfaces/oran/transform/config_format.xsl
r20193 r24115 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:xslt="output.xsl" 5 xmlns:java="http://xml.apache.org/xslt/java" 6 xmlns:gsf="http://www.greenstone.org/greenstone3/schema/ConfigFormat" 7 xmlns:util="xalan://org.greenstone.gsdl3.util.XSLTUtil" 8 extension-element-prefixes="java"> 9 10 <xsl:output method="xml"/> 11 <xsl:namespace-alias 12 stylesheet-prefix="xslt" result-prefix="xsl"/> 13 14 <xsl:template match="format"> 15 <format> 16 <xsl:apply-templates/> 17 </format> 18 </xsl:template> 19 20 <xsl:template match="gsf:template"> 21 <xslt:template> 22 <xsl:copy-of select="@*"/> 23 <xsl:attribute name="priority">2</xsl:attribute> 24 <xsl:if test=".//gsf:link"> 25 <xslt:param name="serviceName"/> 26 <xslt:param name="collName"/> 27 </xsl:if> 28 <xsl:apply-templates/> 29 </xslt:template> 30 </xsl:template> 31 32 <xsl:template match="gsf:link"> 33 <xsl:choose> 34 <xsl:when test="@type='classifier'"> 35 <a><xslt:attribute name='href'><xslt:value-of select='$library_name'/>?a=b&rt=r&s=<xslt:value-of select='$serviceName'/>&c=<xslt:value-of select='$collName'/>&cl=<xslt:value-of select='@nodeID'/><xslt:if test="classifierNode|documentNode">.pr</xslt:if><xslt:if test="parent::node()[@orientation='horizontal']">&sib=1</xslt:if></xslt:attribute> 36 <xsl:apply-templates/> 37 </a> 38 </xsl:when> 39 <xsl:otherwise> <!-- a document link --> 40 <xslt:variable name="bookswitch"><xslt:value-of select="/page/pageRequest/paramList/param[@name='book']/@value"/></xslt:variable> 41 <xslt:choose> 42 <xslt:when test="$bookswitch = 'on' or $bookswitch = 'flashxml'"> 43 <a><xslt:attribute name="href"><xslt:value-of select='$library_name'/>?a=d&ed=1&book=on&c=<xslt:value-of select='$collName'/>&d=<xslt:value-of select='@nodeID'/>&dt=<xslt:value-of select='@docType'/><xslt:if test="@nodeType='leaf'">&sib=1</xslt:if>&p.a=<xslt:value-of select="/page/pageRequest/@action"/>&p.sa=<xsl:value-of select="/page/pageRequest/@subaction"/>&p.s=<xslt:value-of select="$serviceName"/></xslt:attribute><xsl:apply-templates/></a> 44 </xslt:when> 45 <xslt:otherwise> 46 <a><xslt:attribute name="href"><xslt:value-of select='$library_name'/>?a=d&book=off&c=<xslt:value-of select='$collName'/>&d=<xslt:value-of select='@nodeID'/>&dt=<xslt:value-of select='@docType'/><xslt:if test="@nodeType='leaf'">&sib=1</xslt:if>&p.a=<xslt:value-of select="/page/pageRequest/@action"/>&p.sa=<xsl:value-of select="/page/pageRequest/@subaction"/>&p.s=<xslt:value-of select="$serviceName"/></xslt:attribute><xsl:apply-templates/></a> 47 </xslt:otherwise> 48 </xslt:choose> 49 </xsl:otherwise> 50 </xsl:choose> 51 </xsl:template> 52 53 <xsl:template match="gsf:icon"> 54 <xsl:choose> 55 <xsl:when test="@type='classifier'"> 56 <img border="0" width="20" height="16" 57 src="interfaces/default/images/bshelf.gif" /> 58 <!--xslt:call-template name="bookshelfimg"/>--> 59 </xsl:when> 60 <xsl:otherwise> 61 <xslt:apply-templates select="." mode="displayNodeIcon"/> 62 </xsl:otherwise> 63 </xsl:choose> 64 </xsl:template> 65 66 <xsl:template match="gsf:metadata[@format]"> 67 <xslt:value-of disable-output-escaping="yes"><xsl:attribute name="select">java:org.greenstone.gsdl3.util.XSLTUtil.<xsl:value-of select="@format"/>(metadataList/metadata[@name='<xsl:apply-templates select="." mode="get-metadata-name"/>'], /page/@lang )</xsl:attribute></xslt:value-of> 68 </xsl:template> 69 70 <xsl:template match="gsf:metadata"> 71 <xslt:value-of disable-output-escaping="yes"><xsl:attribute name="select">metadataList/metadata[@name='<xsl:apply-templates select="." mode="get-metadata-name"/>']</xsl:attribute></xslt:value-of> 72 </xsl:template> 73 74 <xsl:template match="gsf:metadata" mode="get-metadata-name"> 75 <xsl:if test="@multiple='true'">all_</xsl:if><xsl:if test='@select'><xsl:value-of select='@select'/>_</xsl:if><xsl:if test="@separator">*<xsl:value-of select='@separator'/>*_</xsl:if><xsl:value-of select="@name"/> 76 </xsl:template> 77 78 <xsl:template match="gsf:metadata-old"> 79 <xslt:value-of disable-output-escaping="yes"><xsl:attribute name="select">metadataList/metadata[@name="<xsl:choose><xsl:when test="@select='parent'">parent_</xsl:when><xsl:when test="@select='root'">root_</xsl:when><xsl:when test="@select='ancestors'">ancestors'<xsl:value-of select='@separator'/>'_</xsl:when><xsl:when test="@select='siblings'">siblings_'<xsl:value-of select='@separator'/>'_</xsl:when></xsl:choose><xsl:value-of select="@name"/>"]</xsl:attribute></xslt:value-of> 80 </xsl:template> 81 82 <xsl:template match="gsf:text"> 83 <xslt:apply-templates select="nodeContent"/> 84 </xsl:template> 85 86 <xsl:template match="gsf:choose-metadata"> 87 <xslt:choose> 88 <xsl:for-each select="gsf:metadata"> 89 <xslt:when><xsl:attribute name="test">metadataList/metadata[@name='<xsl:apply-templates select="." mode="get-metadata-name"/>']</xsl:attribute> 90 <xsl:apply-templates select="."/> 91 </xslt:when> 92 </xsl:for-each> 93 <xsl:if test="gsf:default"> 94 <xslt:otherwise><xsl:apply-templates select="gsf:default"/></xslt:otherwise> 95 </xsl:if> 96 </xslt:choose> 97 </xsl:template> 98 99 <xsl:template match="gsf:switch"> 100 <xsl:variable name="meta-name"><xsl:apply-templates select="gsf:metadata" mode="get-metadata-name"/></xsl:variable> 101 <xslt:variable name="meta"><xsl:choose><xsl:when test="@preprocess"><xslt:value-of select="util:{@preprocess}(metadataList/metadata[@name='{$meta-name}'])"/></xsl:when><xsl:otherwise><xslt:value-of select="metadataList/metadata[@name='{$meta-name}']"/></xsl:otherwise></xsl:choose></xslt:variable> 102 <xslt:choose> 103 <xsl:for-each select="gsf:when"> 104 <xslt:when test="util:{@test}($meta, '{@test-value}')"> 105 <xsl:apply-templates/> 106 </xslt:when> 107 </xsl:for-each> 108 <xsl:if test="gsf:otherwise"> 109 <xslt:otherwise> 110 <xsl:apply-templates select="gsf:otherwise/node()"/> 111 </xslt:otherwise> 112 </xsl:if> 113 </xslt:choose> 114 </xsl:template> 115 116 <xsl:template match="*"> 117 <xsl:copy> 118 <xsl:copy-of select="@*"/> 119 <xsl:apply-templates/> 120 </xsl:copy> 121 </xsl:template> 3 xmlns:xsl="http://www.w3.org/1999/XSL/Transform" 4 xmlns:xslt="output.xsl" 5 xmlns:java="http://xml.apache.org/xslt/java" 6 xmlns:gsf="http://www.greenstone.org/greenstone3/schema/ConfigFormat" 7 xmlns:util="xalan://org.greenstone.gsdl3.util.XSLTUtil" 8 extension-element-prefixes="java"> 9 10 <xsl:output method="xml"/> 11 <xsl:namespace-alias stylesheet-prefix="xslt" result-prefix="xsl"/> 12 13 <xsl:template match="format"> 14 <format> 15 <xsl:apply-templates/> 16 </format> 17 </xsl:template> 18 19 <xsl:template match="gsf:template"> 20 <xslt:template> 21 <xsl:copy-of select="@*"/> 22 <xsl:attribute name="priority">2</xsl:attribute> 23 <xsl:if test=".//gsf:link"> 24 <xslt:param name="serviceName"/> 25 <xslt:param name="collName"/> 26 </xsl:if> 27 <xsl:apply-templates/> 28 </xslt:template> 29 </xsl:template> 30 31 <xsl:template match="gsf:link"> 32 <xsl:choose> 33 <xsl:when test="@type='classifier'"> 34 <a> 35 <xslt:attribute name='href'> 36 <xslt:value-of select='$library_name'/> 37 <xsl:text>?a=b&rt=r&s=</xsl:text> 38 <xslt:value-of select='/page/pageResponse/service/@name'/> 39 <xsl:text>&c=</xsl:text> 40 <xslt:value-of select='/page/pageResponse/collection/@name'/> 41 <xsl:text>&cl=</xsl:text> 42 <xslt:value-of select='@nodeID'/> 43 <xslt:if test="classifierNode|documentNode"> 44 <xsl:text>.pr</xsl:text> 45 </xslt:if> 46 <xslt:if test="parent::node()[@orientation='horizontal']"> 47 <xsl:text>&sib=1</xsl:text> 48 </xslt:if> 49 </xslt:attribute> 50 <xsl:apply-templates/> 51 </a> 52 </xsl:when> 53 <xsl:otherwise> <!-- a document link --> 54 <xslt:variable name="bookswitch"> 55 <xslt:value-of select="/page/pageRequest/paramList/param[@name='book']/@value"/> 56 </xslt:variable> 57 <xslt:choose> 58 <xslt:when test="$bookswitch = 'on' or $bookswitch = 'flashxml'"> 59 <a> 60 <xslt:attribute name="href"> 61 <xslt:value-of select='$library_name'/> 62 <xsl:text>?a=d&ed=1&book=on&c=</xsl:text> 63 <xslt:value-of select='/page/pageResponse/collection/@name'/> 64 <xsl:text>&d=</xsl:text> 65 <xslt:value-of select='@nodeID'/> 66 <xsl:text>&dt=</xsl:text> 67 <xslt:value-of select='@docType'/> 68 <xslt:if test="@nodeType='leaf'"> 69 <xsl:text>&sib=1</xsl:text> 70 </xslt:if> 71 <xsl:text>&p.a=</xsl:text> 72 <xslt:value-of select="/page/pageRequest/@action"/> 73 <xsl:text>&p.sa=</xsl:text> 74 <xsl:value-of select="/page/pageRequest/@subaction"/> 75 <xsl:text>&p.s=</xsl:text> 76 <xslt:value-of select="/page/pageResponse/service/@name"/> 77 </xslt:attribute> 78 <xsl:apply-templates/> 79 </a> 80 </xslt:when> 81 <xslt:otherwise> 82 <a> 83 <xslt:attribute name="href"> 84 <xslt:value-of select='$library_name'/> 85 <xsl:text>?a=d&ed=1&book=off&c=</xsl:text> 86 <xslt:value-of select='/page/pageResponse/collection/@name'/> 87 <xsl:text>&d=</xsl:text> 88 <xslt:value-of select='@nodeID'/> 89 <xsl:text>&dt=</xsl:text> 90 <xslt:value-of select='@docType'/> 91 <xslt:if test="@nodeType='leaf'"> 92 <xsl:text>&sib=1</xsl:text> 93 </xslt:if> 94 <xsl:text>&p.a=</xsl:text> 95 <xslt:value-of select="/page/pageRequest/@action"/> 96 <xsl:text>&p.sa=</xsl:text> 97 <xsl:value-of select="/page/pageRequest/@subaction"/> 98 <xsl:text>&p.s=</xsl:text> 99 <xslt:value-of select="/page/pageResponse/service/@name"/> 100 </xslt:attribute> 101 <xsl:apply-templates/> 102 </a> 103 </xslt:otherwise> 104 </xslt:choose> 105 </xsl:otherwise> 106 </xsl:choose> 107 </xsl:template> 108 109 <xsl:template match="gsf:icon"> 110 <xsl:choose> 111 <xsl:when test="@type='classifier'"> 112 <img style="width:20px; height:16px; border:0px" src="util:getInterfaceText($interface_name, /page/@lang, 'bookshelf_image')" /> 113 </xsl:when> 114 <xsl:when test="@type='document'"> 115 <img style="width:20px; height:16px; border:0px" src="util:getInterfaceText($interface_name, /page/@lang, 'book_image')" /> 116 </xsl:when> 117 </xsl:choose> 118 </xsl:template> 119 120 <xsl:template match="gsf:metadata[@format]"> 121 <xslt:value-of disable-output-escaping="yes"> 122 <xsl:attribute name="select"> 123 <xsl:text>java:org.greenstone.gsdl3.util.XSLTUtil.</xsl:text> 124 <xsl:value-of select="@format"/> 125 <xsl:text>(metadataList/metadata[@name='</xsl:text> 126 <xsl:apply-templates select="." mode="get-metadata-name"/> 127 <xsl:text>'], /page/@lang )</xsl:text> 128 </xsl:attribute> 129 </xslt:value-of> 130 </xsl:template> 131 132 <xsl:template match="gsf:metadata"> 133 <xslt:value-of disable-output-escaping="yes"> 134 <xsl:attribute name="select"> 135 <xsl:text>metadataList/metadata[@name='</xsl:text> 136 <xsl:apply-templates select="." mode="get-metadata-name"/> 137 <xsl:text>']</xsl:text> 138 </xsl:attribute> 139 </xslt:value-of> 140 </xsl:template> 141 142 <xsl:template match="gsf:metadata" mode="get-metadata-name"> 143 <xsl:if test="@multiple='true'"> 144 <xsl:text>all_</xsl:text> 145 </xsl:if> 146 <xsl:if test='@select'> 147 <xsl:value-of select='@select'/> 148 <xsl:text>_</xsl:text> 149 </xsl:if> 150 <xsl:if test="@separator"> 151 <xsl:text>*</xsl:text> 152 <xsl:value-of select='@separator'/> 153 <xsl:text>*_</xsl:text> 154 </xsl:if> 155 <xsl:value-of select="@name"/> 156 </xsl:template> 157 158 <xsl:template match="gsf:metadata-old"> 159 <xslt:value-of disable-output-escaping="yes"> 160 <xsl:attribute name="select"> 161 <xsl:text>metadataList/metadata[@name="</xsl:text> 162 <xsl:choose> 163 <xsl:when test="@select='parent'"> 164 <xsl:text>parent_</xsl:text> 165 </xsl:when> 166 <xsl:when test="@select='root'"> 167 <xsl:text>root_</xsl:text> 168 </xsl:when> 169 <xsl:when test="@select='ancestors'"> 170 <xsl:text>ancestors'</xsl:text> 171 <xsl:value-of select='@separator'/> 172 <xsl:text>'_</xsl:text> 173 </xsl:when> 174 <xsl:when test="@select='siblings'"> 175 <xsl:text>siblings_'</xsl:text> 176 <xsl:value-of select='@separator'/> 177 <xsl:text>'_</xsl:text> 178 </xsl:when> 179 </xsl:choose> 180 <xsl:value-of select="@name"/> 181 <xsl:text>"]</xsl:text> 182 </xsl:attribute> 183 </xslt:value-of> 184 </xsl:template> 185 186 <xsl:template match="gsf:text"> 187 <xslt:apply-templates select="nodeContent"/> 188 </xsl:template> 189 190 <xsl:template match="gsf:choose-metadata"> 191 <xslt:choose> 192 <xsl:for-each select="gsf:metadata"> 193 <xslt:when> 194 <xsl:attribute name="test">metadataList/metadata[@name='<xsl:apply-templates select="." mode="get-metadata-name"/>']</xsl:attribute> 195 <xsl:apply-templates select="."/> 196 </xslt:when> 197 </xsl:for-each> 198 <xsl:if test="gsf:default"> 199 <xslt:otherwise><xsl:apply-templates select="gsf:default"/></xslt:otherwise> 200 </xsl:if> 201 </xslt:choose> 202 </xsl:template> 203 204 <xsl:template match="gsf:switch"> 205 <xsl:variable name="meta-name"><xsl:apply-templates select="gsf:metadata" mode="get-metadata-name"/></xsl:variable> 206 <xslt:variable name="meta"><xsl:choose><xsl:when test="@preprocess"><xslt:value-of select="util:{@preprocess}(metadataList/metadata[@name='{$meta-name}'])"/></xsl:when><xsl:otherwise><xslt:value-of select="metadataList/metadata[@name='{$meta-name}']"/></xsl:otherwise></xsl:choose></xslt:variable> 207 <xslt:choose> 208 <xsl:for-each select="gsf:when"> 209 <xslt:when test="util:{@test}($meta, '{@test-value}')"> 210 <xsl:apply-templates/> 211 </xslt:when> 212 </xsl:for-each> 213 <xsl:if test="gsf:otherwise"> 214 <xslt:otherwise> 215 <xsl:apply-templates select="gsf:otherwise/node()"/> 216 </xslt:otherwise> 217 </xsl:if> 218 </xslt:choose> 219 </xsl:template> 220 221 <xsl:template match="*"> 222 <xsl:copy> 223 <xsl:copy-of select="@*"/> 224 <xsl:apply-templates/> 225 </xsl:copy> 226 </xsl:template> 122 227 123 228 </xsl:stylesheet> -
main/trunk/greenstone3/web/interfaces/oran/transform/pages/classifier.xsl
r24018 r24115 34 34 the two templates at the bottom of this file 35 35 --> 36 <ul id="results"> 37 <xsl:apply-templates select="classifier/*"/> 38 </ul> 36 <table id="results"> 37 <xsl:for-each select="classifier/*"> 38 <tr> 39 <xsl:apply-templates select="."/> 40 </tr> 41 </xsl:for-each> 42 </table> 39 43 <div class="clear"><xsl:text> </xsl:text></div> 40 41 44 </xsl:template> 42 45 … … 45 48 TEMPLATE FOR DOCUMENTS 46 49 --> 47 <xsl:template match="documentNode" priority="3"> 48 49 <!-- show the document details --> 50 <li class="document"> 51 50 <xsl:template match="documentNode"> 51 <!-- The book icon --> 52 <td> 53 <img> 54 <xsl:attribute name="src"> 55 <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'book_image')"/> 56 </xsl:attribute> 57 </img> 58 </td> 59 <!-- The document link --> 60 <td> 52 61 <a> 53 62 <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"/>&ed=1</xsl:attribute> 54 63 <xsl:value-of disable-output-escaping="yes" select="metadataList/metadata[@name='Title']"/> 55 64 </a> 65 </td> 66 <!-- The berry (optional) --> 67 <td> 56 68 <xsl:call-template name="documentBerryForClassifierOrSearchPage"/> 57 58 </li> 59 69 </td> 60 70 </xsl:template> 61 71 … … 64 74 TEMPLATE FOR GROUPS OF DOCUMENTS 65 75 --> 66 <xsl:template match="classifierNode" priority="3">76 <xsl:template match="classifierNode"> 67 77 68 78 <table id="title{@nodeID}"><tr> … … 91 101 <!-- Show any documents or sub-groups in this group --> 92 102 <xsl:if test="documentNode|classifierNode"> 93 <div id="div{@nodeID}" class="classifierContainer" style="display:block;"> 94 <xsl:apply-templates select="documentNode|classifierNode"/> 103 <div id="div{@nodeID}" class="classifierContainer"> 104 <table> 105 <xsl:for-each select="documentNode|classifierNode"> 106 <tr> 107 <xsl:apply-templates select="."/> 108 </tr> 109 </xsl:for-each> 110 </table> 95 111 </div> 96 112 </xsl:if> … … 109 125 { 110 126 var divElem = document.getElementById("div" + sectionID); 111 if( divElem.style.display == "block")127 if(!divElem.style.display || divElem.style.display == "block") 112 128 { 113 129 return true; -
main/trunk/greenstone3/web/interfaces/oran/transform/pages/document.xsl
r24018 r24115 317 317 <xsl:if test="/page/pageResponse/collection[@name = $collName]/metadataList/metadata[@name = 'tidyoption'] = 'tidy'"> 318 318 <td> 319 <!-- old url = {$library_name}?a=d&c={$collName}&d={/page/pageResponse/document/documentNode[1]/@nodeID}&dt={/page/pageResponse/document/documentNode/@docType}&p.a=b&p.s={/page/pageResponse/service/@name}&book=on&ed=1 -->320 319 <img> 321 320 <xsl:attribute name="src"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'realistic_books_image')"/></xsl:attribute> … … 326 325 327 326 <!-- Highlight on/off button --> 328 <xsl:if test="/page/pageRequest/paramList/param[@name = 'p.a']/@value = 'q' ">327 <xsl:if test="/page/pageRequest/paramList/param[@name = 'p.a']/@value = 'q' and count(//annotation) > 0"> 329 328 <td> 330 329 <img>
Note:
See TracChangeset
for help on using the changeset viewer.