- Timestamp:
- 2006-11-15T11:03:38+13:00 (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gsdl3/web/interfaces/default/transform/document.xsl
r12152 r13267 57 57 </xsl:call-template> 58 58 </xsl:if> 59 59 60 <!-- display the document --> 61 <div class="document"> 60 62 <xsl:apply-templates select="document"> 61 63 <xsl:with-param name="collName" select="$collName"/> 62 64 </xsl:apply-templates> 63 < xsl:call-template name="dividerBar"/>65 </div> 64 66 </xsl:template> 65 67 66 68 <xsl:template match="document"> 67 <xsl:param name="collName"/> 69 <xsl:param name="collName"/> 70 68 71 <xsl:call-template name="documentHeading"> 69 72 <xsl:with-param name="collName" select="$collName"/> 70 73 </xsl:call-template> 74 71 75 <xsl:call-template name="documentArrows"> 72 76 <xsl:with-param name="collName" select="$collName"/> 77 </xsl:call-template> 78 <xsl:call-template name="documentContent"> 79 <xsl:with-param name="collName" select="$collName"/> 80 </xsl:call-template> 81 <xsl:call-template name="documentArrows"> 82 <xsl:with-param name="collName" select="$collName"/> 73 83 </xsl:call-template> 74 <xsl:call-template name="documentContent"> 75 <xsl:with-param name="collName" select="$collName"/> 76 </xsl:call-template> 77 <xsl:call-template name="documentArrows"> 78 <xsl:with-param name="collName" select="$collName"/> 79 </xsl:call-template> 80 </xsl:template> 84 </xsl:template> 81 85 82 86 <xsl:template name="documentHeading"> … … 88 92 <xsl:variable name="p.s" select="/page/pageRequest/paramList/param[@name='p.s']/@value"/> 89 93 <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> 90 <table><tr><td>94 <div class="documentheading"> 91 95 <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">Close this book and return to search/browse</xsl:with-param> 92 </xsl:call-template></a></td> 93 <td valign='top'><b><font size="+1">  94 <xsl:choose><xsl:when test="@docType='simple'"><xsl:value-of select="metadataList/metadata[@name='Title']" disable-output-escaping="yes"/></xsl:when><xsl:otherwise><xsl:value-of select="documentNode/metadataList/metadata[@name='Title']" disable-output-escaping="yes"/></xsl:otherwise></xsl:choose> 95 </font></b></td> 96 </tr></table> 97 98 <table cellpadding="10" cellspacing="0"> 99 <tr> 100 <td valign="top" align="left"> 101 <xsl:if test="string($doCoverImage) != 'false' and (@docType='paged' or @docType='hierarchy')"> 102 <xsl:call-template name="coverImage"/> 103 <p/> 104 </xsl:if> 105 106 <xsl:call-template name="documentButtons"> 107 <xsl:with-param name="collName" select="$collName"/> 108 </xsl:call-template> 109 <!--<xsl:call-template name="enrichServices"> 110 <xsl:with-param name="collName" select="$collName"/> 111 </xsl:call-template>--> 112 </td> 113 <xsl:if test="string($doTOC) != 'false'"> 114 <td valign="top" align="left"> 115 <xsl:call-template name="TOC"> 116 <xsl:with-param name="collName" select="$collName"/> 117 </xsl:call-template> 118 </td> 119 </xsl:if> 120 </tr> 121 </table> 122 </xsl:template> 96 </xsl:call-template></a> 97 <xsl:choose><xsl:when test="@docType='simple'"><xsl:value-of select="metadataList/metadata[@name='Title']" disable-output-escaping="yes"/></xsl:when><xsl:otherwise><xsl:value-of select="documentNode/metadataList/metadata[@name='Title']" disable-output-escaping="yes"/></xsl:otherwise></xsl:choose> 98 </div> 99 100 <div class="documentinfo"> 101 <div class="headingimage"> 102 <xsl:if test="string($doCoverImage) != 'false' and (@docType='paged' or @docType='hierarchy')"> 103 <xsl:call-template name="coverImage"/> 104 </xsl:if> 105 </div> 106 107 <div class="docbuttons" > 108 <xsl:call-template name="documentButtons"> 109 <xsl:with-param name="collName" select="$collName"/> 110 </xsl:call-template> 111 </div> 112 </div> 113 <!--<div><xsl:call-template name="enrichServices"> 114 <xsl:with-param name="collName" select="$collName"/> 115 </xsl:call-template></div>--> 116 <xsl:if test="string($doTOC) != 'false'"> 117 <div class="toc"> 118 <xsl:call-template name="TOC"> 119 <xsl:with-param name="collName" select="$collName"/> 120 </xsl:call-template> 121 </div> 122 </xsl:if> 123 124 </xsl:template> 123 125 124 126 <xsl:template name="coverImage"> … … 133 135 <xsl:variable name="ed" select="/page/pageRequest/paramList/param[@name='ed']/@value"/> 134 136 135 <table>137 136 138 <!-- expand document --> 137 139 <!-- this doesn't work with MG so comment it out for now --> 138 140 139 <xsl:if test="@docType = 'hierarchy' or @docType = 'paged'"> 140 <tr><td class="gsbutton"> 141 <xsl:if test="@docType = 'hierarchy' or @docType = 'paged'"> 142 <div class="docbutton"> 143 <span class="docbutton"> 141 144 <xsl:choose><xsl:when test="string($ed)='1'"> 142 <a class="gsbutton"href="{$library_name}?a=d&d={$docID}&c={$collName}&sib={$sib}&ed=0"><xsl:attribute name="title"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'doc.contract_doc_tip')"/></xsl:attribute>143 < font size='-2'><xsl:value-of disable-output-escaping='yes' select="util:getInterfaceText($interface_name, /page/@lang, 'doc.contract_doc_b')"/></font>145 <a href="{$library_name}?a=d&d={$docID}&c={$collName}&sib={$sib}&ed=0"><xsl:attribute name="title"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'doc.contract_doc_tip')"/></xsl:attribute> 146 <xsl:value-of disable-output-escaping='yes' select="util:getInterfaceText($interface_name, /page/@lang, 'doc.contract_doc_b')"/> 144 147 </a> 145 148 </xsl:when> 146 149 <xsl:otherwise> 147 <a class="gsbutton"href="{$library_name}?a=d&d={$docID}&c={$collName}&sib={$sib}&ed=1"><xsl:attribute name="title"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'doc.expand_doc_tip')"/></xsl:attribute>148 <font size='-2'><xsl:value-of disable-output-escaping='yes' select="util:getInterfaceText($interface_name, /page/@lang, 'doc.expand_doc_b')"/></font>150 <a href="{$library_name}?a=d&d={$docID}&c={$collName}&sib={$sib}&ed=1"><xsl:attribute name="title"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'doc.expand_doc_tip')"/></xsl:attribute> 151 <xsl:value-of disable-output-escaping='yes' select="util:getInterfaceText($interface_name, /page/@lang, 'doc.expand_doc_b')"/> 149 152 </a> 150 153 </xsl:otherwise> 151 154 </xsl:choose> 152 </td></tr> 155 </span> 156 </div> 153 157 </xsl:if> 154 158 155 159 <!-- expand contents --> 156 160 <xsl:if test="@docType = 'hierarchy' and string(/page/pageResponse/format/gsf:option[@name='documentTOC']/@value) != 'false'"> 157 <tr><td class="gsbutton"> 161 <div class="docbutton"> 162 <span class="docbutton"> 158 163 <xsl:choose><xsl:when test="string($ec)='1'"> 159 <a class="gsbutton" href="{$library_name}?a=d&d={$docID}&c={$collName}&sib={$sib}&ec=0"><xsl:attribute name="title"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'doc.contract_contents_tip')"/></xsl:attribute> 160 <font size='-2'><xsl:value-of disable-output-escaping='yes' select="util:getInterfaceText($interface_name, /page/@lang, 'doc.contract_contents_b')"/></font> 161 </a> 164 <a href="{$library_name}?a=d&d={$docID}&c={$collName}&sib={$sib}&ec=0"><xsl:attribute name="title"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'doc.contract_contents_tip')"/></xsl:attribute> 165 <xsl:value-of disable-output-escaping='yes' select="util:getInterfaceText($interface_name, /page/@lang, 'doc.contract_contents_b')"/> </a> 162 166 </xsl:when> 163 167 <xsl:otherwise> 164 <a class="gsbutton"href="{$library_name}?a=d&d={$docID}&c={$collName}&sib={$sib}&ec=1"><xsl:attribute name="title"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'doc.expand_contents_tip')"/></xsl:attribute>165 <font size='-2'><xsl:value-of disable-output-escaping='yes' select="util:getInterfaceText($interface_name, /page/@lang, 'doc.expand_contents_b')"/></font>168 <a href="{$library_name}?a=d&d={$docID}&c={$collName}&sib={$sib}&ec=1"><xsl:attribute name="title"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'doc.expand_contents_tip')"/></xsl:attribute> 169 <xsl:value-of disable-output-escaping='yes' select="util:getInterfaceText($interface_name, /page/@lang, 'doc.expand_contents_b')"/> 166 170 </a> 167 171 </xsl:otherwise> 168 172 </xsl:choose> 169 </td></tr> 173 </span> 174 </div> 170 175 </xsl:if> 176 171 177 <!-- detach page --> 172 178 <xsl:variable name="paramList" select="/page/pageRequest/paramList"/> 173 < tr><td class="gsbutton">174 <a class="gsbutton" target="_blank"><xsl:attribute name="href"><xsl:value-of select="$library_name"/>?a=d&d=<xsl:value-of select="$docID"/>&c=<xsl:value-of select="$collName"/>&sib=<xsl:value-of select="$sib"/>&dt=<xsl:value-of select="$paramList/param[@name='dt']/@value"/>&ec=<xsl:value-of select="$paramList/param[@name='ec']/@value"/>&et=<xsl:value-of select="$paramList/param[@name='et']/@value"/>&p.a=<xsl:value-of select="$paramList/param[@name='p.a']/@value"/>&p.s=<xsl:value-of select="$paramList/param[@name='p.s']/@value"/>&p.sa=<xsl:value-of select="$paramList/param[@name='p.sa']/@value"/></xsl:attribute><xsl:attribute name="title"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'doc.detach_page_tip')"/></xsl:attribute>175 <font size='-2'><xsl:value-of disable-output-escaping='yes' select="util:getInterfaceText($interface_name, /page/@lang, 'doc.detach_page_b')"/></font>176 </a></td></tr>177 </table>178 </xsl:template>179 <div class="docbutton"> 180 <span class="docbutton"> 181 <a target="_blank"><xsl:attribute name="href"><xsl:value-of select="$library_name"/>?a=d&d=<xsl:value-of select="$docID"/>&c=<xsl:value-of select="$collName"/>&sib=<xsl:value-of select="$sib"/>&dt=<xsl:value-of select="$paramList/param[@name='dt']/@value"/>&ec=<xsl:value-of select="$paramList/param[@name='ec']/@value"/>&et=<xsl:value-of select="$paramList/param[@name='et']/@value"/>&p.a=<xsl:value-of select="$paramList/param[@name='p.a']/@value"/>&p.s=<xsl:value-of select="$paramList/param[@name='p.s']/@value"/>&p.sa=<xsl:value-of select="$paramList/param[@name='p.sa']/@value"/></xsl:attribute><xsl:attribute name="title"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'doc.detach_page_tip')"/></xsl:attribute> 182 <xsl:value-of disable-output-escaping='yes' select="util:getInterfaceText($interface_name, /page/@lang, 'doc.detach_page_b')"/> 183 </a></span></div> 184 </xsl:template> 179 185 180 186 <xsl:template name="TOC"> … … 205 211 <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> 206 212 <xsl:if test="documentNode[@nodeID]"> 207 < table>208 < tr valign='top'><td>213 <div class="tocnodes"> 214 <div class="tocnode"> 209 215 <xsl:choose><xsl:when test="string($oc)='0'"> 210 216 <a href="{$library_name}?a=d&c={$collName}&d={$d}&sib={$sib}&oc=1"><xsl:call-template name="closedfolderimg"><xsl:with-param name="title">open the table of contents</xsl:with-param></xsl:call-template></a> 211 217 </xsl:when> 212 218 <xsl:otherwise><a href="{$library_name}?a=d&c={$collName}&d={$d}&sib={$sib}&oc=0"><xsl:call-template name="openfolderimg"><xsl:with-param name="title">close the table of contents</xsl:with-param></xsl:call-template></a></xsl:otherwise></xsl:choose> 213 < /td><td>Table of Contents</td></tr>219 <span>Table of Contents</span> 214 220 <xsl:if test="string($oc)!='0'"> 215 <tr><td> </td><td> 216 <table> 217 <xsl:for-each select="documentNode/documentNode[@nodeID]"> 221 <xsl:for-each select="documentNode/documentNode[@nodeID]"> 218 222 <xsl:apply-templates select='.'><xsl:with-param name="collName" select="$collName"/><xsl:with-param name="ec" select="$ec"/><xsl:with-param name="p.a" select="$p.a"/><xsl:with-param name="p.s" select="$p.s"/><xsl:with-param name="p.sa" select="$p.sa"/><xsl:with-param name="p.c" select="$p.c"/></xsl:apply-templates> 219 223 </xsl:for-each> 220 </table> 221 </td></tr> 222 </xsl:if> 223 </table> 224 </xsl:if> 225 </div> 226 </div> 224 227 </xsl:if> 225 228 </xsl:template> … … 234 237 <xsl:param name="p.c"/> 235 238 <!-- Display the appropriate image, depending on the node type --> 236 <tr><td valign="top">239 <div class="tocnode"> 237 240 <a><xsl:attribute name="href"><xsl:value-of select='$library_name'/>?a=d&c=<xsl:value-of select='$collName'/>&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>&p.a=<xsl:value-of select="$p.a"/>&p.sa=<xsl:value-of select="$p.sa"/>&p.s=<xsl:value-of select="$p.s"/>&p.c=<xsl:value-of select="$p.c"/></xsl:attribute> 238 241 <xsl:apply-templates select="." mode="displayNodeIcon"/> 239 242 </a> 240 </td>241 243 242 244 <!-- Display associated title, bolded if the node has content --> 243 < td valign="top">245 <span> 244 246 <xsl:choose> 245 247 <xsl:when test="nodeContent"> 246 < b><xsl:value-of disable-output-escaping="yes" select="metadataList/metadata[@name='Title']"/></b>248 <xsl:value-of disable-output-escaping="yes" select="metadataList/metadata[@name='Title']"/> 247 249 </xsl:when> 248 250 <xsl:otherwise> … … 250 252 </xsl:otherwise> 251 253 </xsl:choose> 252 </td> 253 </tr> 254 </span> 254 255 <!-- Apply recursively to the children of this node --> 255 256 <xsl:if test="documentNode[@nodeID]"> 256 <tr><td> </td><td><table> 257 <xsl:apply-templates select="documentNode[@nodeID]"> 257 <xsl:apply-templates select="documentNode[@nodeID]"> 258 258 <xsl:with-param name="collName" select="$collName"/> 259 259 <xsl:with-param name="ec" select="$ec"/> … … 261 261 <!--<xsl:with-param name="depth" select="$depth + 1"/>--> 262 262 </xsl:apply-templates> 263 </table> 264 </td></tr> 265 </xsl:if> 263 </xsl:if> 264 </div> 266 265 </xsl:template> 267 266 268 267 <!-- default content is to print the title and content of any documentNodes that have nodeContent --> 269 268 <xsl:template name="documentContent"> 269 <div class="documenttext"> 270 270 <xsl:choose> 271 271 <xsl:when test="@docType='simple'"> … … 276 276 </xsl:otherwise> 277 277 </xsl:choose> 278 </div> 278 279 </xsl:template> 279 280 … … 423 424 <xsl:template name="documentArrows"> 424 425 <xsl:param name="collName"/> 425 <p> 426 <div class="documentarrows"> 427 <xsl:call-template name="documentArrow"> 428 <xsl:with-param name="collName" select="$collName"/> 429 <xsl:with-param name="direction">back</xsl:with-param> 430 </xsl:call-template> 426 431 <xsl:call-template name="documentArrow"> 427 432 <xsl:with-param name="collName" select="$collName"/> 428 <xsl:with-param name="direction">back</xsl:with-param>429 </xsl:call-template>430 <xsl:call-template name="documentArrow">431 <xsl:with-param name="collName" select="$collName"/>432 433 <xsl:with-param name="direction">forward</xsl:with-param> 433 434 </xsl:call-template> 434 </p> 435 </div> 436 435 437 </xsl:template> 436 438 … … 439 441 <xsl:param name="direction"/> 440 442 <xsl:variable name="request-params" select="/page/pageRequest/paramList"/> 441 <a><xsl:attribute name="href"><xsl:value-of select="$library_name"/>?a=d&c=<xsl:value-of select="$collName"/>&d=<xsl:value-of select="@selectedNode"/><xsl:choose><xsl:when test="$direction='back'">.pp</xsl:when><xsl:otherwise>.np</xsl:otherwise></xsl:choose>&sib=1&p.s=<xsl:value-of select='$request-params/param[@name="p.s"]/@value'/>&p.sa=<xsl:value-of select='$request-params/param[@name="p.sa"]/@value'/>&p.a=<xsl:value-of select='$request-params/param[@name="p.a"]/@value'/></xsl:attribute><xsl:choose><xsl:when test="$direction='back'"><img src="interfaces/default/images/less.gif" border="0"/></xsl:when><xsl:otherwise><img src="interfaces/default/images/more.gif" border="0" align="right"/></xsl:otherwise></xsl:choose></a>443 <a><xsl:attribute name="href"><xsl:value-of select="$library_name"/>?a=d&c=<xsl:value-of select="$collName"/>&d=<xsl:value-of select="@selectedNode"/><xsl:choose><xsl:when test="$direction='back'">.pp</xsl:when><xsl:otherwise>.np</xsl:otherwise></xsl:choose>&sib=1&p.s=<xsl:value-of select='$request-params/param[@name="p.s"]/@value'/>&p.sa=<xsl:value-of select='$request-params/param[@name="p.sa"]/@value'/>&p.a=<xsl:value-of select='$request-params/param[@name="p.a"]/@value'/></xsl:attribute><xsl:choose><xsl:when test="$direction='back'"><img class="lessarrow" src="interfaces/default/images/less.gif" /></xsl:when><xsl:otherwise><img class="morearrow" src="interfaces/default/images/more.gif" /></xsl:otherwise></xsl:choose></a> 442 444 </xsl:template> 443 445 </xsl:stylesheet>
Note:
See TracChangeset
for help on using the changeset viewer.