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

Last change on this file since 22458 was 22458, checked in by sjb48, 14 years ago

Transforms for creating Format Statement UI. I have included xml-to-string for debug purposes but will eventually be removed

File size: 6.1 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 xmlns:gsf="http://www.greenstone.org/greenstone3/schema/ConfigFormat"
8 extension-element-prefixes="java util"
9 exclude-result-prefixes="util java util">
10
11 <xsl:include href="xml-to-gui.xsl"/>
12
13 <!-- put the URL or path of your site here site -->
14 <!-- eg 'http://www.example.com/mysite' or '/mysite' -->
15 <xsl:template name="siteURL"><xsl:value-of select="/page/pageResponse/metadataList/metadata[@name='siteURL']"/></xsl:template>
16
17
18 <!-- the output format for this layout is html -->
19 <xsl:output method="html"/>
20
21 <!-- the main layout is defined here -->
22 <xsl:template match="/">
23
24 <html>
25
26 <head>
27 <title><xsl:call-template name="pageTitle"/> :: <xsl:call-template name="siteName"/></title>
28 <link rel="stylesheet" href="interfaces/{$interface_name}/style/core.css" type="text/css"/>
29 <script type="text/javascript" src="interfaces/oran/js/jquery.js"><xsl:text> </xsl:text></script>
30 <xsl:call-template name="berryBasketHeadTags"/>
31 </head>
32
33 <body><xsl:call-template name="textDirectionAttribute"/><xsl:call-template name="actionClass"/>
34
35 <xsl:call-template name="displayErrorsIfAny"/>
36
37 <div id="container"><div id="container2"><div id="container3"><div id="container4">
38
39 <div id="banner">
40
41 <!-- show the title -->
42 <div id="breadcrumbs"><xsl:call-template name="breadcrumbs"/><xsl:text> </xsl:text></div>
43 <h2><xsl:call-template name="pageTitle"/></h2>
44
45 <xsl:if test="/page/pageResponse/collection">
46 <!-- show home, help, preferences links -->
47 <ul id="bannerLinks">
48
49 <!-- preferences -->
50 <li>
51 <a href="{$library_name}?a=p&amp;amp;sa=pref&amp;amp;c={$collName}">
52 <xsl:attribute name="title"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'pref_tip')"/></xsl:attribute>
53 <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'pref_b')"/>
54 </a>
55 </li>
56
57 <!-- help -->
58 <li>
59 <a href="{$library_name}?a=p&amp;amp;sa=help&amp;amp;c={$collName}">
60 <xsl:attribute name="title"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'help_tip')"/></xsl:attribute>
61 <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'help_b')"/>
62 </a>
63 </li>
64
65 <li>
66 <a href="{$library_name}?a=p&amp;amp;sa=home">
67 <xsl:attribute name="title"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'home_tip')"/></xsl:attribute>
68 <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'home_b')"/>
69 </a>
70 </li>
71
72 </ul>
73 </xsl:if>
74
75 <!-- show the available 'services' (browse, search, etc.) -->
76 <xsl:if test="/page/pageResponse/collection/serviceList/service">
77 <ul id="nav">
78 <!-- show browse service, if it exists -->
79 <xsl:if test="/page/pageResponse/collection/serviceList/service[@type='browse']">
80 <xsl:for-each select="/page/pageResponse/collection/serviceList/service[@type='browse']">
81 <xsl:call-template name="navigationTab"/>
82 </xsl:for-each>
83 </xsl:if>
84
85 <!-- show search services (collapsed) if they exist -->
86 <xsl:if test="/page/pageResponse/collection/serviceList/service[@type='query']">
87 <xsl:for-each select="/page/pageResponse/collection/serviceList">
88
89 <!--
90 using collapsedNavigationTab instead of navigationTab collapses
91 all the services of the given type onto one tab
92 -->
93 <xsl:call-template name="collapsedNavigationTab">
94 <xsl:with-param name="type">query</xsl:with-param>
95 </xsl:call-template>
96 </xsl:for-each>
97 </xsl:if>
98
99 <!-- all other services -->
100 <xsl:for-each select="/page/pageResponse/collection/serviceList/service[not(@type='query') and not(@type='browse')]">
101 <xsl:call-template name="navigationTab"/>
102 </xsl:for-each>
103
104 </ul>
105 </xsl:if>
106
107 </div>
108
109<!-- *************************************************************************************** -->
110
111<!-- Sam2's div code -->
112
113 <xsl:variable name="fmt1">
114 <xsl:call-template name="xml-to-string">
115 <xsl:with-param name="node-set" select="//format[@type='browse']"/>
116 </xsl:call-template>
117 </xsl:variable>
118
119 <xsl:variable name="meta">
120 <xsl:call-template name="xml-to-string">
121 <xsl:with-param name="node-set" select="//metadataSetList"/>
122 </xsl:call-template>
123 </xsl:variable>
124
125
126 <xsl:call-template name="xml-to-gui">
127 <xsl:with-param name="node-set" select="//format[@type='browse']"/>
128 <xsl:with-param name="metadataSets" select="//metadataSetList"/>
129 </xsl:call-template>
130
131 <!-- <xsl:variable name="tok" select="fn:tokenize($fmt,'/s+')"/> -->
132
133 <div id="format">
134 <p>
135 <b>Format string here</b>
136 <i>
137 <xsl:value-of select="$fmt1"/>
138 </i>
139 </p>
140 <p>
141 <i>
142 <xsl:value-of select="$meta"/>
143 </i>
144 </p>
145 </div>
146
147<!-- *************************************************************************************** -->
148
149 <div id="content">
150 <!--
151 show the content of the page.
152 to customise this part, edit the xsl file for the page you want to edit
153 -->
154 <xsl:apply-templates select="/page"/>
155
156 </div>
157
158 <div id="footer">
159 <xsl:call-template name="poweredByGS3TextBar"/>
160 </div>
161
162 <div class="corner" id="cornerTopLeft"><xsl:text> </xsl:text></div>
163 <div class="corner" id="cornerTopRight"><xsl:text> </xsl:text></div>
164 <div class="corner" id="cornerBottomLeft"><xsl:text> </xsl:text></div>
165 <div class="corner" id="cornerBottomRight"><xsl:text> </xsl:text></div>
166
167 </div></div></div></div>
168
169 </body>
170 </html>
171 </xsl:template>
172
173</xsl:stylesheet>
174
175
Note: See TracBrowser for help on using the repository browser.