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;sa=pref&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;sa=help&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;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{margin-left: 10px; border: dashed 1px #ccc; background-color:#FFFFCC; height:20px; }
|
---|
147 |
|
---|
148 | .placeholder_td{margin-left: 10px; border: dashed 1px #ccc; background-color:#FFFFCC; width:20px; }
|
---|
149 |
|
---|
150 | .header { background-color: #AFCCAF; border: solid 1px #117711; padding: 5px; padding-left: 10px;}
|
---|
151 |
|
---|
152 | .resizable { width: 150px; height: 150px; padding: 0.5em; }
|
---|
153 |
|
---|
154 | .block { margin-left: 15px; border-left: dashed 1px black;}
|
---|
155 |
|
---|
156 | .droppable { background-color: #99dd99;}
|
---|
157 | .droppable_hl { border: dashed 1px #ccc; background-color:#FFFFCC; }
|
---|
158 |
|
---|
159 | <!-- .gsf_metadata { border: solid 2px #0000BB; background-color: #440077; } -->
|
---|
160 |
|
---|
161 | <!-- .gsf_choose_metadata { border: solid 1px #000000; background-color: #223344; } -->
|
---|
162 | </style>
|
---|
163 |
|
---|
164 | <link rel="stylesheet" type="text/css" href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.7.1/themes/base/jquery-ui.css"/>
|
---|
165 |
|
---|
166 | <table width="100%" border="1">
|
---|
167 |
|
---|
168 | <td width="75%">
|
---|
169 |
|
---|
170 | <div id="formatStatement">
|
---|
171 |
|
---|
172 | <xsl:call-template name="xml-to-gui">
|
---|
173 | <xsl:with-param name="node-set" select="//format[@type='browse']"/>
|
---|
174 | <xsl:with-param name="metadataSets" select="//metadataSetList"/>
|
---|
175 | </xsl:call-template>
|
---|
176 |
|
---|
177 | </div>
|
---|
178 | </td>
|
---|
179 |
|
---|
180 |
|
---|
181 | <td width="25%" valign="top">
|
---|
182 | <h2> Elements to add </h2>
|
---|
183 | <div class="header element_type_gsf_template css_gsf_template" title="gsf:template">TEMPLATE</div>
|
---|
184 | <!-- <script type="text/javascript">
|
---|
185 | <xsl:text disable-output-escaping="yes">
|
---|
186 | var index = gsf_template_element.indexOf("<div class=\"");
|
---|
187 | var a = gsf_template_element.slice(0, index + "<div class=\"".length);
|
---|
188 | var b = gsf_template_element.slice(index + "<div class=\"".length + 1);
|
---|
189 | var c = a.concat(".element_type_gsf_template", b);
|
---|
190 | document.write(c);
|
---|
191 | </xsl:text>
|
---|
192 | </script> -->
|
---|
193 | <div class="header element_type_gsf_choose_metadata css_gsf_choose_metadata" title="gsf:choose-metadata">CHOOSE-METADATA</div>
|
---|
194 | <div class="gsf_metadata css_gsf_metadata block leaf" 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 | <!-- <div class="header element_type_gsf_metadata css_gsf_metadata" title="gsf:metadata">METADATA</div> -->
|
---|
199 | <div class="header element_type_gsf_link css_gsf_link" title="gsf:link">LINK</div>
|
---|
200 | <div class="header element_type_gsf_switch css_gsf_switch" title="gsf:switch">SWITCH</div>
|
---|
201 | <div class="header element_type_gsf_when css_gsf_when" title="gsf:when">WHEN</div>
|
---|
202 | <div class="header element_type_gsf_otherwise css_gsf_otherwise" title="gsf:otherwise">OTHERWISE</div>
|
---|
203 | <div class="header element_type_gsf_icon css_gsf_icon" title="gsf:icon">ICON</div>
|
---|
204 | <br/>
|
---|
205 | <div class="element_type_text css_text" title="text">TEXT</div>
|
---|
206 | <div class="element_type_table css_table" title="gsf:table">NEW TABLE</div>
|
---|
207 | <div class="element_type_tr css_tr" title="gsf:row">NEW TABLE ROW</div>
|
---|
208 | <div class="element_type_td css_td" title="gsf:column">NEW TABLE COLUMN</div>
|
---|
209 |
|
---|
210 | </td>
|
---|
211 | </table>
|
---|
212 |
|
---|
213 | <!-- <xsl:variable name="tok" select="fn:tokenize($fmt,'/s+')"/> -->
|
---|
214 |
|
---|
215 | <!-- <div id="format">
|
---|
216 | <p>
|
---|
217 | <b>Format string here</b>
|
---|
218 | <i>
|
---|
219 | <xsl:value-of select="$fmt1"/>
|
---|
220 | </i>
|
---|
221 | </p>
|
---|
222 | <p>
|
---|
223 | <i>
|
---|
224 | <xsl:value-of select="$meta"/>
|
---|
225 | </i>
|
---|
226 | </p>
|
---|
227 | </div> -->
|
---|
228 |
|
---|
229 | <!-- *************************************************************************************** -->
|
---|
230 |
|
---|
231 | <div id="gs_content">
|
---|
232 | <!--
|
---|
233 | show the content of the page.
|
---|
234 | to customise this part, edit the xsl file for the page you want to edit
|
---|
235 | -->
|
---|
236 | <xsl:apply-templates select="/page"/>
|
---|
237 |
|
---|
238 | </div>
|
---|
239 |
|
---|
240 | <div id="gs_footer">
|
---|
241 | <xsl:call-template name="poweredByGS3TextBar"/>
|
---|
242 | </div>
|
---|
243 |
|
---|
244 | <div class="corner" id="cornerTopLeft"><xsl:text> </xsl:text></div>
|
---|
245 | <div class="corner" id="cornerTopRight"><xsl:text> </xsl:text></div>
|
---|
246 | <div class="corner" id="cornerBottomLeft"><xsl:text> </xsl:text></div>
|
---|
247 | <div class="corner" id="cornerBottomRight"><xsl:text> </xsl:text></div>
|
---|
248 |
|
---|
249 | </div></div></div></div>
|
---|
250 |
|
---|
251 | </body>
|
---|
252 | </html>
|
---|
253 | </xsl:template>
|
---|
254 |
|
---|
255 | </xsl:stylesheet>
|
---|
256 |
|
---|
257 |
|
---|