Changeset 14573
- Timestamp:
- 2007-09-25T16:10:31+12:00 (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
greenstone3/trunk/web/interfaces/classic/transform/document.xsl
r14541 r14573 63 63 <xsl:template match="document"> 64 64 <xsl:param name="collName"/> 65 65 <xsl:variable name="external"><xsl:value-of select="/page/pageResponse/document/@external"/></xsl:variable> 66 <xsl:if test="$external != ''"> 67 <xsl:call-template name="externalPage"> 68 <xsl:with-param name="external" select="$external"/> 69 </xsl:call-template> 70 </xsl:if> 71 72 <xsl:if test="$external = ''"> 66 73 <xsl:call-template name="documentHeading"> 67 74 <xsl:with-param name="collName" select="$collName"/> … … 78 85 </xsl:call-template> 79 86 <br/> 87 </xsl:if> 80 88 </xsl:template> 81 89 … … 124 132 <xsl:variable name="p.s" select="/page/pageRequest/paramList/param[@name='p.s']/@value"/> 125 133 <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> 126 127 128 <div class="heading_image"> 129 <xsl:if test="string($doCoverImage) != 'false' and (@docType='paged' or @docType='hierarchy')"> 130 <xsl:call-template name="coverImage"/> 131 </xsl:if> 132 </div> 133 134 <div class="buttons" id="toc_buttons"> 135 <xsl:call-template name="documentButtons"> 136 <xsl:with-param name="collName" select="$collName"/> 137 </xsl:call-template> 138 </div> 139 140 <!--<div><xsl:call-template name="enrichServices"> 134 <div id="documentheading"> 135 <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> 136 </xsl:call-template></a> 137 <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> 138 </div> 139 140 <div id="docheadwrapper"> 141 <div id="documentinfo"> 142 <xsl:if test="string($doCoverImage) != 'false' and (@docType='paged' or @docType='hierarchy')"> 143 <div id="headingimage"> 144 <xsl:call-template name="coverImage"/> 145 </div> 146 </xsl:if> 147 148 <ul id="docbuttons" > 149 <xsl:call-template name="documentButtons"> 150 <xsl:with-param name="collName" select="$collName"/> 151 </xsl:call-template> 152 </ul> 153 </div> 154 155 <!--<div><xsl:call-template name="enrichServices"> 141 156 <xsl:with-param name="collName" select="$collName"/> 142 157 </xsl:call-template></div>--> 143 158 144 <div class="toc"> 145 <table class="v_list"><tr valign="top"><td valign="top"> <a href="{$library_name}?a={$p.a}&sa={$p.sa}&s={$p.s}&c={$collName}&rt=r"><xsl:call-template name="openbookimg"><xsl:with-param name="title">Close this book and return to search/browse</xsl:with-param> 146 </xsl:call-template></a></td><td valign="top"></td> 147 <td valign="top"> 148 <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> 149 </td></tr> 150 </table> 151 <xsl:if test="string($doTOC) != 'false'"> 152 <table><tr valign="top"><td><img alt="" src="/gsdl/images/space.gif" width="25"/></td><td><table class="v_list"> 153 <xsl:call-template name="TOC"> 154 <xsl:with-param name="collName" select="$collName"/> 155 </xsl:call-template> 156 </table> 157 </td></tr></table> 158 </xsl:if> 159 <xsl:if test="string($doTOC) != 'false'"> 160 <div id="toc"> 161 <xsl:call-template name="TOC"> 162 <xsl:with-param name="collName" select="$collName"/> 163 </xsl:call-template> 159 164 </div> 165 </xsl:if> 166 </div> 160 167 </xsl:template> 161 168 … … 257 264 258 265 <xsl:if test="documentNode[@nodeID]"> 259 <tr valign='top'><td> 266 <ul id="tocnodes"> 267 <li> 260 268 <xsl:choose><xsl:when test="string($oc)='0'"> 261 269 <a href="{$library_name}?a=d&c={$collName}&d={$d}&sib={$sib}&oc=1&p.s={$p.s}&p.sa={$p.sa}&p.a={$p.a}&p.c={$p.c}"><xsl:call-template name="closedfolderimg"><xsl:with-param name="title">open the table of contents</xsl:with-param></xsl:call-template></a> 262 270 </xsl:when> 263 271 <xsl:otherwise><a href="{$library_name}?a=d&c={$collName}&d={$d}&sib={$sib}&oc=0&p.s={$p.s}&p.sa={$p.sa}&p.a={$p.a}&p.c={$p.c}"><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> 264 </td><td>Table of Contents</td></tr>272 Table of Contents 265 273 <xsl:if test="string($oc)!='0'"> 266 <tr><td> </td><td> 267 <table> 274 <ul class="tocnode"> 268 275 <xsl:for-each select="documentNode/documentNode[@nodeID]"> 269 276 <xsl:apply-templates select='.'> … … 278 285 </xsl:apply-templates> 279 286 </xsl:for-each> 280 </table> 281 </td></tr> 282 </xsl:if> 287 </ul> 288 </xsl:if> 289 </li> 290 </ul> 283 291 </xsl:if> 284 292 </xsl:template> … … 296 304 <!-- Display the appropriate image, depending on the node type --> 297 305 298 <tr><td valign="top">306 <li> 299 307 <!-- 300 308 <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><xsl:if test="@nodeType='leaf'">&sib=1</xsl:if><xsl:if test="string($ec) = '1'">&ec=1</xsl:if></xsl:attribute> … … 305 313 <xsl:apply-templates select="." mode="displayNodeIcon"/> 306 314 </a> 307 </td>308 315 309 316 <!-- Display associated title, bolded if the node has content --> 310 <td valign="top">311 317 <xsl:choose> 312 318 <xsl:when test="nodeContent"> 313 <b><xsl:value-of disable-output-escaping="yes" select="metadataList/metadata[@name='Title']"/></b>319 <span class="bold"><xsl:value-of disable-output-escaping="yes" select="metadataList/metadata[@name='Title']"/></span> 314 320 </xsl:when> 315 321 <xsl:otherwise> … … 317 323 </xsl:otherwise> 318 324 </xsl:choose> 319 </td> 320 </tr> 325 321 326 <!-- Apply recursively to the children of this node --> 322 327 <xsl:if test="documentNode[@nodeID]"> 323 <tr><td> </td><td><table>324 <xsl:apply-templates select="documentNode[@nodeID]">328 329 <ul class="tocnode"> <xsl:apply-templates select="documentNode[@nodeID]"> 325 330 <xsl:with-param name="collName" select="$collName"/> 326 331 <xsl:with-param name="ec" select="$ec"/> … … 330 335 <!--<xsl:with-param name="depth" select="$depth + 1"/>--> 331 336 </xsl:apply-templates> 332 </table>333 </td></tr>334 </ xsl:if>337 </ul> 338 </xsl:if> 339 </li> 335 340 </xsl:template> 336 341 … … 490 495 </xsl:for-each> 491 496 </xsl:template> 492 497 498 <xsl:template name="externalPage"> 499 <xsl:param name="external"/> 500 <h2>External Link</h2> 501 <p>The link you have selected is external to any of your currently selected collections. If you still wish to view this link and your browser has access to the Web, you can <a><xsl:attribute name="href"><xsl:value-of select="$external"/></xsl:attribute>go forward</a> to this page; otherwise use your browsers "back" button to return to the previous document. 502 </p> 503 </xsl:template> 504 493 505 </xsl:stylesheet> 494 506
Note:
See TracChangeset
for help on using the changeset viewer.