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 | xmlns:gsf="http://www.greenstone.org/greenstone3/schema/ConfigFormat"
|
---|
8 | extension-element-prefixes="java util"
|
---|
9 | exclude-result-prefixes="java util gsf">
|
---|
10 |
|
---|
11 | <!-- use the 'main' layout -->
|
---|
12 | <xsl:include href="layouts/main.xsl"/>
|
---|
13 |
|
---|
14 | <!-- set page title -->
|
---|
15 | <xsl:template name="pageTitle"><gslib:collectionName/></xsl:template>
|
---|
16 |
|
---|
17 | <!-- set page breadcrumbs -->
|
---|
18 | <xsl:template name="breadcrumbs"><gslib:siteLink/><gslib:rightArrow/></xsl:template>
|
---|
19 |
|
---|
20 | <!-- the page content -->
|
---|
21 | <xsl:template match="/page">
|
---|
22 | <xsl:call-template name="languageswap"/>
|
---|
23 | <gsf:collectionText name="about.textxwelcome"/>
|
---|
24 | <gsf:collectionText name="about.textxwelcome2"/>
|
---|
25 | <gsf:collectionText name="about.textxbackground"/>
|
---|
26 | <gsf:collectionText name="about.textxgrateful"/>
|
---|
27 |
|
---|
28 | <hr/>
|
---|
29 |
|
---|
30 | <gsf:collectionText name="about.textxbackground2"/>
|
---|
31 | <gsf:collectionText name="about.textxbackground3"/>
|
---|
32 |
|
---|
33 | <hr/>
|
---|
34 |
|
---|
35 | <gsf:collectionText name="about.textxsupporgs"/>
|
---|
36 | <gsf:collectionText name="about.textximage"/>
|
---|
37 | <gsf:collectionText name="about.textyaymined"/>
|
---|
38 | <gsf:collectionText name="about.textxsupporgs2"/>
|
---|
39 | </xsl:template>
|
---|
40 |
|
---|
41 | <xsl:template name="languageswap">
|
---|
42 | <xsl:variable name="swaplangname"><xsl:choose><xsl:when test="/page/@lang = 'mi'">English</xsl:when><xsl:otherwise>MÄori</xsl:otherwise></xsl:choose></xsl:variable>
|
---|
43 | <div style="text-align:right;"><small><a id="replaceLink"><xsl:attribute name="title"><gsf:collectionText name="about.changelangtofrommaori"/></xsl:attribute><xsl:value-of select="$swaplangname"/></a></small></div>
|
---|
44 | <xsl:variable name="langcgiarg"><xsl:choose><xsl:when test="/page/@lang = 'mi'">l=en</xsl:when><xsl:otherwise>l=mi</xsl:otherwise></xsl:choose></xsl:variable>
|
---|
45 | <script type="text/javascript">
|
---|
46 | <xsl:text disable-output-escaping="yes">
|
---|
47 | $(window).ready(function()
|
---|
48 | {
|
---|
49 | var url = document.URL;
|
---|
50 | if(url.indexOf("?") != -1)
|
---|
51 | {
|
---|
52 | if(url.search(/[&?]?l=[^&\b]*/g) != -1)
|
---|
53 | {
|
---|
54 | url = url.replace(/([&?]?)l=[^&\b]*/g, "$1</xsl:text><xsl:value-of select="$langcgiarg"/><xsl:text disable-output-escaping="yes">");
|
---|
55 | $("#replaceLink").attr("href", url);
|
---|
56 | }
|
---|
57 | else
|
---|
58 | {
|
---|
59 | $("#replaceLink").attr("href", url + "&</xsl:text><xsl:value-of select="$langcgiarg"/><xsl:text disable-output-escaping="yes">");
|
---|
60 | }
|
---|
61 | }
|
---|
62 | else
|
---|
63 | {
|
---|
64 | $("#replaceLink").attr("href", url + "?</xsl:text><xsl:value-of select="$langcgiarg"/><xsl:text disable-output-escaping="yes">");
|
---|
65 | }
|
---|
66 | });
|
---|
67 | </xsl:text>
|
---|
68 | </script>
|
---|
69 |
|
---|
70 | </xsl:template>
|
---|
71 | </xsl:stylesheet>
|
---|
72 |
|
---|