source: greenstone3/trunk/web/interfaces/gs2/transform/home.xsl@ 20014

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

i have added some html tags to hte home.coll_warning text, so need to have disable-output-escaping on

  • Property svn:keywords set to Author Date Id Revision
File size: 4.2 KB
RevLine 
[7831]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"/>
[17019]13
[18318]14 <!-- the main page layout template is here -->
[17019]15 <xsl:template match="page">
16 <html>
[18318]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>
[18392]25 <body>
[17019]26 <xsl:attribute name="dir"><xsl:call-template name="direction"/></xsl:attribute>
[18392]27 <div id="page-wrapper">
[18318]28 <xsl:apply-templates select="pageResponse"/>
29 <xsl:call-template name="greenstoneFooter"/>
[17019]30 </div>
31 </body>
32 </html>
33 </xsl:template>
[7831]34
[8532]35 <xsl:template name="pageTitle">
36 <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'gsdl')"/>
[7831]37 </xsl:template>
38
[8532]39 <!-- page specific style goes here -->
40 <xsl:template name="pageStyle"/>
41
[7831]42 <xsl:template match="pageResponse">
[18314]43 <xsl:call-template name="pageBanner"/>
[7831]44 <xsl:apply-templates select="collectionList"/>
[14412]45 <xsl:apply-templates select="serviceList"/>
[7831]46 </xsl:template>
47
[18314]48 <xsl:template name="pageBanner">
[18318]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>
[18314]53 </div>
[18318]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>
[18314]62
[7831]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>
[18318]68 <a href="{$library_name}?a=p&amp;sa=about&amp;c={@name}&amp;ct={$ct}">
[7831]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>
[8054]80 <xsl:call-template name="collWarning"/>
[7831]81 </xsl:template>
82
[8054]83 <xsl:template name="collWarning">
[13254]84 <xsl:call-template name="dividerBar"/>
85 <div>
[20014]86 <xsl:value-of select="util:getInterfaceText('gs2', /page/@lang, 'home.coll_warning')" disable-output-escaping="yes"/>
[13254]87 </div>
[18318]88 </xsl:template>
[14412]89
[18318]90 <xsl:template match="serviceList">
[14412]91 <ul id="servicelist">
[19947]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>
[14412]96 <!--uncomment to display an authentication link-->
97 <!--<xsl:for-each select="service[@type='authen']">
[19947]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>-->
[14412]99 <!--uncomment to display a library interface link-->
[18318]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>-->
[14412]101 </ul>
[18318]102 </xsl:template>
[14412]103
[7831]104</xsl:stylesheet>
105
106
Note: See TracBrowser for help on using the repository browser.