source: greenstone3/trunk/web/interfaces/default/transform/home.xsl@ 18388

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

changed main div id from globalwrapper to page-wrapper and added dir attribute for rtl languages

  • Property svn:keywords set to Author Date Id Revision
File size: 4.9 KB
RevLine 
[4047]1<?xml version="1.0" encoding="ISO-8859-1"?>
2<xsl:stylesheet version="1.0"
[4712]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">
[4047]8
[4880]9 <!-- style includes global params interface_name, library_name -->
[4712]10 <xsl:include href="style.xsl"/>
[4047]11
[4712]12 <xsl:output method="html"/>
[17017]13
[18316]14 <!-- the main page layout template is here -->
[17017]15 <xsl:template match="page">
[18316]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>
[18388]26 <xsl:attribute name="dir"><xsl:call-template name="direction"/></xsl:attribute>
27 <div id="page-wrapper">
[18316]28 <xsl:call-template name="response" />
29 <xsl:call-template name="greenstoneFooter"/>
30 </div>
31 </body>
32 </html>
[17017]33 </xsl:template>
[4047]34
[8526]35 <xsl:template name="pageTitle">
36 <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'gsdl')"/>
[4047]37 </xsl:template>
[8526]38
39 <!-- page specific style goes here -->
40 <xsl:template name="pageStyle"/>
41
[4047]42 <xsl:template match="pageResponse">
[18304]43 <xsl:call-template name="pageBanner"/>
[11233]44 <xsl:apply-templates select="serviceList/service[@name='TextQuery']"/>
[6456]45 <xsl:apply-templates select="collectionList"/>
[5119]46 <xsl:apply-templates select="serviceClusterList"/>
[11016]47 <xsl:apply-templates select="serviceList"/>
[4047]48 </xsl:template>
49
[18304]50 <xsl:template name="pageBanner">
51 <div id="banner">
[18316]52 <p>
53 <img src="interfaces/default/images/gsdlhead.gif"><xsl:attribute name="alt"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'gsdl')"/></xsl:attribute>
54 </img>
55 </p>
[18304]56 </div>
57 <div id="content">
[18316]58 <xsl:call-template name="dividerBar">
59 <xsl:with-param name="text" select="util:getInterfaceText($interface_name, /page/@lang, 'home.select_a_collection')"/>
60 </xsl:call-template>
61 </div>
[18304]62 </xsl:template>
63
[4047]64 <xsl:template match="collectionList">
[18316]65 <ul id="collectionlist">
66 <xsl:for-each select="collection">
67 <li>
68
69 <xsl:choose>
70 <xsl:when test="displayItem[@name='icon']">
[13609]71 <a href="{$library_name}?a=p&amp;sa=about&amp;c={@name}">
[13581]72 <img>
[18316]73 <xsl:attribute name="src">
74 <xsl:value-of select="metadataList/metadata[@name='httpPath']"/>/images/<xsl:value-of select="displayItem[@name='icon']"/>
75 </xsl:attribute>
76 <xsl:attribute name="alt">
77 <xsl:value-of select="displayItem[@name='name']"/>
78 </xsl:attribute>
79 </img>
80 </a>
81 </xsl:when>
82 <xsl:otherwise>
83 <a class="noimage" href="{$library_name}?a=p&amp;sa=about&amp;c={@name}">
84 <xsl:value-of select="displayItem[@name='name']"/>
85 </a>
86 </xsl:otherwise>
87 </xsl:choose>
88
89 </li>
90 </xsl:for-each>
91 </ul>
[4047]92 </xsl:template>
93
[4712]94 <xsl:template match="serviceClusterList">
95 <xsl:for-each select="serviceCluster">
[13267]96 <a href="{$library_name}?a=p&amp;sa=about&amp;c={@name}"><xsl:value-of select='@name'/><xsl:value-of select="displayItem[@name='name']"/></a>
[4712]97 </xsl:for-each>
98 </xsl:template>
[4047]99
[11233]100 <xsl:template match="service[@name='TextQuery']">
[13276]101 <div class="QuickSearch">
[11233]102 <form name="QuickSearch" method="get" action="{$library_name}">
103 <input type="hidden" name="a" value="q"/>
104 <input type="hidden" name="rt" value="rd"/>
105 <input type="hidden" name="s" value="{@name}"/>
106 <input type="hidden" name="s1.collection" value="all"/>
107 <input type="text" name="s1.query" size="20"/>
[18304]108 <input type="submit"><xsl:attribute name="value"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'home.quick_search')"/></xsl:attribute></input>
[11233]109 </form>
110 </div>
111 </xsl:template>
112
[11016]113 <xsl:template match="serviceList">
[13276]114 <xsl:call-template name="dividerBar"/>
[13505]115 <ul id="servicelist">
[18316]116 <xsl:for-each select="service[@type='query']">
117 <li><a href="{$library_name}?a=q&amp;rt=d&amp;s={@name}"><xsl:value-of select="displayItem[@name='name']"/></a><xsl:value-of select="displayItem[@name='description']"/></li>
[11016]118 </xsl:for-each>
[14294]119 <!--uncomment to display an authentication link-->
[18316]120 <!--<xsl:for-each select="service[@type='authen']">
[14294]121 <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>-->
122 <!--uncomment to display a library interface link-->
[18304]123 <!--<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>-->
[13505]124 </ul>
[18316]125 </xsl:template>
[4047]126</xsl:stylesheet>
127
128
Note: See TracBrowser for help on using the repository browser.