source: other-projects/tipple-android/i-greenstone-server-files/greenstone/webapps/greenstone3/interfaces/gs2/transform/home.xsl@ 26899

Last change on this file since 26899 was 26899, checked in by davidb, 11 years ago

Tipple reborn after Chris's Summer of Code 2013

  • Property svn:mime-type set to application/xml
File size: 4.5 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 xmlns:gslib="http://www.greenstone.org/skinning"
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"/>
14
15 <!-- the main page layout template is here -->
16 <xsl:template match="page">
17 <html>
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>
26 <body>
27 <xsl:attribute name="dir"><xsl:call-template name="direction"/></xsl:attribute>
28 <div id="page-wrapper">
29 <xsl:apply-templates select="pageResponse"/>
30 <xsl:call-template name="greenstoneFooter"/>
31 </div>
32 </body>
33 </html>
34 </xsl:template>
35
36 <xsl:template name="pageTitle">
37 <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'gsdl')"/>
38 </xsl:template>
39
40 <!-- page specific style goes here -->
41 <xsl:template name="pageStyle"/>
42
43 <xsl:template match="page/pageResponse">
44 <xsl:call-template name="pageBanner"/>
45 <xsl:apply-templates select="collectionList"/>
46 <xsl:apply-templates select="serviceList"/>
47 </xsl:template>
48
49 <xsl:template name="pageBanner">
50 <div id="banner">
51 <div class="collectimage">
52 <img src="interfaces/basic/images/gsdlhead.gif"><xsl:attribute name="alt"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'gsdl')"/></xsl:attribute>
53 </img>
54 </div>
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>
63
64 <xsl:template match="collectionList">
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">
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>
80 <a href="{$library_name}?a=p&amp;sa=about&amp;c={@name}&amp;ct={$ct}">
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>
92 <xsl:call-template name="collWarning"/>
93 </xsl:template>
94
95 <xsl:template name="collWarning">
96 <xsl:call-template name="dividerBar"/>
97 <div>
98 <xsl:value-of select="util:getInterfaceText('gs2', /page/@lang, 'home.coll_warning')" disable-output-escaping="yes"/>
99 </div>
100 </xsl:template>
101
102 <xsl:template match="serviceList">
103 <ul id="servicelist">
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>
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>
111 <!--uncomment to display a library interface link-->
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>-->
113 </ul>
114 </xsl:template>
115
116</xsl:stylesheet>
117
118
Note: See TracBrowser for help on using the repository browser.