Changeset 4002 for trunk/gsdl3/interfaces/default/transform/style.xsl
- Timestamp:
- 2003-03-26T12:46:39+12:00 (21 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gsdl3/interfaces/default/transform/style.xsl
r3989 r4002 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 extension-element-prefixes="java"> 6 7 <!-- 8 <xsl:output method="html"/> 9 --> 10 11 <xsl:attribute-set name="body-style"> 12 <xsl:attribute name="bgcolor">#ffffff</xsl:attribute> 13 <xsl:attribute name="text">#000000</xsl:attribute> 14 <xsl:attribute name="link">#006666</xsl:attribute> 15 <xsl:attribute name="alink">#cc9900</xsl:attribute> 16 <xsl:attribute name="vlink">#666633</xsl:attribute> 17 <xsl:attribute name="background">interfaces/default/images/chalk.gif</xsl:attribute> 18 </xsl:attribute-set> 19 20 21 <xsl:template name="greenstoneHead"> 22 <head> 23 <title><xsl:call-template name="text"><xsl:with-param name="key">nzdl</xsl:with-param></xsl:call-template></title> 24 25 </head> 26 </xsl:template> 27 28 <xsl:template name="greenstonePageBanner"> 29 30 <center> 31 <table width="537" cellspacing="0" cellpadding="0"> 32 <tr valign="top"> 33 <td rowspan="2" align="left"><center><img src="interfaces/default/images/nzdl2gr.gif" width="457" height="181" ><xsl:attribute name="alt"><xsl:call-template name="text"><xsl:with-param name="key">nzdl</xsl:with-param></xsl:call-template></xsl:attribute></img></center></td> 34 <td align="right"></td> 35 </tr> 36 37 <tr> 38 <td align="right"></td> 39 </tr> 40 41 <tr> 42 <td colspan="2"></td> 43 </tr> 44 </table> 45 <xsl:call-template name="greenBar"/> 46 47 </center> 48 49 <!-- end of page banner --> 50 51 </xsl:template> 52 53 <xsl:template name="greenstoneFooter"> 54 <center> 55 <p/> 56 <small>powered by greenstone3</small> 57 </center> 58 </xsl:template> 59 60 61 <xsl:template name="collectionPageBanner"> 62 <xsl:param name="collName">coll-name</xsl:param> 63 <xsl:param name="httpPath"/> 64 <xsl:param name="collIcon"/> 65 <xsl:variable name="library" select="ancestor::page/config/library_name"/> 66 <table width="537"> 67 <tr> 68 <td align="left"> 69 <a href="{$library}?a=p&sa=about&c={$collName}"> 70 <img width="150" border="1"> 71 <xsl:attribute name="src"> 72 <xsl:value-of select="$httpPath"/>/<xsl:value-of select="$collIcon"/> 73 </xsl:attribute> 74 <!-- <xsl:attribute name="src">sites/<xsl:value-of select="ancestor::page/config/site_name"/>/collect/<xsl:value-of select="$collName"/>/images/<xsl:value-of select="$collIcon"/></xsl:attribute> --> 75 <xsl:attribute name="alt"> 76 <xsl:call-template name="text"> 77 <xsl:with-param name="key">aboutpage</xsl:with-param> 78 </xsl:call-template> 79 </xsl:attribute> 80 </img> 81 </a> 82 </td> 83 <td align="right"> 84 <a href="{$library}?a=p&sa=home"> 85 <xsl:call-template name="text"> 86 <xsl:with-param name="key">home</xsl:with-param> 87 </xsl:call-template> 88 </a> 89 </td> 90 </tr> 91 </table> 92 93 <xsl:call-template name="greenBar"/> 94 </xsl:template> 95 96 97 <!-- do we want different stuff for cluster or same as collection --> 98 <xsl:template name="clusterPageBanner"> 99 <xsl:param name="clusterName">coll-name</xsl:param> 100 <xsl:variable name="library" select="ancestor::page/config/library_name"/> 101 <table width="537"> 102 <tr><td align="left"><a href="{$library}?a=p&sa=about&c={$clusterName}"><xsl:value-of select="$clusterName"/></a></td><td align="right"><a href="{$library}?a=p&sa=home"><xsl:call-template name="text"><xsl:with-param name="key">home</xsl:with-param></xsl:call-template></a></td></tr></table> 103 104 <xsl:call-template name="greenBar"/> 105 </xsl:template> 106 107 <xsl:template name="greenBar"> 108 <p/><img src="interfaces/default/images/divb.gif" width="537" height="17"/> 109 </xsl:template> 110 111 112 113 <!-- Display the appropriate image, depending on the node type --> 114 <xsl:template match="documentNode" mode="displayNodeIcon"> 115 3 xmlns:xsl="http://www.w3.org/1999/XSL/Transform" 4 xmlns:java="http://xml.apache.org/xslt/java" 5 extension-element-prefixes="java"> 6 7 <!-- 8 <xsl:output method="html"/> 9 --> 10 11 <!-- the main page layout template is here --> 12 <xsl:template match="page"> 13 <html> 14 <xsl:call-template name="greenstoneHead"/> 15 <body xsl:use-attribute-sets="body-style"> 16 <table border="0" cellspacing="0" cellpadding="0" width="100%"> 17 <td valign="top" width="65"> 18 <img src="interfaces/default/images/spacer.gif" width="65" height="1" alt="" border="0"/> 19 </td> 20 <td> 21 <center> 22 <table width="537"> 23 <tr/> 24 <td/> 25 <xsl:apply-templates select="pageResponse"/> 26 <xsl:call-template name="greenstoneFooter"/> 27 </table> 28 </center> 29 </td> 30 </table> 31 </body> 32 </html> 33 </xsl:template> 34 35 <xsl:attribute-set name="body-style"> 36 <xsl:attribute name="bgcolor">#ffffff</xsl:attribute> 37 <xsl:attribute name="text">#000000</xsl:attribute> 38 <xsl:attribute name="link">#006666</xsl:attribute> 39 <xsl:attribute name="alink">#cc9900</xsl:attribute> 40 <xsl:attribute name="vlink">#666633</xsl:attribute> 41 <xsl:attribute name="background">interfaces/default/images/chalk.gif</xsl:attribute> 42 </xsl:attribute-set> 43 44 <!-- can we modify the title to reflect whats happening in the page???--> 45 <xsl:template name="greenstoneHead"> 46 <head> 47 <title><xsl:call-template name="text"><xsl:with-param name="key">nzdl</xsl:with-param></xsl:call-template></title> 48 </head> 49 </xsl:template> 50 51 <!-- this should probably use a greenstone image rather than nzdl image --> 52 <xsl:template name="greenstonePageBanner"> 53 <center> 54 <table width="537" cellspacing="0" cellpadding="0"> 55 <tr valign="top"> 56 <td rowspan="2" align="left"><center><img src="interfaces/default/images/nzdl2gr.gif" width="457" height="181" ><xsl:attribute name="alt"><xsl:call-template name="text"><xsl:with-param name="key">nzdl</xsl:with-param></xsl:call-template></xsl:attribute></img></center></td> 57 <td align="right"></td> 58 </tr> 59 60 <tr> 61 <td align="right"></td> 62 </tr> 63 64 <tr> 65 <td colspan="2"></td> 66 </tr> 67 </table> 68 <xsl:call-template name="greenBar"/> 69 70 </center> 71 72 <!-- end of page banner --> 73 74 </xsl:template> 75 76 <xsl:template name="greenstoneFooter"> 77 <center> 78 <p/> 79 <small>powered by greenstone3</small> 80 </center> 81 </xsl:template> 82 83 <!-- just pass in collname cos use it everywhere - saves working it out lots of times --> 84 <xsl:template name="collectionPageBanner"> 85 <xsl:param name="collName"/> 86 <xsl:variable name="httpPath" select="ancestor::page/pageResponse/collection/metadataList/metadata[@name='httpPath']"/> 87 <xsl:variable name="colIcon" select="ancestor::page/pageResponse/collection/metadataList/metadata[@name='colIcon']"/> 88 <xsl:variable name="library" select="ancestor::page/config/library_name"/> 89 <table width="537"> 90 <tr> 91 <td align="left"> 92 <a href="{$library}?a=p&sa=about&c={$collName}"> 93 <img width="150" border="1"> 94 <xsl:attribute name="src"> 95 <xsl:value-of select="$httpPath"/>/images/<xsl:value-of select="$colIcon"/> 96 </xsl:attribute> 97 <xsl:attribute name="alt"> 98 <xsl:call-template name="text"> 99 <xsl:with-param name="key">aboutpage</xsl:with-param> 100 </xsl:call-template> 101 </xsl:attribute> 102 </img> 103 </a> 104 </td> 105 <td align="right"> 106 <a href="{$library}?a=p&sa=home"> 107 <xsl:call-template name="text"> 108 <xsl:with-param name="key">home</xsl:with-param> 109 </xsl:call-template> 110 </a> 111 </td> 112 </tr> 113 </table> 114 115 <xsl:call-template name="greenBar"/> 116 </xsl:template> 117 118 119 <!-- do we want different stuff for cluster or same as collection --> 120 <xsl:template name="clusterPageBanner"> 121 <xsl:param name="clusterName"/> 122 <xsl:variable name="library" select="ancestor::page/config/library_name"/> 123 <table width="537"> 124 <tr><td align="left"><a href="{$library}?a=p&sa=about&c={$clusterName}"><xsl:value-of select="$clusterName"/></a></td><td align="right"><a href="{$library}?a=p&sa=home"><xsl:call-template name="text"><xsl:with-param name="key">home</xsl:with-param></xsl:call-template></a></td></tr></table> 125 126 <xsl:call-template name="greenBar"/> 127 </xsl:template> 128 129 <xsl:template name="greenBar"> 130 <p/><img src="interfaces/default/images/divb.gif" width="537" height="17"/> 131 </xsl:template> 132 133 134 135 <!-- Display the appropriate image, depending on the node type --> 136 <xsl:template match="documentNode" mode="displayNodeIcon"> 137 116 138 <!-- Root node: book icon (open or closed) --> 117 139 <xsl:if test="@nodeType='root'">
Note:
See TracChangeset
for help on using the changeset viewer.