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

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

modified to work with new gs3 interface, while still workign with gs2 interface

  • Property svn:keywords set to Author Date Id Revision
File size: 4.3 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 class="bgimage">
30 <xsl:attribute name="dir"><xsl:call-template name="direction"/></xsl:attribute>
31 <div id="page">
32 <xsl:apply-templates select="pageResponse"/>
33 <xsl:call-template name="greenstoneFooter"/>
34 </div>
35 </body>
36 </html>
37 </xsl:when>
38 <!-- default gs3 mode -->
39 <xsl:otherwise>
40 <html>
41 <head>
42 <title>
43 <gslib:aboutCollectionPageTitle/>
44 </title>
45 <link rel="stylesheet" href="interfaces/default/style/core.css" type="text/css"/>
46 </head>
47
48 <body><gslib:textDirectionAttribute/>
49
50 <div id="page-wrapper">
51 <gslib:displayErrorsIfAny/>
52
53 <div id="banner">
54 <p>
55 <gslib:collectionHomeLinkWithLogoIfAvailable/>
56 </p>
57 <ul id="bannerlist">
58 <li><gslib:homeButtonTop/></li>
59 <li><gslib:helpButtonTop/></li>
60 <li><gslib:preferencesButtonTop/></li>
61 </ul>
62 </div>
63
64 <!--If some services are available for the current collection display the navigation bar-->
65 <xsl:choose>
66 <xsl:when test="serviceList/service">
67 <div id="navbar">
68 <ul id="navbarlist">
69 <gslib:servicesNavigationBar/>
70 </ul>
71 </div>
72 </xsl:when>
73 <!--Otherwise simply display a blank divider bar-->
74 <xsl:otherwise>
75 <div class="divbar"><gslib:noTextBar/></div>
76 </xsl:otherwise>
77 </xsl:choose>
78
79 <div id="content">
80 <!--Display the description text of the current collection,
81 and if some services are available then create a list
82 of links for each service within a <ul id="servicelist"> element.-->
83 <gslib:collectionDescriptionTextAndServicesLinks/>
84 </div>
85
86 <div id="footer">
87 <div class="divbar"><gslib:poweredByGS3TextBar/></div>
88 </div>
89 </div>
90 </body>
91 </html>
92 </xsl:otherwise>
93 </xsl:choose>
94 </xsl:template>
95
96
97
98
99 <xsl:template name="pageTitle">
100 Sample XML Texts Collection
101 </xsl:template>
102
103 <!-- page specific style goes here -->
104 <xsl:template name="pageStyle"/>
105
106 <xsl:template match="pageResponse">
107 <xsl:apply-templates select="collection"/>
108 </xsl:template>
109
110 <!-- this is for gs2 mode -->
111 <xsl:template match="collection" priority="5">
112 <xsl:if test="$interface_name = 'gs2'">
113 <xsl:variable name="collName" select="@name"/>
114 <xsl:call-template name="standardPageBanner">
115 <xsl:with-param name="collName" select="$collName"/>
116 <xsl:with-param name="pageType">about</xsl:with-param>
117 </xsl:call-template>
118 <xsl:call-template name="navigationBar">
119 <xsl:with-param name="collName" select="$collName"/>
120 </xsl:call-template>
121 </xsl:if>
122 <p/><xsl:value-of select="displayItem[@name='description']" disable-output-escaping='yes'/>
123 <p/><xsl:apply-templates select="documentList">
124 <xsl:with-param name="collName" select="@name"/>
125 </xsl:apply-templates>
126 </xsl:template>
127
128 <xsl:template match="documentList">
129 <xsl:param name="collName"/>
130 <ul>
131 <xsl:for-each select="document">
132 <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>
133 </xsl:for-each>
134 </ul>
135 </xsl:template>
136</xsl:stylesheet>
Note: See TracBrowser for help on using the repository browser.