source: greenstone3/trunk/web/sites/localsite/collect/gberg/transform/about.xsl@ 19942

Last change on this file since 19942 was 19942, checked in by kjdon, 15 years ago

changed the page style so it looks nice

  • Property svn:keywords set to Author Date Id Revision
File size: 4.2 KB
Line 
1<?xml version="1.0" encoding="ISO-8859-1"?>
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 xmlns:gslib="http://www.greenstone.org/skinning"
7 extension-element-prefixes="java util"
8 exclude-result-prefixes="java util">
9
10 <!-- style includes global params interface_name, library_name -->
11 <xsl:include href="style.xsl"/>
12
13 <xsl:output method="html"/>
14
15 <!-- the main page layout template is here -->
16 <xsl:template match="page">
17 <xsl:choose>
18 <!-- if we are using the classic GS2 look and feel use this template otherwise use the default GS3 look and feel template -->
19 <xsl:when test="$interface_name = 'gs2'">
20 <html>
21 <head>
22 <title>
23 <!-- put a space in the title in case the actual value is missing - mozilla will not display a page with no title-->
24 <xsl:call-template name="pageTitle"/><xsl:text> </xsl:text>
25 </title>
26 <xsl:call-template name="globalStyle"/>
27 <xsl:call-template name="pageStyle"/>
28 </head>
29 <body>
30 <div id="page-wrapper">
31 <xsl:apply-templates select="pageResponse"/>
32 <xsl:call-template name="greenstoneFooter"/>
33 </div>
34 </body>
35 </html>
36 </xsl:when>
37 <!-- default gs3 mode -->
38 <xsl:otherwise>
39 <html>
40 <head>
41 <title>
42 <gslib:aboutCollectionPageTitle/>
43 </title>
44 <link rel="stylesheet" href="interfaces/default/style/core.css" type="text/css"/>
45 </head>
46
47 <body><gslib:textDirectionAttribute/>
48
49 <div id="page-wrapper">
50 <gslib:displayErrorsIfAny/>
51
52 <div id="banner">
53 <p>
54 <gslib:collectionHomeLinkWithLogoIfAvailable/>
55 </p>
56 <ul id="bannerlist">
57 <li><gslib:homeButtonTop/></li>
58 <li><gslib:helpButtonTop/></li>
59 <li><gslib:preferencesButtonTop/></li>
60 </ul>
61 </div>
62
63 <!--If some services are available for the current collection display the navigation bar-->
64 <xsl:choose>
65 <xsl:when test="serviceList/service">
66 <div id="navbar">
67 <ul id="navbarlist">
68 <gslib:servicesNavigationBar/>
69 </ul>
70 </div>
71 </xsl:when>
72 <!--Otherwise simply display a blank divider bar-->
73 <xsl:otherwise>
74 <div class="divbar"><gslib:noTextBar/></div>
75 </xsl:otherwise>
76 </xsl:choose>
77
78 <div id="content">
79 <!--Display the description text of the current collection,
80 and if some services are available then create a list
81 of links for each service within a <ul id="servicelist"> element.-->
82 <gslib:collectionDescriptionTextAndServicesLinks/>
83 </div>
84
85 <div id="footer">
86 <div class="divbar"><gslib:poweredByGS3TextBar/></div>
87 </div>
88 </div>
89 </body>
90 </html>
91 </xsl:otherwise>
92 </xsl:choose>
93 </xsl:template>
94
95
96
97
98 <xsl:template name="pageTitle">
99 Sample XML Texts Collection
100 </xsl:template>
101
102 <!-- page specific style goes here -->
103 <xsl:template name="pageStyle"/>
104
105 <xsl:template match="pageResponse">
106 <xsl:apply-templates select="collection"/>
107 </xsl:template>
108
109 <!-- this is for gs2 mode -->
110 <xsl:template match="collection" priority="5">
111 <xsl:if test="$interface_name = 'gs2'">
112 <xsl:variable name="collName" select="@name"/>
113 <xsl:call-template name="standardPageBanner">
114 <xsl:with-param name="collName" select="$collName"/>
115 <xsl:with-param name="pageType">about</xsl:with-param>
116 </xsl:call-template>
117 <xsl:call-template name="navigationBar">
118 <xsl:with-param name="collName" select="$collName"/>
119 </xsl:call-template>
120 </xsl:if>
121 <p/><xsl:value-of select="displayItem[@name='description']" disable-output-escaping='yes'/>
122 <p/><xsl:apply-templates select="documentList">
123 <xsl:with-param name="collName" select="@name"/>
124 </xsl:apply-templates>
125 </xsl:template>
126
127 <xsl:template match="documentList">
128 <xsl:param name="collName"/>
129 <ul>
130 <xsl:for-each select="document">
131 <li><a href="{$library_name}?a=xd&amp;sa=toc&amp;sc=full&amp;c={$collName}&amp;d={@name}"><xsl:value-of select="metadataList/metadata[@name='Title']"/></a></li>
132 </xsl:for-each>
133 </ul>
134 </xsl:template>
135</xsl:stylesheet>
Note: See TracBrowser for help on using the repository browser.