source: main/trunk/greenstone3/web/interfaces/default/transform/layouts/header.xsl@ 26936

Last change on this file since 26936 was 26936, checked in by sjm84, 11 years ago

Adding in the javascript for the visual editor

  • Property svn:executable set to *
File size: 24.1 KB
Line 
1<?xml version="1.0" encoding="UTF-8"?>
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="java util gsf">
10
11 <xsl:include href="../query-common.xsl"/>
12 <xsl:include href="../javascript-global-setup.xsl"/>
13
14 <!-- If the c parameter is empty then use the p.c parameter for the collection name-->
15 <xsl:variable name="collNameChecked">
16 <xsl:choose>
17 <xsl:when test="$collName = '' and /page/pageRequest/paramList/param[@name='p.c']/@value">
18 <xsl:value-of select="/page/pageRequest/paramList/param[@name='p.c']/@value"/>
19 </xsl:when>
20 <xsl:otherwise>
21 <xsl:value-of select="$collName"/>
22 </xsl:otherwise>
23 </xsl:choose>
24 </xsl:variable>
25
26 <!-- Creates a header for the html page -->
27 <xsl:template name="create-html-header">
28 <base>
29 <xsl:attribute name="href">
30 <xsl:choose>
31 <xsl:when test="/page/pageResponse/metadataList/metadata[@name = 'siteURL']">
32 <xsl:value-of select="/page/pageResponse/metadataList/metadata[@name = 'siteURL']"/>
33 </xsl:when>
34 <xsl:when test="/page/pageRequest/@baseURL">
35 <xsl:value-of select="/page/pageRequest/@baseURL"/>
36 </xsl:when>
37 </xsl:choose>
38 </xsl:attribute>
39 </base>
40 <xsl:comment>[if lte IE 6]&gt;&lt;/base&gt;&lt;![endif]</xsl:comment>
41
42 <title><xsl:call-template name="pageTitle"/> :: <xsl:call-template name="siteName"/></title>
43
44 <xsl:if test="/page/pageRequest/@action ='d'">
45
46 <xsl:variable name="myMetadataHeader" select="/page/pageResponse/format/gsf:headMetaTags/gsf:metadata"/>
47 <xsl:for-each select="$myMetadataHeader">
48 <xsl:variable name="metaname" select="@name"/>
49
50 <xsl:variable name="metavals"
51 select="/page/pageResponse/document/metadataList/metadata[@name = $metaname]|/page/pageResponse/document/documentNode/metadataList/metadata[@name = $metaname]"/>
52 <xsl:for-each select="$metavals">
53 <META NAME="{$metaname}" CONTENT="{.}"/>
54 </xsl:for-each>
55 </xsl:for-each>
56
57 </xsl:if>
58
59 <xsl:choose>
60 <xsl:when test="/page/pageResponse/interfaceOptions/option[@name = 'cssTheme']/@value">
61 <!-- Get the theme from the interfaceConfig.xml file -->
62 <link rel="stylesheet" href="{/page/pageResponse/interfaceOptions/option[@name = 'cssTheme']/@value}" type="text/css"/>
63 </xsl:when>
64 <xsl:otherwise>
65 <link rel="stylesheet" href="interfaces/{$interface_name}/style/themes/main/jquery-ui-1.8.16.custom.css" type="text/css"/>
66 </xsl:otherwise>
67 </xsl:choose>
68 <link rel="stylesheet" href="interfaces/{$interface_name}/style/core.css" type="text/css"/>
69 <link rel="shortcut icon" href="interfaces/{$interface_name}/images/favicon.ico"/>
70
71 <script type="text/javascript" src="interfaces/{$interface_name}/js/jquery.min.js"><xsl:text> </xsl:text></script>
72 <script type="text/javascript" src="interfaces/{$interface_name}/js/jquery-ui.min.js"><xsl:text> </xsl:text></script>
73 <script type="text/javascript" src="interfaces/{$interface_name}/js/jquery.themeswitcher.min.js"><xsl:text> </xsl:text></script>
74 <script type="text/javascript" src="interfaces/{$interface_name}/js/jquery.blockUI.js"><xsl:text> </xsl:text></script>
75 <script type="text/javascript" src="interfaces/{$interface_name}/js/ace/ace.js"><xsl:text> </xsl:text></script>
76
77 <script type="text/javascript" src="interfaces/{$interface_name}/js/direct-edit.js"><xsl:text> </xsl:text></script>
78 <script type="text/javascript" src="interfaces/{$interface_name}/js/zoomer.js"><xsl:text> </xsl:text></script>
79
80 <xsl:if test="/page/pageResponse/format[@type='display' or @type='browse' or @type='search']/gsf:option[@name='mapEnabled']/@value = 'true'">
81 <xsl:call-template name="map-scripts"/>
82 </xsl:if>
83
84 <xsl:if test="/page/pageResponse/format/gsf:option[@name='mapEnabledOpenLayers']/@value = 'true'">
85 <xsl:call-template name="openlayers-map-scripts"/>
86 </xsl:if>
87
88
89 <xsl:if test="/page/pageResponse/format/gsf:option[@name='panoramaViewerEnabled']/@value = 'true'">
90 <xsl:call-template name="panoramaViewer-scripts"/>
91 </xsl:if>
92
93
94 <xsl:if test="/page/pageRequest/userInformation and (util:contains(/page/pageRequest/userInformation/@groups, 'administrator') or util:contains(/page/pageRequest/userInformation/@groups, 'all-collections-editor') or util:contains(/page/pageRequest/userInformation/@groups, $thisCollectionEditor))">
95 <xsl:call-template name="init-direct-edit"/>
96 <script type="text/javascript" src="interfaces/{$interface_name}/js/debug_scripts.js"><xsl:text> </xsl:text></script>
97 <script type="text/javascript" src="interfaces/{$interface_name}/js/visual-xml-editor.js"><xsl:text> </xsl:text></script>
98 </xsl:if>
99
100 <xsl:call-template name="setup-gs-variable"/>
101 <xsl:call-template name="define-js-macro-variables"/>
102
103 <xsl:call-template name="additionalHeaderContent"/>
104 </xsl:template>
105
106 <xsl:template name="additionalHeaderContent">
107 <!-- This template should be overridden in the collectionConfig.xml file if you want to add extra header content -->
108 </xsl:template>
109
110 <xsl:template name="init-direct-edit">
111 <script type="text/javascript">
112 <xsl:text disable-output-escaping="yes">
113 de.onready(function()
114 {
115 try
116 {
117 de.init();
118 }
119 catch (err)
120 {
121 alert("Seaweed failed to initialise: " + err.message);
122 }
123 });
124 </xsl:text>
125 </script>
126 </xsl:template>
127
128 <!-- ***** HEADER LAYOUT TEMPLATE ***** -->
129 <xsl:template name="create-banner">
130 <div id="gs_banner" class="ui-widget-header ui-corner-bottom">
131 <div id="titlesearchcontainer">
132 <xsl:call-template name="page-title-area"/>
133 <xsl:call-template name="quick-search-area"/>
134 <div style="clear:both;"><xsl:text> </xsl:text></div>
135 </div>
136 <xsl:call-template name="browsing-tabs"/>
137 </div>
138 </xsl:template>
139
140 <!-- ***** BROWSING TABS ***** -->
141 <xsl:template name="browsing-tabs">
142 <xsl:if test="/page/pageResponse/collection[@name=$collNameChecked]/serviceList/service">
143 <ul id="gs-nav">
144 <!-- If this collection has a ClassifierBrowse service then add a tab for each classifier-->
145 <xsl:if test="/page/pageResponse/collection[@name=$collNameChecked]/serviceList/service[@type='browse' and @name='ClassifierBrowse']">
146 <!-- Loop through each classifier -->
147 <xsl:for-each select="/page/pageResponse/collection[@name=$collNameChecked]/serviceList/service[@name='ClassifierBrowse']/classifierList/classifier">
148 <li>
149 <xsl:choose>
150 <!-- If this tab is selected then colour it differently -->
151 <xsl:when test="util:contains(/page/pageRequest/paramList/param[@name = 'cl' and /page/pageRequest/@action = 'b']/@value, @name)">
152 <xsl:attribute name='class'>ui-state-default ui-corner-top ui-tabs-selected ui-state-active</xsl:attribute>
153 </xsl:when>
154 <xsl:otherwise>
155 <xsl:attribute name='class'>ui-state-default ui-corner-top</xsl:attribute>
156 </xsl:otherwise>
157 </xsl:choose>
158
159 <a>
160 <!-- Add a title element to the <a> tag if a description exists for this classifier -->
161 <xsl:if test="displayItem[@name='description']">
162 <xsl:attribute name='title'><xsl:value-of select="displayItem[@name='description']"/></xsl:attribute>
163 </xsl:if>
164
165 <!-- Add the href element to the <a> tag -->
166 <xsl:choose>
167 <xsl:when test="@name">
168 <xsl:attribute name="href"><xsl:value-of select="$library_name"/>/collection/<xsl:value-of select="/page/pageResponse/collection[@name=$collNameChecked]/@name"/>/browse/<xsl:value-of select="@name"/></xsl:attribute>
169 </xsl:when>
170 <xsl:otherwise>
171 <xsl:attribute name="href"><xsl:value-of select="$library_name"/>/collection/<xsl:value-of select="/page/pageResponse/collection[@name=$collNameChecked]/@name"/>/browse/1</xsl:attribute>
172 </xsl:otherwise>
173 </xsl:choose>
174
175 <!-- Add the actual text of the <a> tag -->
176 <xsl:value-of select="displayItem[@name='name']"/>
177 </a>
178 </li>
179 </xsl:for-each>
180 </xsl:if>
181
182 <!-- PhindApplet. Need something similar for the Collage applet too, probably -->
183 <xsl:for-each select="/page/pageResponse/collection[@name=$collNameChecked]/serviceList/service[@name='PhindApplet']">
184 <li>
185 <xsl:choose>
186 <!-- If this tab is selected then colour it differently -->
187 <xsl:when test="/page/pageRequest[@action='a']">
188 <xsl:attribute name='class'>ui-state-default ui-corner-top ui-tabs-selected ui-state-active</xsl:attribute>
189 </xsl:when>
190 <xsl:otherwise>
191 <xsl:attribute name='class'>ui-state-default ui-corner-top</xsl:attribute>
192 </xsl:otherwise>
193 </xsl:choose>
194
195 <a>
196 <xsl:if test="displayItem[@name='description']">
197 <xsl:attribute name="title">
198 <xsl:value-of select="displayItem[@name='description']"/>
199 </xsl:attribute>
200 </xsl:if>
201 <xsl:attribute name="href"><xsl:value-of select="$library_name"/>?a=a&amp;rt=d&amp;s=<xsl:value-of select="@name"/>&amp;c=<xsl:value-of select="/page/pageResponse/collection/@name"/></xsl:attribute>
202 <xsl:value-of select="displayItem[@name='name']"/>
203 </a>
204 </li>
205 </xsl:for-each>
206
207 <!-- all other services -->
208 <xsl:for-each select="/page/pageResponse/collection[@name=$collNameChecked]/serviceList/service[not(@type='query') and not(@type='browse') and not (@name='PhindApplet')]">
209 <xsl:call-template name="navigationTab"/>
210 </xsl:for-each>
211 </ul>
212 <div style="clear:both;"><xsl:text> </xsl:text></div>
213 </xsl:if>
214 </xsl:template>
215
216 <!-- ***** HOME HELP PREFERENCES LOGIN ***** -->
217 <xsl:template name="home-help-preferences">
218 <ul id="bannerLinks">
219 <!-- preferences -->
220 <li class="ui-state-default ui-corner-all">
221 <a href="{$library_name}/collection/{$collNameChecked}/page/pref">
222 <xsl:attribute name="title"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'pref_tip')"/></xsl:attribute>
223 <ul>
224 <li><span><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'pref_b')"/></span></li>
225 <li><span class="ui-icon ui-icon-wrench"><xsl:text> </xsl:text></span></li>
226 </ul>
227 </a>
228 </li>
229
230 <!-- help -->
231 <li class="ui-state-default ui-corner-all">
232 <a href="{$library_name}/collection/{$collNameChecked}/page/help">
233 <xsl:attribute name="title"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'help_tip')"/></xsl:attribute>
234 <ul>
235 <li><span><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'help_b')"/></span></li>
236 <li><span class="ui-icon ui-icon-help"><xsl:text> </xsl:text></span></li>
237 </ul>
238 </a>
239 </li>
240
241 <!-- login/logout -->
242 <li class="ui-state-default ui-corner-all" id="userMenuButton">
243 <xsl:choose>
244 <xsl:when test="/page/pageRequest/userInformation/@username">
245 <a>
246 <xsl:attribute name="href">javascript:toggleUserMenu();</xsl:attribute>
247 <script type="text/javascript">
248 <xsl:text disable-output-escaping="yes">
249 function toggleUserMenu()
250 {
251 var button = $("#userMenuButton");
252 var menu;
253
254 if(button.data("userMenu"))
255 {
256 menu = button.data("userMenu");
257 if(menu.css("display") == "block")
258 {
259 menu.hide();
260 }
261 else
262 {
263 menu.show();
264 }
265 }
266 else
267 {
268 menu = $("&lt;UL&gt;")
269 .css("position", "absolute")
270 .css("display", "block")
271 .css("z-index", "100")
272 .css("list-style", "none outside none")
273 .css("margin-left", "0px")
274 .css("padding", "0px")
275 .css("font-size", "90%");
276
277 menu.attr("id", "userMenu");
278
279 button.data("userMenu", menu);
280
281 var settingsLink = $("&lt;a&gt;")
282 .attr("href", gs.xsltParams.library_name + "/admin/AccountSettings?s1.username=</xsl:text><xsl:value-of select="/page/pageRequest/userInformation/@username"/><xsl:text disable-output-escaping="yes">");
283 var settingsButton = $("&lt;LI&gt;")
284 .css("padding", "3px")
285 .html("Account settings")
286 .addClass("ui-state-default");
287 settingsLink.append(settingsButton);
288
289 var url = document.URL;
290 var hasQueryString = (url.indexOf("?") != -1);
291 var hashIndex = url.indexOf("#");
292
293 var hashPart;
294 if(hashIndex != -1)
295 {
296 hashPart = url.substring(hashIndex);
297 url = url.substring(0, hashIndex);
298 }
299
300 var logoutLink = $("&lt;a&gt;")
301 .attr("href", url + (hasQueryString ? "&amp;" : "?") + "logout=" + (hashPart ? hashPart : ""));
302 var logoutButton = $("&lt;LI&gt;")
303 .css("padding", "3px")
304 .html("Logout")
305 .addClass("ui-state-default");
306 logoutLink.append(logoutButton);
307
308 menu.append(settingsLink);
309 menu.append(logoutLink);
310
311 var buttonLeft = button.offset().left;
312 var buttonTop = button.offset().top;
313 var buttonHeight = button.height();
314
315 menu.offset({top: buttonTop + buttonHeight + 4, left: buttonLeft});
316 $("#topArea").append(menu);
317 }
318 }
319 </xsl:text>
320 </script>
321 <ul>
322 <li><span><xsl:value-of select="/page/pageRequest/userInformation/@username"/></span></li>
323 <li><span class="ui-icon ui-icon-unlocked"><xsl:text> </xsl:text></span></li>
324 </ul>
325 </a>
326 </xsl:when>
327 <xsl:otherwise>
328 <a>
329 <xsl:attribute name="href">
330 <xsl:value-of select="$library_name"/>
331 <xsl:text>?a=p&amp;sa=login&amp;redirectURL=</xsl:text>
332 <xsl:value-of select="$library_name"/>
333 <xsl:text>%3F</xsl:text>
334 <xsl:if test="/page/pageRequest/@action">
335 <xsl:text>a=</xsl:text>
336 <xsl:value-of select="/page/pageRequest/@action"/>
337 </xsl:if>
338 <xsl:if test="/page/pageRequest/@subaction">
339 <xsl:text>%26sa=</xsl:text>
340 <xsl:value-of select="/page/pageRequest/@subaction"/>
341 </xsl:if>
342 <xsl:for-each select="/page/pageRequest/paramList/param">
343 <xsl:if test="@name != 'password' and @name != 's1.password' and @name != 's1.newPassword' and @name != 's1.oldPassword'">
344 <xsl:text>%26</xsl:text>
345 <xsl:value-of select="@name"/>
346 <xsl:text>=</xsl:text>
347 <xsl:value-of select="@value"/>
348 </xsl:if>
349 </xsl:for-each>
350 </xsl:attribute>
351 <xsl:attribute name="title"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'login_tip')"/></xsl:attribute>
352 <ul>
353 <li><span><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'login_b')"/></span></li>
354 <li><span class="ui-icon ui-icon-locked"><xsl:text> </xsl:text></span></li>
355 </ul>
356 </a>
357 </xsl:otherwise>
358 </xsl:choose>
359 </li>
360 <!-- debuginfo (doesn't use class="ui-state-error" since the text is not legible due to inherited text-colour) -->
361 <xsl:if test="/page/pageRequest/paramList/param[(@name='debug') and (@value='on' or @value='true' or @value='1')]">
362 <li class="ui-state-default ui-corner-all">
363 <a href="{$library_name}/collection/{$collNameChecked}/page/debug">
364 <xsl:attribute name="title"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'debuginfo_tip')"/></xsl:attribute>
365 <ul>
366 <li><span><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'debuginfo_b')"/></span></li>
367 <li><span class="ui-icon ui-icon-info"><xsl:text> </xsl:text></span></li>
368 </ul>
369 </a>
370 </li>
371 </xsl:if>
372 </ul>
373 </xsl:template>
374
375 <!-- ***** PAGE TITLE ***** -->
376 <xsl:template name="page-title-area">
377 <xsl:variable name="pageTitleVar"><xsl:call-template name="pageTitle"/></xsl:variable>
378 <div id="titlearea">
379 <h2>
380 <!-- Resize the title based on how long it is (There's probably a better way to do this) -->
381 <xsl:attribute name="style">
382 <xsl:choose>
383 <xsl:when test="string-length($pageTitleVar) &lt; 20">
384 <xsl:text>font-size: 1.5em;</xsl:text>
385 </xsl:when>
386 <xsl:when test="string-length($pageTitleVar) &lt; 30">
387 <xsl:text>font-size: 1.4em;</xsl:text>
388 </xsl:when>
389 <xsl:when test="string-length($pageTitleVar) &lt; 40">
390 <xsl:text>font-size: 1.3em;</xsl:text>
391 </xsl:when>
392 <xsl:when test="string-length($pageTitleVar) &lt; 50">
393 <xsl:text>font-size: 1.2em;</xsl:text>
394 </xsl:when>
395 <xsl:when test="string-length($pageTitleVar) &lt; 60">
396 <xsl:text>font-size: 1.1em;</xsl:text>
397 </xsl:when>
398 <xsl:when test="string-length($pageTitleVar) &lt; 70">
399 <xsl:text>font-size: 1em;</xsl:text>
400 </xsl:when>
401 <xsl:when test="string-length($pageTitleVar) &lt; 80">
402 <xsl:text>font-size: 0.9em;</xsl:text>
403 </xsl:when>
404 <xsl:when test="string-length($pageTitleVar) &lt; 90">
405 <xsl:text>font-size: 0.8em;</xsl:text>
406 </xsl:when>
407 <xsl:otherwise>
408 <xsl:text>font-size: 0.7em;</xsl:text>
409 </xsl:otherwise>
410 </xsl:choose>
411 </xsl:attribute>
412 <!--<xsl:value-of select="string-length($pageTitleVar)" />-->
413 <xsl:value-of select="$pageTitleVar" />
414 </h2><xsl:text> </xsl:text>
415 </div>
416 </xsl:template>
417
418 <!-- ***** QUICK SEARCH AREA ***** -->
419 <!-- Search form should only appear if there's a search (query) service AND it has an index.
420 By default, all collections end up with some query service (default is MGPP) even when they have
421 no search indexes, which is why the extra test for the presence of an index/fq-something is necessary. -->
422 <xsl:template name="quick-search-area">
423 <xsl:if test="/page/pageResponse/collection[@name=$collNameChecked]/serviceList/service[@type='query']">
424 <xsl:variable name="subaction" select="/page/pageRequest/@subaction"/>
425 <div id="quicksearcharea">
426 <xsl:if test="/page/pageResponse/collection[@name=$collNameChecked]/serviceList/service[@name='TextQuery']">
427 <form action="{$library_name}/collection/{$collNameChecked}/search/TextQuery">
428 <!-- This parameter says that we have come from the quick search area -->
429 <input type="hidden" name="qs" value="1"/>
430 <input type="hidden" name="rt" value="rd"/>
431 <input type="hidden" name="s1.level">
432 <xsl:attribute name="value">
433 <xsl:choose>
434 <xsl:when test="/page/pageRequest/paramList/param[@name = 's1.level']">
435 <xsl:value-of select="/page/pageRequest/paramList/param[@name = 's1.level']/@value"/>
436 </xsl:when>
437 <xsl:otherwise>
438 <xsl:value-of select="/page/pageResponse/collection/serviceList/service[@name='TextQuery']/paramList/param[@name = 'level']/@default"/>
439 </xsl:otherwise>
440 </xsl:choose>
441 </xsl:attribute>
442 </input>
443 <xsl:choose>
444 <xsl:when test="/page/pageResponse/service[@name = 'TextQuery']/paramList/param[@name = 'startPage']">
445 <input type="hidden" name="s1.startPage" value="1"/>
446 </xsl:when>
447 <xsl:otherwise>
448 <input type="hidden" name="startPage" value="1"/>
449 </xsl:otherwise>
450 </xsl:choose>
451 <xsl:if test="not(/page/pageRequest/paramList/param[@name = 's1.hitsPerPage'])">
452 <input type="hidden" name="s1.hitsPerPage" value="20"/>
453 </xsl:if>
454 <xsl:if test="not(/page/pageRequest/paramList/param[@name = 's1.maxDocs'])">
455 <input type="hidden" name="s1.maxDocs" value="100"/>
456 </xsl:if>
457 <!-- The query text box -->
458 <span class="querybox">
459 <xsl:variable name="qs">
460 <xsl:apply-templates select="/page/pageResponse/collection[@name=$collNameChecked]/serviceList/service[@name='TextQuery']/paramList/param[@name='query']" mode="calculate-default"/>
461 </xsl:variable>
462 <nobr>
463 <xsl:apply-templates select="/page/pageResponse/collection[@name=$collNameChecked]/serviceList/service[@name='TextQuery']/paramList/param[@name='query']">
464 <xsl:with-param name="default" select="java:org.greenstone.gsdl3.util.XSLTUtil.tidyWhitespace($qs, /page/@lang)"/>
465 </xsl:apply-templates>
466 </nobr>
467 </span>
468 <!-- The index selection list -->
469 <xsl:if test="/page/pageResponse/collection[@name=$collNameChecked]/serviceList/service[@name='TextQuery']/paramList/param[@name='index']/@type = 'enum_single'">
470 <span class="textselect">
471 <xsl:apply-templates select="/page/pageResponse/collection[@name=$collNameChecked]/serviceList/service[@name='TextQuery']/paramList/param[@name='index']">
472 <xsl:with-param name="default">
473 <xsl:apply-templates select="/page/pageResponse/collection[@name=$collNameChecked]/serviceList/service[@name='TextQuery']/paramList/param[@name='index']" mode="calculate-default"/>
474 </xsl:with-param>
475 <xsl:with-param name="hideSingle">true</xsl:with-param>
476 </xsl:apply-templates>
477 </span>
478 </xsl:if>
479 <!-- The submit button (for TextQuery) -->
480 <xsl:if test="/page/pageResponse/collection[@name=$collNameChecked]/serviceList/service[@name='TextQuery']">
481 <input type="submit" id="quickSearchSubmitButton">
482 <xsl:attribute name="value">
483 <xsl:value-of select="/page/pageResponse/collection[@name=$collNameChecked]/serviceList/service[@name='TextQuery']/displayItem[@name='submit']"/>
484 </xsl:attribute>
485 </input>
486 <br/>
487 </xsl:if>
488 </form>
489 </xsl:if>
490 <!-- The list of other search types -->
491 <ul>
492 <xsl:for-each select="/page/pageResponse/collection[@name=$collNameChecked]/serviceList/service[@type='query']">
493 <li class="ui-state-default ui-corner-all">
494 <a>
495 <xsl:attribute name="href">
496 <xsl:value-of select="$library_name"/>/collection/<xsl:value-of select="$collNameChecked"/>/search/<xsl:value-of select="@name"/>
497 </xsl:attribute>
498 <xsl:value-of select="displayItem[@name='name']"/>
499 </a>
500 </li>
501 </xsl:for-each>
502 </ul>
503 </div>
504 </xsl:if>
505 </xsl:template>
506
507 <xsl:template name="map-scripts">
508 <meta content="initial-scale=1.0, user-scalable=no" name="viewport"/>
509 <script src="http://maps.googleapis.com/maps/api/js?sensor=false" type="text/javascript"><xsl:text> </xsl:text></script>
510 <script src="interfaces/{$interface_name}/js/map-scripts.js" type="text/javascript"><xsl:text> </xsl:text></script>
511 <script type="text/javascript">$(window).load(initializeMapScripts);</script>
512 </xsl:template>
513
514 <xsl:template name="openlayers-map-scripts">
515 <script src="interfaces/{interface_name}/js/OpenLayers.js" type="text/javascript"><xsl:text> </xsl:text></script>
516 </xsl:template>
517
518 <xsl:template name="panoramaViewer-scripts">
519 <script src="interfaces/{$interface_name}/js/three45.min.js" type="text/javascript"><xsl:text> </xsl:text></script>
520 <script src="interfaces/{$interface_name}/js/Tween.js" type="text/javascript"><xsl:text> </xsl:text></script>
521 <script src="interfaces/{$interface_name}/js/Detector.js" type="text/javascript"><xsl:text> </xsl:text></script>
522 <script src="interfaces/{$interface_name}/js/RequestAnimationFrame.js" type="text/javascript"><xsl:text> </xsl:text></script>
523 <script src="interfaces/{$interface_name}/js/panoramaMarker.js" type="text/javascript"><xsl:text> </xsl:text></script>
524 <script src="interfaces/{$interface_name}/js/panoramaViewer.js" type="text/javascript"><xsl:text> </xsl:text></script>
525 <script type="text/javascript">$(window).load(initPanoramaViewer);$(window).load(_animate);</script>
526 </xsl:template>
527
528</xsl:stylesheet>
Note: See TracBrowser for help on using the repository browser.