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

Last change on this file since 22987 was 22987, checked in by sjb48, 11 years ago
File size: 9.7 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
9 xmlns:lxslt="http://xml.apache.org/xslt"
10 xmlns:result="http://www.example.com/results"
11 xmlns:exsl="http://exslt.org/common"
12
13 extension-element-prefixes="java util result exsl"
14 exclude-result-prefixes="util java util">
15
16 <xsl:include href="xml-to-gui.xsl"/>
17 <xsl:include href="xml-to-gui-templates.xsl"/>
18
19 <!-- put the URL or path of your site here site -->
20 <!-- eg 'http://www.example.com/mysite' or '/mysite' -->
21 <xsl:template name="siteURL"><xsl:value-of select="/page/pageResponse/metadataList/metadata[@name='siteURL']"/></xsl:template>
22
23
24 <!-- the output format for this layout is html -->
25 <xsl:output method="html"/>
26
27 <!-- the main layout is defined here -->
28 <xsl:template match="/">
29
30 <html>
31
32 <head>
33 <title><xsl:call-template name="pageTitle"/> :: <xsl:call-template name="siteName"/></title>
34 <link rel="stylesheet" href="interfaces/{$interface_name}/style/core.css" type="text/css"/>
35 <!-- <script type="text/javascript" src="interfaces/oran/js/jquery.js"><xsl:text> </xsl:text></script> -->
36 <script type="text/javascript" src="interfaces/oran/js/jquery-1.4.2.js"><xsl:text> </xsl:text></script>
37 <!-- <script type="text/javascript" src="interfaces/oran/js/jquery-ui-1.8.2.custom.min.js"><xsl:text> </xsl:text></script> -->
38 <script type="text/javascript" src="interfaces/oran/js/jquery-ui-1.8rc1/ui/jquery-ui.js"><xsl:text> </xsl:text></script>
39 <!-- <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.5/jquery-ui.js"><xsl:text> </xsl:text></script> -->
40 <!-- <script type="text/javascript" src="http://code.jquery.com/jquery-1.4.2.min.js"><xsl:text> </xsl:text></script> -->
41 <!-- <script type="text/javascript" src="interfaces/oran/js/jquery-ui-1.8rc1/jquery-1.4.1.js"><xsl:text> </xsl:text></script> -->
42
43 <xsl:call-template name="berryBasketHeadTags"/>
44 </head>
45
46 <body><xsl:call-template name="textDirectionAttribute"/><xsl:call-template name="actionClass"/>
47
48 <xsl:call-template name="displayErrorsIfAny"/>
49
50 <div id="container"><div id="container2"><div id="container3"><div id="container4">
51
52 <div id="gs_banner">
53
54 <!-- show the title -->
55 <div id="breadcrumbs"><xsl:call-template name="breadcrumbs"/><xsl:text> </xsl:text></div>
56 <h2><xsl:call-template name="pageTitle"/></h2>
57
58 <xsl:if test="/page/pageResponse/collection">
59 <!-- show home, help, preferences links -->
60 <ul id="bannerLinks">
61
62 <!-- preferences -->
63 <li>
64 <a href="{$library_name}?a=p&amp;amp;sa=pref&amp;amp;c={$collName}">
65 <xsl:attribute name="title"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'pref_tip')"/></xsl:attribute>
66 <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'pref_b')"/>
67 </a>
68 </li>
69
70 <!-- help -->
71 <li>
72 <a href="{$library_name}?a=p&amp;amp;sa=help&amp;amp;c={$collName}">
73 <xsl:attribute name="title"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'help_tip')"/></xsl:attribute>
74 <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'help_b')"/>
75 </a>
76 </li>
77
78 <li>
79 <a href="{$library_name}?a=p&amp;amp;sa=home">
80 <xsl:attribute name="title"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'home_tip')"/></xsl:attribute>
81 <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'home_b')"/>
82 </a>
83 </li>
84
85 </ul>
86 </xsl:if>
87
88 <!-- show the available 'services' (browse, search, etc.) -->
89 <xsl:if test="/page/pageResponse/collection/serviceList/service">
90 <ul id="nav">
91 <!-- show browse service, if it exists -->
92 <xsl:if test="/page/pageResponse/collection/serviceList/service[@type='browse']">
93 <xsl:for-each select="/page/pageResponse/collection/serviceList/service[@type='browse']">
94 <xsl:call-template name="navigationTab"/>
95 </xsl:for-each>
96 </xsl:if>
97
98 <!-- show search services (collapsed) if they exist -->
99 <xsl:if test="/page/pageResponse/collection/serviceList/service[@type='query']">
100 <xsl:for-each select="/page/pageResponse/collection/serviceList">
101
102 <!--
103 using collapsedNavigationTab instead of navigationTab collapses
104 all the services of the given type onto one tab
105 -->
106 <xsl:call-template name="collapsedNavigationTab">
107 <xsl:with-param name="type">query</xsl:with-param>
108 </xsl:call-template>
109 </xsl:for-each>
110 </xsl:if>
111
112 <!-- all other services -->
113 <xsl:for-each select="/page/pageResponse/collection/serviceList/service[not(@type='query') and not(@type='browse')]">
114 <xsl:call-template name="navigationTab"/>
115 </xsl:for-each>
116
117 </ul>
118 </xsl:if>
119
120 </div>
121
122<!-- *************************************************************************************** -->
123
124<!-- Sam2's div code -->
125
126 <script type="text/javascript" src="interfaces/oran/js/gui_div.js"><xsl:text> </xsl:text></script>
127
128 <xsl:call-template name="xml-to-gui-templates">
129 <xsl:with-param name="node-set" select="test"/>
130 <xsl:with-param name="metadataSets" select="//metadataSetList"/>
131 </xsl:call-template>
132
133 <xsl:variable name="fmt1">
134 <xsl:call-template name="xml-to-string">
135 <xsl:with-param name="node-set" select="//format[@type='browse']"/>
136 </xsl:call-template>
137 </xsl:variable>
138
139 <xsl:variable name="meta">
140 <xsl:call-template name="xml-to-string">
141 <xsl:with-param name="node-set" select="//metadataSetList"/>
142 </xsl:call-template>
143 </xsl:variable>
144
145 <style type="text/css">
146 .placeholder{
147 margin-left: 10px;
148 border: dashed 1px #ccc;
149 background-color:#FFFFCC;
150 height:20px;
151 }
152
153 .header { background-color: #AFCCAF; border: solid 1px #117711; padding: 5px;}
154
155 .resizable { width: 150px; height: 150px; padding: 0.5em; }
156
157 .block { margin-left: 10px; border-left: dashed 1px black;}
158
159 .droppable { background-color: #99dd99;}
160 .droppable_hl { border: dashed 1px #ccc; background-color:#FFFFCC; }
161
162 <!-- .gsf_metadata { border: solid 2px #0000BB; background-color: #440077; } -->
163
164 <!-- .gsf_choose_metadata { border: solid 1px #000000; background-color: #223344; } -->
165 </style>
166
167 <link rel="stylesheet" type="text/css" href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.7.1/themes/base/jquery-ui.css"/>
168
169 <table width="100%" border="1">
170
171 <td width="75%">
172
173 <div id="formatStatement">
174
175 <xsl:call-template name="xml-to-gui">
176 <xsl:with-param name="node-set" select="//format[@type='browse']"/>
177 <xsl:with-param name="metadataSets" select="//metadataSetList"/>
178 </xsl:call-template>
179
180 </div>
181 </td>
182
183
184 <td width="25%" valign="top">
185 <h2> Elements to add </h2>
186 <div class="element_type_gsf_template css_gsf_template" title="gsf:template">NEW GSF:TEMPLATE MATCH</div>
187 <div class="element_type_gsf_choose_metadata css_gsf_choose_metadata" title="gsf:choose-metadata">NEW GSF:CHOOSE-METADATA</div>
188 <div class="element_type_gsf_metadata css_gsf_metadata" title="gsf:metadata">NEW GSF:METADATA</div>
189 <div class="element_type_gsf_link css_gsf_link" title="gsf:link">NEW GSF:LINK</div>
190 <div class="element_type_gsf_switch css_gsf_switch" title="gsf:switch">NEW GSF:SWITCH</div>
191 <div class="element_type_gsf_when css_gsf_when" title="gsf:when">NEW GSF:WHEN</div>
192 <div class="element_type_gsf_otherwise css_gsf_otherwise" title="gsf:otherwise">NEW GSF:OTHERWISE</div>
193 <div class="element_type_gsf_icon css_gsf_icon" title="gsf:icon">NEW GSF:ICON</div>
194 <br/>
195 <div class="element_type_text css_text" title="text">TEXT</div>
196 <div class="element_type_table css_table" title="gsf:table">NEW TABLE</div>
197 <div class="element_type_tr css_tr" title="gsf:row">NEW TABLE ROW</div>
198 <div class="element_type_td css_td" title="gsf:column">NEW TABLE COLUMN</div>
199
200 </td>
201 </table>
202
203 <!-- <xsl:variable name="tok" select="fn:tokenize($fmt,'/s+')"/> -->
204
205 <div id="format">
206 <p>
207 <b>Format string here</b>
208 <i>
209 <xsl:value-of select="$fmt1"/>
210 </i>
211 </p>
212 <p>
213 <i>
214 <xsl:value-of select="$meta"/>
215 </i>
216 </p>
217 </div>
218
219<!-- *************************************************************************************** -->
220
221 <div id="gs_content">
222 <!--
223 show the content of the page.
224 to customise this part, edit the xsl file for the page you want to edit
225 -->
226 <xsl:apply-templates select="/page"/>
227
228 </div>
229
230 <div id="gs_footer">
231 <xsl:call-template name="poweredByGS3TextBar"/>
232 </div>
233
234 <div class="corner" id="cornerTopLeft"><xsl:text> </xsl:text></div>
235 <div class="corner" id="cornerTopRight"><xsl:text> </xsl:text></div>
236 <div class="corner" id="cornerBottomLeft"><xsl:text> </xsl:text></div>
237 <div class="corner" id="cornerBottomRight"><xsl:text> </xsl:text></div>
238
239 </div></div></div></div>
240
241 </body>
242 </html>
243 </xsl:template>
244
245</xsl:stylesheet>
246
247
Note: See TracBrowser for help on using the repository browser.