source: greenstone3/trunk/web/interfaces/gs2/transform/library.xsl@ 19947

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

we had two serviceRack targets, one in home.xsl, one in library.xsl. it only appears that its used from home.xsl and library one is being used instead. have deleted the one in library and updated the one in home.xsl so its not so confusing

File size: 3.7 KB
Line 
1<?xml version="1.0" encoding="UTF-8"?>
2
3<xsl:stylesheet version="1.0"
4xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
5xmlns:gslib="http://www.greenstone.org/XSL/Library"
6exclude-result-prefixes="xalan gslib gsf xslt gs3">
7
8
9<xsl:output method="html"
10doctype-public="-//W3C//DTD HTML 4.01 Transitional//EN"
11doctype-system="http://www.w3.org/TR/html4/loose.dtd"
12/>
13
14
15
16 <!-- some global parameters - these are set by whoever is invoking the transformation -->
17 <xsl:param name="interface_name"/>
18 <xsl:param name="library_name"/>
19
20 <!-- every pages ....................................................................... -->
21
22 <xsl:variable name="a"><xsl:value-of select="/page/pageRequest/paramList/param[@name='a']/@value"/></xsl:variable>
23 <xsl:variable name="collections" select="/page/pageResponse/collectionList/collection"/>
24
25 <xsl:template name="GS2LibDividerBar">
26 <xsl:param name='text'/>
27 <xsl:choose>
28 <xsl:when test="$text">
29 <div class="divbar"><xsl:value-of select="$text"/></div>
30 </xsl:when>
31 <xsl:otherwise>
32 <div class="divbar"><xsl:text disable-output-escaping="yes">&amp;nbsp;</xsl:text></div>
33 </xsl:otherwise>
34 </xsl:choose>
35 </xsl:template>
36
37 <xsl:template match="error">
38 Error: <xsl:value-of select="."/>
39 </xsl:template>
40
41 <!-- site home ....................................................................... -->
42
43
44<xsl:template name="pageTitleLanguageDependant">
45 <!-- put a space in the title in case the actual value is missing - mozilla will not display a page with no title-->
46<xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'gsdl')"/><xsl:text> </xsl:text>
47</xsl:template>
48
49
50<xsl:template name="greenstoneLogoAlternateText">
51<xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'gsdl')"/>
52</xsl:template>
53
54
55<xsl:template name="collectionLinkWithImage">
56 <xsl:choose>
57 <xsl:when test="displayItem[@name='icon']">
58 <a href="{$library_name}?a=p&amp;amp;sa=about&amp;amp;c={@name}">
59 <img>
60 <xsl:attribute name="src">
61 <xsl:value-of select="metadataList/metadata[@name='httpPath']"/>/images/<xsl:value-of select="displayItem[@name='icon']"/>
62 </xsl:attribute>
63 <xsl:attribute name="alt">
64 <xsl:value-of select="displayItem[@name='name']"/>
65 </xsl:attribute>
66 </img>
67 </a>
68 </xsl:when>
69 <xsl:otherwise>
70 <a class="noimage" href="{$library_name}?a=p&amp;amp;sa=about&amp;amp;c={@name}">
71 <xsl:value-of select="displayItem[@name='name']"/>
72 </a>
73 </xsl:otherwise>
74 </xsl:choose>
75</xsl:template>
76
77
78 <xsl:template name="quickSearchForm">
79 <form name="QuickSearch" method="get" action="{$library_name}">
80 <input type="hidden" name="a" value="q"/>
81 <input type="hidden" name="rt" value="rd"/>
82 <input type="hidden" name="s" value="{/page/pageResponse/serviceList/service[@name='TextQuery']/@name}"/>
83 <input type="hidden" name="s1.collection" value="all"/>
84 <input type="text" name="s1.query" size="20"/>
85 <input type="submit" value="Quick Search"/>
86 </form>
87 </xsl:template>
88
89
90 <xsl:template match="serviceClusterList">
91 <xsl:for-each select="serviceCluster">
92 <a href="{$library_name}?a=p&amp;amp;sa=about&amp;amp;c={@name}"><xsl:value-of select='@name'/><xsl:value-of select="displayItem[@name='name']"/></a>
93 </xsl:for-each>
94 </xsl:template>
95
96
97
98 <xsl:template name="poweredByGS3LanguageDependant">
99 <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'gs3power')"/>
100 </xsl:template>
101
102
103
104</xsl:stylesheet>
105
106
Note: See TracBrowser for help on using the repository browser.