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

Last change on this file since 23255 was 23255, checked in by sjb48, 12 years ago
File size: 12.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="interfaces/oran/js/jquery.selectboxes.js"><xsl:text> </xsl:text></script>
40 <!-- <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.5/jquery-ui.js"><xsl:text> </xsl:text></script> -->
41 <!-- <script type="text/javascript" src="http://code.jquery.com/jquery-1.4.2.min.js"><xsl:text> </xsl:text></script> -->
42 <!-- <script type="text/javascript" src="interfaces/oran/js/jquery-ui-1.8rc1/jquery-1.4.1.js"><xsl:text> </xsl:text></script> -->
43
44 <xsl:call-template name="berryBasketHeadTags"/>
45 </head>
46
47 <body><xsl:call-template name="textDirectionAttribute"/><xsl:call-template name="actionClass"/>
48
49 <xsl:call-template name="displayErrorsIfAny"/>
50
51 <div id="container"><div id="container2"><div id="container3"><div id="container4">
52
53 <div id="gs_banner">
54
55 <!-- show the title -->
56 <div id="breadcrumbs"><xsl:call-template name="breadcrumbs"/><xsl:text> </xsl:text></div>
57 <h2><xsl:call-template name="pageTitle"/></h2>
58
59 <xsl:if test="/page/pageResponse/collection">
60 <!-- show home, help, preferences links -->
61 <ul id="bannerLinks">
62
63 <!-- preferences -->
64 <li>
65 <a href="{$library_name}?a=p&amp;amp;sa=pref&amp;amp;c={$collName}">
66 <xsl:attribute name="title"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'pref_tip')"/></xsl:attribute>
67 <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'pref_b')"/>
68 </a>
69 </li>
70
71 <!-- help -->
72 <li>
73 <a href="{$library_name}?a=p&amp;amp;sa=help&amp;amp;c={$collName}">
74 <xsl:attribute name="title"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'help_tip')"/></xsl:attribute>
75 <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'help_b')"/>
76 </a>
77 </li>
78
79 <li>
80 <a href="{$library_name}?a=p&amp;amp;sa=home">
81 <xsl:attribute name="title"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'home_tip')"/></xsl:attribute>
82 <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'home_b')"/>
83 </a>
84 </li>
85
86 </ul>
87 </xsl:if>
88
89 <!-- show the available 'services' (browse, search, etc.) -->
90 <xsl:if test="/page/pageResponse/collection/serviceList/service">
91 <ul id="nav">
92 <!-- show browse service, if it exists -->
93 <xsl:if test="/page/pageResponse/collection/serviceList/service[@type='browse']">
94 <xsl:for-each select="/page/pageResponse/collection/serviceList/service[@type='browse']">
95 <xsl:call-template name="navigationTab"/>
96 </xsl:for-each>
97 </xsl:if>
98
99 <!-- show search services (collapsed) if they exist -->
100 <xsl:if test="/page/pageResponse/collection/serviceList/service[@type='query']">
101 <xsl:for-each select="/page/pageResponse/collection/serviceList">
102
103 <!--
104 using collapsedNavigationTab instead of navigationTab collapses
105 all the services of the given type onto one tab
106 -->
107 <xsl:call-template name="collapsedNavigationTab">
108 <xsl:with-param name="type">query</xsl:with-param>
109 </xsl:call-template>
110 </xsl:for-each>
111 </xsl:if>
112
113 <!-- all other services -->
114 <xsl:for-each select="/page/pageResponse/collection/serviceList/service[not(@type='query') and not(@type='browse')]">
115 <xsl:call-template name="navigationTab"/>
116 </xsl:for-each>
117
118 </ul>
119 </xsl:if>
120
121 </div>
122
123<!-- *************************************************************************************** -->
124
125 <!-- <xsl:variable name="foo"> -->
126 <!-- <xsl:value-of select="/page/pageRequest/paramList[@name='formatedit']"/> -->
127
128 <xsl:if test="/page/pageRequest/paramList/param[(@name='formatedit') and (@value='1')]">
129
130<!-- Sam2's div code -->
131
132 <script type="text/javascript" src="interfaces/oran/js/gui_div.js"><xsl:text> </xsl:text></script>
133
134 <xsl:call-template name="xml-to-gui-templates">
135 <xsl:with-param name="node-set" select="test"/>
136 <xsl:with-param name="metadataSets" select="//metadataSetList"/>
137 </xsl:call-template>
138
139 <xsl:variable name="fmt1">
140 <xsl:call-template name="xml-to-string">
141 <xsl:with-param name="node-set" select="//format[@type='browse']"/>
142 </xsl:call-template>
143 </xsl:variable>
144
145 <xsl:variable name="meta">
146 <xsl:call-template name="xml-to-string">
147 <xsl:with-param name="node-set" select="//metadataSetList"/>
148 </xsl:call-template>
149 </xsl:variable>
150
151 <style type="text/css">
152 .placeholder{margin-left: 10px; border: dashed 1px #ccc; background-color:#FFFFCC; height:20px; }
153
154 .placeholder_td{margin-left: 10px; border: dashed 1px #ccc; background-color:#FFFFCC; width:20px; }
155
156 .header { background-color: #AFCCAF; border: solid 1px #117711; padding: 5px; padding-left: 10px;}
157
158 .resizable { width: 150px; height: 150px; padding: 0.5em; }
159
160 .block { margin-left: 15px; border-left: dashed 1px black;}
161
162 .droppable { background-color: #99dd99;}
163 .droppable_hl { border: dashed 1px #ccc; background-color:#FFFFCC; }
164
165 <!-- .gsf_metadata { border: solid 2px #0000BB; background-color: #440077; } -->
166
167 <!-- .gsf_choose_metadata { border: solid 1px #000000; background-color: #223344; } -->
168 </style>
169
170 <link rel="stylesheet" type="text/css" href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.7.1/themes/base/jquery-ui.css"/>
171
172 <table width="100%" border="1">
173
174 <td width="75%">
175
176 <div id="formatStatement">
177
178 <xsl:call-template name="xml-to-gui">
179 <xsl:with-param name="node-set" select="//format[@type='browse']"/>
180 <xsl:with-param name="metadataSets" select="//metadataSetList"/>
181 </xsl:call-template>
182
183 </div>
184 </td>
185
186
187 <td width="25%" valign="top">
188 <h2> Elements to add </h2>
189 <!-- <div class="header element_type_gsf_template css_gsf_template" title="gsf:template">TEMPLATE</div> -->
190 <div class="draggable_gsf_template css_gsf_template block" title="gsf:template"><table class="header"><tbody><tr><td class="header">MATCH=<input type="text" name="rawtextinput" size="10"/></td><td><a href="#" class="minmax ui-icon ui-icon-minusthick">[-]</a></td><td><a href="#" class="remove ui-icon ui-icon-closethick">[x]</a></td></tr></tbody></table><table border="1"><tr class="tr"><td class="droppable" width="10px"></td></tr></table></div><br/>
191
192 <div class="draggable_gsf_choose css_gsf_choose_metadata block" title="gsf:choose-metadata"><table class="header"><tbody><tr><td class="header">CHOOSE</td><td class="header"><a href="#" class="minmax ui-icon ui-icon-minusthick" title="Click me to expand">[-]</a></td><td class="header"><a href="#" class="remove ui-icon ui-icon-closethick" title="Click me to remove"/></td></tr></tbody></table></div>
193
194 <div class="draggable_gsf_metadata css_gsf_metadata block" title="gsf:metadata"><table class="header"><tbody><tr><td class="header"><xsl:call-template name="meta-to-combo">
195 <xsl:with-param name="metadataSets" select="//metadataSetList"/>
196 <xsl:with-param name="current" select="ex.Title"/>
197 </xsl:call-template></td><td class="header"><a href="#" class="remove ui-icon ui-icon-closethick" title="Click me to remove"/></td></tr></tbody></table></div>
198
199 <div class="draggable_gsf_link css_gsf_link block" title="gsf:link"><table class="header"><tbody><tr><td class="header">LINK<select>
200 <option value = "document" selected = "document">Document</option>
201 <option value = "classifier">Classifier</option>
202 <option value = "source">Source</option>
203 <option value = "horizontal">Horizontal</option>
204 </select></td><td><a href="#" class="minmax ui-icon ui-icon-minusthick">[-]</a></td><td><a href="#" class="remove ui-icon ui-icon-closethick">[x]</a></td></tr></tbody></table></div>
205
206 <div class="draggable_gsf_switch css_gsf_switch block" title="gsf:switch"><table class="header"><tbody><tr><td class="header">SWITCH</td><td><a href="#" class="minmax ui-icon ui-icon-minusthick">[-]</a></td><td><a href="#" class="remove ui-icon ui-icon-closethick">[x]</a></td></tr></tbody></table></div>
207
208 <div class="draggable_gsf_when css_gsf_when block" title="gsf:when"><table class="header"><tbody><tr><td class="header">WHEN<xsl:value-of select="@test"/></td><td class="header"><a href="#" class="minmax ui-icon ui-icon-minusthick">[-]</a></td><td class="header"><a href="[myhref]" class="ui-icon ui-icon-closethick"/></td></tr></tbody></table></div>
209
210 <div class="draggable_gsf_otherwise css_gsf_otherwise block" title="gsf:otherwise"><table class="header"><tbody><tr><td class="header">OTHERWISE</td><td class="header"><a href="#" class="minmax ui-icon ui-icon-minusthick">[-]</a></td><td><a href="#" class="ui-icon ui-icon-closethick"/></td></tr></tbody></table></div>
211
212 <div class="draggable_gsf_icon css_gsf_icon block" title="gsf:icon"><table class="header"><tbody><tr><td class="header">ICON<select><option value = "document" selected = "document">Document</option><option value = "classifier">Classifier</option><option value = "source">Source</option></select></td><td><a href="#" class="remove ui-icon ui-icon-closethick">[x]</a></td></tr></tbody></table></div>
213 <br/>
214 <div class="element_type_text css_text" title="text">TEXT</div>
215 <div class="element_type_table css_table" title="gsf:table">NEW TABLE</div>
216 <div class="element_type_tr css_tr" title="gsf:row">NEW TABLE ROW</div>
217 <div class="element_type_td css_td" title="gsf:column">NEW TABLE COLUMN</div>
218
219 </td>
220 </table>
221
222 <div id="format">
223 <p>
224 <b>Format string here</b>
225 <i>
226 <xsl:value-of select="$fmt1"/>
227 </i>
228 </p>
229 </div>
230 <!-- <p>
231 <i>
232 <xsl:value-of select="$meta"/>
233 </i>
234 </p>
235 </div> -->
236 </xsl:if>
237
238<!-- *************************************************************************************** -->
239
240 <div id="gs_content">
241 <!--
242 show the content of the page.
243 to customise this part, edit the xsl file for the page you want to edit
244 -->
245 <xsl:apply-templates select="/page"/>
246
247 </div>
248
249 <div id="gs_footer">
250 <xsl:call-template name="poweredByGS3TextBar"/>
251 </div>
252
253 <div class="corner" id="cornerTopLeft"><xsl:text> </xsl:text></div>
254 <div class="corner" id="cornerTopRight"><xsl:text> </xsl:text></div>
255 <div class="corner" id="cornerBottomLeft"><xsl:text> </xsl:text></div>
256 <div class="corner" id="cornerBottomRight"><xsl:text> </xsl:text></div>
257
258 </div></div></div></div>
259
260 </body>
261 </html>
262 </xsl:template>
263
264</xsl:stylesheet>
265
266
Note: See TracBrowser for help on using the repository browser.