source: greenstone3/trunk/web/interfaces/oran/transform/layouts/main.xsl@ 20466

Last change on this file since 20466 was 20466, checked in by oranfry, 15 years ago

collapse search services onto one tab

File size: 4.8 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="util java util">
9
10 <!-- put the URL or path of your site here site -->
11 <!-- eg 'http://www.example.com/mysite' or '/mysite' -->
12 <xsl:template name="siteURL"><xsl:value-of select="/page/pageResponse/metadataList/metadata[@name='siteURL']"/></xsl:template>
13
14
15 <!-- the output format for this layout is html -->
16 <xsl:output method="html"/>
17
18 <!-- the main layout is defined here -->
19 <xsl:template match="/">
20
21 <html>
22
23 <head>
24 <title><xsl:call-template name="pageTitle"/> :: <xsl:call-template name="siteName"/></title>
25 <link rel="stylesheet" href="interfaces/{$interface_name}/style/core.css" type="text/css"/>
26 <script type="text/javascript" src="interfaces/oran/js/jquery.js"><xsl:text> </xsl:text></script>
27 <xsl:call-template name="berryBasketHeadTags"/>
28 </head>
29
30 <body><xsl:call-template name="textDirectionAttribute"/><xsl:call-template name="actionClass"/>
31
32 <xsl:call-template name="displayErrorsIfAny"/>
33
34 <div id="container"><div id="container2"><div id="container3"><div id="container4">
35
36 <div id="banner">
37
38 <!-- show the title -->
39 <div id="breadcrumbs"><xsl:call-template name="breadcrumbs"/><xsl:text> </xsl:text></div>
40 <h2><xsl:call-template name="pageTitle"/></h2>
41
42 <xsl:if test="/page/pageResponse/collection">
43 <!-- show home, help, preferences links -->
44 <ul id="bannerLinks">
45
46 <!-- preferences -->
47 <li>
48 <a href="{$library_name}?a=p&amp;amp;sa=pref&amp;amp;c={$collName}">
49 <xsl:attribute name="title"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'pref_tip')"/></xsl:attribute>
50 <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'pref_b')"/>
51 </a>
52 </li>
53
54 <!-- help -->
55 <li>
56 <a href="{$library_name}?a=p&amp;amp;sa=help&amp;amp;c={$collName}">
57 <xsl:attribute name="title"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'help_tip')"/></xsl:attribute>
58 <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'help_b')"/>
59 </a>
60 </li>
61
62 <li>
63 <a href="{$library_name}?a=p&amp;amp;sa=home">
64 <xsl:attribute name="title"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'home_tip')"/></xsl:attribute>
65 <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'home_b')"/>
66 </a>
67 </li>
68
69 </ul>
70 </xsl:if>
71
72 <!-- show the available 'services' (browse, search, etc.) -->
73 <xsl:if test="/page/pageResponse/collection/serviceList/service">
74 <ul id="nav">
75 <!-- show browse service, if it exists -->
76 <xsl:if test="/page/pageResponse/collection/serviceList/service[@type='browse']">
77 <xsl:for-each select="/page/pageResponse/collection/serviceList/service[@type='browse']">
78 <xsl:call-template name="navigationTab"/>
79 </xsl:for-each>
80 </xsl:if>
81
82 <!-- show search services (collapsed) if they exist -->
83 <xsl:if test="/page/pageResponse/collection/serviceList/service[@type='query']">
84 <xsl:for-each select="/page/pageResponse/collection/serviceList">
85
86 <!--
87 using collapsedNavigationTab instead of navigationTab collapses
88 all the services of the given type onto one tab
89 -->
90 <xsl:call-template name="collapsedNavigationTab">
91 <xsl:with-param name="type">query</xsl:with-param>
92 </xsl:call-template>
93 </xsl:for-each>
94 </xsl:if>
95
96 <!-- all other services -->
97 <xsl:for-each select="/page/pageResponse/collection/serviceList/service[not(@type='query') and not(@type='browse')]">
98 <xsl:call-template name="navigationTab"/>
99 </xsl:for-each>
100
101 </ul>
102 </xsl:if>
103
104 </div>
105
106 <div id="content">
107 <!--
108 show the content of the page.
109 to customise this part, edit the xsl file for the page you want to edit
110 -->
111 <xsl:apply-templates select="/page"/>
112
113 </div>
114
115 <div id="footer">
116 <xsl:call-template name="poweredByGS3TextBar"/>
117 </div>
118
119 <div class="corner" id="cornerTopLeft"><xsl:text> </xsl:text></div>
120 <div class="corner" id="cornerTopRight"><xsl:text> </xsl:text></div>
121 <div class="corner" id="cornerBottomLeft"><xsl:text> </xsl:text></div>
122 <div class="corner" id="cornerBottomRight"><xsl:text> </xsl:text></div>
123
124 </div></div></div></div>
125
126 </body>
127 </html>
128 </xsl:template>
129
130</xsl:stylesheet>
131
132
Note: See TracBrowser for help on using the repository browser.