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

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

Fixing a minor error

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