source: greenstone3/trunk/web/interfaces/gs2/transform/home.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

  • 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 extension-element-prefixes="java util"
7 exclude-result-prefixes="java util">
8
9 <!-- style includes global params interface_name, library_name -->
10 <xsl:include href="style.xsl"/>
11
12 <xsl:output method="html"/>
13
14 <!-- the main page layout template is here -->
15 <xsl:template match="page">
16 <html>
17 <head>
18 <title>
19 <!-- put a space in the title in case the actual value is missing - mozilla will not display a page with no title-->
20 <xsl:call-template name="pageTitle"/><xsl:text> </xsl:text>
21 </title>
22 <xsl:call-template name="globalStyle"/>
23 <xsl:call-template name="pageStyle"/>
24 </head>
25 <body>
26 <xsl:attribute name="dir"><xsl:call-template name="direction"/></xsl:attribute>
27 <div id="page-wrapper">
28 <xsl:apply-templates select="pageResponse"/>
29 <xsl:call-template name="greenstoneFooter"/>
30 </div>
31 </body>
32 </html>
33 </xsl:template>
34
35 <xsl:template name="pageTitle">
36 <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'gsdl')"/>
37 </xsl:template>
38
39 <!-- page specific style goes here -->
40 <xsl:template name="pageStyle"/>
41
42 <xsl:template match="pageResponse">
43 <xsl:call-template name="pageBanner"/>
44 <xsl:apply-templates select="collectionList"/>
45 <xsl:apply-templates select="serviceList"/>
46 </xsl:template>
47
48 <xsl:template name="pageBanner">
49 <div id="banner">
50 <div class="collectimage">
51 <img src="interfaces/default/images/gsdlhead.gif"><xsl:attribute name="alt"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'gsdl')"/></xsl:attribute>
52 </img>
53 </div>
54 </div>
55 <div class="bannerextra"></div>
56 <div id="content">
57 <xsl:call-template name="dividerBar">
58 <xsl:with-param name="text" select="util:getInterfaceText($interface_name, /page/@lang, 'home.select_a_collection')"/>
59 </xsl:call-template>
60 </div>
61 </xsl:template>
62
63 <xsl:template match="collectionList">
64 <xsl:for-each select="collection">
65 <xsl:variable name="ct"><xsl:choose><xsl:when test="metadataList/metadata[@name='buildType']='mgpp'">1</xsl:when><xsl:otherwise>0</xsl:otherwise></xsl:choose></xsl:variable>
66
67 <p>
68 <a href="{$library_name}?a=p&amp;sa=about&amp;c={@name}&amp;ct={$ct}">
69 <img width="150" border="1">
70 <xsl:attribute name="src">
71 <xsl:value-of select="metadataList/metadata[@name='httpPath']"/>/images/<xsl:choose><xsl:when test="displayItem[@name='smallicon']"><xsl:value-of select="displayItem[@name='smallicon']"/></xsl:when><xsl:otherwise><xsl:value-of select="displayItem[@name='icon']"/></xsl:otherwise></xsl:choose>
72 </xsl:attribute>
73 <xsl:attribute name="alt">
74 <xsl:value-of select="displayItem[@name='name']"/>
75 </xsl:attribute>
76 </img>
77 </a>
78 </p>
79 </xsl:for-each>
80 <xsl:call-template name="collWarning"/>
81 </xsl:template>
82
83 <xsl:template name="collWarning">
84 <xsl:call-template name="dividerBar"/>
85 <div>
86 <xsl:value-of select="util:getInterfaceText('gs2', /page/@lang, 'home.coll_warning')"/>
87 </div>
88 </xsl:template>
89
90 <xsl:template match="serviceList">
91 <ul id="servicelist">
92 <xsl:for-each select="service[@type='query']">
93 <li><a href="{$library_name}?a=q&amp;amp;rt=d&amp;amp;s={@name}"><xsl:value-of select="displayItem[@name='name']"/></a><xsl:value-of select="displayItem[@name='description']"/>
94 </li>
95 </xsl:for-each>
96 <!--uncomment to display an authentication link-->
97 <!--<xsl:for-each select="service[@type='authen']">
98 <li><a href="{$library_name}?a=g&amp;rt=r&amp;sa=authen&amp;s={@name}&amp;s1.aup=Login&amp;s1.un=&amp;s1.asn="><xsl:value-of select="displayItem[@name='name']"/></a><xsl:value-of select="displayItem[@name='description']"/></li> </xsl:for-each>-->
99 <!--uncomment to display a library interface link-->
100 <!--<li><a href="{$library_name}?a=p&amp;sa=gli4gs3"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'home.librarian_interface')"/></a></li>-->
101 </ul>
102 </xsl:template>
103
104</xsl:stylesheet>
105
106
Note: See TracBrowser for help on using the repository browser.