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

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

made the authentication link always active. If the service has not been activated in siteConfig, then nothing will show up. If it has, then I don't think the user should have to modify the interface files as well. Activating the service in siteConfig should be enough.

  • Property svn:keywords set to Author Date Id Revision
File size: 4.5 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"
[20025]6 xmlns:gslib="http://www.greenstone.org/skinning"
[7831]7 extension-element-prefixes="java util"
8 exclude-result-prefixes="java util">
9
10 <!-- style includes global params interface_name, library_name -->
11 <xsl:include href="style.xsl"/>
12
13 <xsl:output method="html"/>
[17019]14
[18318]15 <!-- the main page layout template is here -->
[17019]16 <xsl:template match="page">
17 <html>
[18318]18 <head>
19 <title>
20 <!-- put a space in the title in case the actual value is missing - mozilla will not display a page with no title-->
21 <xsl:call-template name="pageTitle"/><xsl:text> </xsl:text>
22 </title>
23 <xsl:call-template name="globalStyle"/>
24 <xsl:call-template name="pageStyle"/>
25 </head>
[18392]26 <body>
[17019]27 <xsl:attribute name="dir"><xsl:call-template name="direction"/></xsl:attribute>
[18392]28 <div id="page-wrapper">
[18318]29 <xsl:apply-templates select="pageResponse"/>
30 <xsl:call-template name="greenstoneFooter"/>
[17019]31 </div>
32 </body>
33 </html>
34 </xsl:template>
[7831]35
[8532]36 <xsl:template name="pageTitle">
37 <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'gsdl')"/>
[7831]38 </xsl:template>
39
[8532]40 <!-- page specific style goes here -->
41 <xsl:template name="pageStyle"/>
42
[7831]43 <xsl:template match="pageResponse">
[18314]44 <xsl:call-template name="pageBanner"/>
[7831]45 <xsl:apply-templates select="collectionList"/>
[14412]46 <xsl:apply-templates select="serviceList"/>
[7831]47 </xsl:template>
48
[18314]49 <xsl:template name="pageBanner">
[18318]50 <div id="banner">
51 <div class="collectimage">
52 <img src="interfaces/default/images/gsdlhead.gif"><xsl:attribute name="alt"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'gsdl')"/></xsl:attribute>
53 </img>
[18314]54 </div>
[18318]55 </div>
56 <div class="bannerextra"></div>
57 <div id="content">
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>
62 </xsl:template>
[18314]63
[7831]64 <xsl:template match="collectionList">
[20025]65 <ul id="collectionlist">
66 <xsl:for-each select="collection">
67 <li>
68 <gslib:collectionLinkWithImage/>
69 </li>
70 </xsl:for-each>
71 </ul>
72 <xsl:call-template name="collWarning"/>
73 </xsl:template>
74
75 <xsl:template match="collectionListOld">
[7831]76 <xsl:for-each select="collection">
77 <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>
78
79 <p>
[18318]80 <a href="{$library_name}?a=p&amp;sa=about&amp;c={@name}&amp;ct={$ct}">
[7831]81 <img width="150" border="1">
82 <xsl:attribute name="src">
83 <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>
84 </xsl:attribute>
85 <xsl:attribute name="alt">
86 <xsl:value-of select="displayItem[@name='name']"/>
87 </xsl:attribute>
88 </img>
89 </a>
90 </p>
91 </xsl:for-each>
[8054]92 <xsl:call-template name="collWarning"/>
[7831]93 </xsl:template>
94
[8054]95 <xsl:template name="collWarning">
[13254]96 <xsl:call-template name="dividerBar"/>
97 <div>
[20014]98 <xsl:value-of select="util:getInterfaceText('gs2', /page/@lang, 'home.coll_warning')" disable-output-escaping="yes"/>
[13254]99 </div>
[18318]100 </xsl:template>
[14412]101
[18318]102 <xsl:template match="serviceList">
[14412]103 <ul id="servicelist">
[19947]104 <xsl:for-each select="service[@type='query']">
105 <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']"/>
106 </li>
107 </xsl:for-each>
[20291]108 <xsl:for-each select="service[@type='authen']">
109 <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>
110 </xsl:for-each>
[14412]111 <!--uncomment to display a library interface link-->
[18318]112 <!--<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]113 </ul>
[18318]114 </xsl:template>
[14412]115
[7831]116</xsl:stylesheet>
117
118
Note: See TracBrowser for help on using the repository browser.