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

Last change on this file since 27101 was 27101, checked in by ak19, 11 years ago

Final commit for GS3 RSS support: if a GS3 collection is built by activating (uncommenting) its RSSRetrieve ServiceRack in its collectionConfig.xml, then an RSS icon will now be added to the button bar of the collection's pages that links to the collection's RSS feed.

  • Property svn:executable set to *
File size: 24.4 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 <xsl:if test="/page/pageResponse/collection/serviceList/service[@name='RSSFeed']">
222 <li><gsf:link type="rss"><gsf:icon file="rssicon.png"/></gsf:link></li>
223 </xsl:if>
224 <!-- preferences -->
225 <li class="ui-state-default ui-corner-all">
226 <a href="{$library_name}/collection/{$collNameChecked}/page/pref">
227 <xsl:attribute name="title"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'pref_tip')"/></xsl:attribute>
228 <ul>
229 <li><span><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'pref_b')"/></span></li>
230 <li><span class="ui-icon ui-icon-wrench"><xsl:text> </xsl:text></span></li>
231 </ul>
232 </a>
233 </li>
234
235 <!-- help -->
236 <li class="ui-state-default ui-corner-all">
237 <a href="{$library_name}/collection/{$collNameChecked}/page/help">
238 <xsl:attribute name="title"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'help_tip')"/></xsl:attribute>
239 <ul>
240 <li><span><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'help_b')"/></span></li>
241 <li><span class="ui-icon ui-icon-help"><xsl:text> </xsl:text></span></li>
242 </ul>
243 </a>
244 </li>
245
246 <!-- login/logout -->
247 <li class="ui-state-default ui-corner-all" id="userMenuButton">
248 <xsl:choose>
249 <xsl:when test="/page/pageRequest/userInformation/@username">
250 <a>
251 <xsl:attribute name="href">javascript:toggleUserMenu();</xsl:attribute>
252 <script type="text/javascript">
253 <xsl:text disable-output-escaping="yes">
254 function toggleUserMenu()
255 {
256 var button = $("#userMenuButton");
257 var menu;
258
259 if(button.data("userMenu"))
260 {
261 menu = button.data("userMenu");
262 if(menu.css("display") == "block")
263 {
264 menu.hide();
265 }
266 else
267 {
268 menu.show();
269 }
270 }
271 else
272 {
273 menu = $("&lt;UL&gt;")
274 .css("position", "absolute")
275 .css("display", "block")
276 .css("z-index", "100")
277 .css("list-style", "none outside none")
278 .css("margin-left", "0px")
279 .css("padding", "0px")
280 .css("font-size", "90%");
281
282 menu.attr("id", "userMenu");
283
284 button.data("userMenu", menu);
285
286 var settingsLink = $("&lt;a&gt;")
287 .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">");
288 var settingsButton = $("&lt;LI&gt;")
289 .css("padding", "3px")
290 .html("Account settings")
291 .addClass("ui-state-default");
292 settingsLink.append(settingsButton);
293
294 var url = document.URL;
295 var hasQueryString = (url.indexOf("?") != -1);
296 var hashIndex = url.indexOf("#");
297
298 var hashPart;
299 if(hashIndex != -1)
300 {
301 hashPart = url.substring(hashIndex);
302 url = url.substring(0, hashIndex);
303 }
304
305 var logoutLink = $("&lt;a&gt;")
306 .attr("href", url + (hasQueryString ? "&amp;" : "?") + "logout=" + (hashPart ? hashPart : ""));
307 var logoutButton = $("&lt;LI&gt;")
308 .css("padding", "3px")
309 .html("Logout")
310 .addClass("ui-state-default");
311 logoutLink.append(logoutButton);
312
313 menu.append(settingsLink);
314 menu.append(logoutLink);
315
316 var buttonLeft = button.offset().left;
317 var buttonTop = button.offset().top;
318 var buttonHeight = button.height();
319
320 menu.offset({top: buttonTop + buttonHeight + 4, left: buttonLeft});
321 $("#topArea").append(menu);
322 }
323 }
324 </xsl:text>
325 </script>
326 <ul>
327 <li><span><xsl:value-of select="/page/pageRequest/userInformation/@username"/></span></li>
328 <li><span class="ui-icon ui-icon-unlocked"><xsl:text> </xsl:text></span></li>
329 </ul>
330 </a>
331 </xsl:when>
332 <xsl:otherwise>
333 <a>
334 <xsl:attribute name="href">
335 <xsl:value-of select="$library_name"/>
336 <xsl:text>?a=p&amp;sa=login&amp;redirectURL=</xsl:text>
337 <xsl:value-of select="$library_name"/>
338 <xsl:text>%3F</xsl:text>
339 <xsl:if test="/page/pageRequest/@action">
340 <xsl:text>a=</xsl:text>
341 <xsl:value-of select="/page/pageRequest/@action"/>
342 </xsl:if>
343 <xsl:if test="/page/pageRequest/@subaction">
344 <xsl:text>%26sa=</xsl:text>
345 <xsl:value-of select="/page/pageRequest/@subaction"/>
346 </xsl:if>
347 <xsl:for-each select="/page/pageRequest/paramList/param">
348 <xsl:if test="@name != 'password' and @name != 's1.password' and @name != 's1.newPassword' and @name != 's1.oldPassword'">
349 <xsl:text>%26</xsl:text>
350 <xsl:value-of select="@name"/>
351 <xsl:text>=</xsl:text>
352 <xsl:value-of select="@value"/>
353 </xsl:if>
354 </xsl:for-each>
355 </xsl:attribute>
356 <xsl:attribute name="title"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'login_tip')"/></xsl:attribute>
357 <ul>
358 <li><span><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'login_b')"/></span></li>
359 <li><span class="ui-icon ui-icon-locked"><xsl:text> </xsl:text></span></li>
360 </ul>
361 </a>
362 </xsl:otherwise>
363 </xsl:choose>
364 </li>
365 <!-- debuginfo (doesn't use class="ui-state-error" since the text is not legible due to inherited text-colour) -->
366 <xsl:if test="/page/pageRequest/paramList/param[(@name='debug') and (@value='on' or @value='true' or @value='1')]">
367 <li class="ui-state-default ui-corner-all">
368 <a href="{$library_name}/collection/{$collNameChecked}/page/debug">
369 <xsl:attribute name="title"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'debuginfo_tip')"/></xsl:attribute>
370 <ul>
371 <li><span><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'debuginfo_b')"/></span></li>
372 <li><span class="ui-icon ui-icon-info"><xsl:text> </xsl:text></span></li>
373 </ul>
374 </a>
375 </li>
376 </xsl:if>
377 </ul>
378 </xsl:template>
379
380 <!-- ***** PAGE TITLE ***** -->
381 <xsl:template name="page-title-area">
382 <xsl:variable name="pageTitleVar"><xsl:call-template name="pageTitle"/></xsl:variable>
383 <div id="titlearea">
384 <h2>
385 <!-- Resize the title based on how long it is (There's probably a better way to do this) -->
386 <xsl:attribute name="style">
387 <xsl:choose>
388 <xsl:when test="string-length($pageTitleVar) &lt; 20">
389 <xsl:text>font-size: 1.5em;</xsl:text>
390 </xsl:when>
391 <xsl:when test="string-length($pageTitleVar) &lt; 30">
392 <xsl:text>font-size: 1.4em;</xsl:text>
393 </xsl:when>
394 <xsl:when test="string-length($pageTitleVar) &lt; 40">
395 <xsl:text>font-size: 1.3em;</xsl:text>
396 </xsl:when>
397 <xsl:when test="string-length($pageTitleVar) &lt; 50">
398 <xsl:text>font-size: 1.2em;</xsl:text>
399 </xsl:when>
400 <xsl:when test="string-length($pageTitleVar) &lt; 60">
401 <xsl:text>font-size: 1.1em;</xsl:text>
402 </xsl:when>
403 <xsl:when test="string-length($pageTitleVar) &lt; 70">
404 <xsl:text>font-size: 1em;</xsl:text>
405 </xsl:when>
406 <xsl:when test="string-length($pageTitleVar) &lt; 80">
407 <xsl:text>font-size: 0.9em;</xsl:text>
408 </xsl:when>
409 <xsl:when test="string-length($pageTitleVar) &lt; 90">
410 <xsl:text>font-size: 0.8em;</xsl:text>
411 </xsl:when>
412 <xsl:otherwise>
413 <xsl:text>font-size: 0.7em;</xsl:text>
414 </xsl:otherwise>
415 </xsl:choose>
416 </xsl:attribute>
417 <!--<xsl:value-of select="string-length($pageTitleVar)" />-->
418 <xsl:value-of select="$pageTitleVar" />
419 </h2><xsl:text> </xsl:text>
420 </div>
421 </xsl:template>
422
423 <!-- ***** QUICK SEARCH AREA ***** -->
424 <!-- Search form should only appear if there's a search (query) service AND it has an index.
425 By default, all collections end up with some query service (default is MGPP) even when they have
426 no search indexes, which is why the extra test for the presence of an index/fq-something is necessary. -->
427 <xsl:template name="quick-search-area">
428 <xsl:if test="/page/pageResponse/collection[@name=$collNameChecked]/serviceList/service[@type='query']">
429 <xsl:variable name="subaction" select="/page/pageRequest/@subaction"/>
430 <div id="quicksearcharea">
431 <xsl:if test="/page/pageResponse/collection[@name=$collNameChecked]/serviceList/service[@name='TextQuery']">
432 <form action="{$library_name}/collection/{$collNameChecked}/search/TextQuery">
433 <!-- This parameter says that we have come from the quick search area -->
434 <input type="hidden" name="qs" value="1"/>
435 <input type="hidden" name="rt" value="rd"/>
436 <input type="hidden" name="s1.level">
437 <xsl:attribute name="value">
438 <xsl:choose>
439 <xsl:when test="/page/pageRequest/paramList/param[@name = 's1.level']">
440 <xsl:value-of select="/page/pageRequest/paramList/param[@name = 's1.level']/@value"/>
441 </xsl:when>
442 <xsl:otherwise>
443 <xsl:value-of select="/page/pageResponse/collection/serviceList/service[@name='TextQuery']/paramList/param[@name = 'level']/@default"/>
444 </xsl:otherwise>
445 </xsl:choose>
446 </xsl:attribute>
447 </input>
448 <xsl:choose>
449 <xsl:when test="/page/pageResponse/service[@name = 'TextQuery']/paramList/param[@name = 'startPage']">
450 <input type="hidden" name="s1.startPage" value="1"/>
451 </xsl:when>
452 <xsl:otherwise>
453 <input type="hidden" name="startPage" value="1"/>
454 </xsl:otherwise>
455 </xsl:choose>
456 <xsl:if test="not(/page/pageRequest/paramList/param[@name = 's1.hitsPerPage'])">
457 <input type="hidden" name="s1.hitsPerPage" value="20"/>
458 </xsl:if>
459 <xsl:if test="not(/page/pageRequest/paramList/param[@name = 's1.maxDocs'])">
460 <input type="hidden" name="s1.maxDocs" value="100"/>
461 </xsl:if>
462 <!-- The query text box -->
463 <span class="querybox">
464 <xsl:variable name="qs">
465 <xsl:apply-templates select="/page/pageResponse/collection[@name=$collNameChecked]/serviceList/service[@name='TextQuery']/paramList/param[@name='query']" mode="calculate-default"/>
466 </xsl:variable>
467 <nobr>
468 <xsl:apply-templates select="/page/pageResponse/collection[@name=$collNameChecked]/serviceList/service[@name='TextQuery']/paramList/param[@name='query']">
469 <xsl:with-param name="default" select="java:org.greenstone.gsdl3.util.XSLTUtil.tidyWhitespace($qs, /page/@lang)"/>
470 </xsl:apply-templates>
471 </nobr>
472 </span>
473 <!-- The index selection list -->
474 <xsl:if test="/page/pageResponse/collection[@name=$collNameChecked]/serviceList/service[@name='TextQuery']/paramList/param[@name='index']/@type = 'enum_single'">
475 <span class="textselect">
476 <xsl:apply-templates select="/page/pageResponse/collection[@name=$collNameChecked]/serviceList/service[@name='TextQuery']/paramList/param[@name='index']">
477 <xsl:with-param name="default">
478 <xsl:apply-templates select="/page/pageResponse/collection[@name=$collNameChecked]/serviceList/service[@name='TextQuery']/paramList/param[@name='index']" mode="calculate-default"/>
479 </xsl:with-param>
480 <xsl:with-param name="hideSingle">true</xsl:with-param>
481 </xsl:apply-templates>
482 </span>
483 </xsl:if>
484 <!-- The submit button (for TextQuery) -->
485 <xsl:if test="/page/pageResponse/collection[@name=$collNameChecked]/serviceList/service[@name='TextQuery']">
486 <input type="submit" id="quickSearchSubmitButton">
487 <xsl:attribute name="value">
488 <xsl:value-of select="/page/pageResponse/collection[@name=$collNameChecked]/serviceList/service[@name='TextQuery']/displayItem[@name='submit']"/>
489 </xsl:attribute>
490 </input>
491 <br/>
492 </xsl:if>
493 </form>
494 </xsl:if>
495 <!-- The list of other search types -->
496 <ul>
497 <xsl:for-each select="/page/pageResponse/collection[@name=$collNameChecked]/serviceList/service[@type='query']">
498 <li class="ui-state-default ui-corner-all">
499 <a>
500 <xsl:attribute name="href">
501 <xsl:value-of select="$library_name"/>/collection/<xsl:value-of select="$collNameChecked"/>/search/<xsl:value-of select="@name"/>
502 </xsl:attribute>
503 <xsl:value-of select="displayItem[@name='name']"/>
504 </a>
505 </li>
506 </xsl:for-each>
507 </ul>
508 </div>
509 </xsl:if>
510 </xsl:template>
511
512 <xsl:template name="map-scripts">
513 <meta content="initial-scale=1.0, user-scalable=no" name="viewport"/>
514 <script src="http://maps.googleapis.com/maps/api/js?sensor=false" type="text/javascript"><xsl:text> </xsl:text></script>
515 <script src="interfaces/{$interface_name}/js/map-scripts.js" type="text/javascript"><xsl:text> </xsl:text></script>
516 <script type="text/javascript">$(window).load(initializeMapScripts);</script>
517 </xsl:template>
518
519 <xsl:template name="openlayers-map-scripts">
520 <script src="interfaces/{interface_name}/js/OpenLayers.js" type="text/javascript"><xsl:text> </xsl:text></script>
521 </xsl:template>
522
523 <xsl:template name="panoramaViewer-scripts">
524 <script src="interfaces/{$interface_name}/js/three45.min.js" type="text/javascript"><xsl:text> </xsl:text></script>
525 <script src="interfaces/{$interface_name}/js/Tween.js" type="text/javascript"><xsl:text> </xsl:text></script>
526 <script src="interfaces/{$interface_name}/js/Detector.js" type="text/javascript"><xsl:text> </xsl:text></script>
527 <script src="interfaces/{$interface_name}/js/RequestAnimationFrame.js" type="text/javascript"><xsl:text> </xsl:text></script>
528 <script src="interfaces/{$interface_name}/js/panoramaMarker.js" type="text/javascript"><xsl:text> </xsl:text></script>
529 <script src="interfaces/{$interface_name}/js/panoramaViewer.js" type="text/javascript"><xsl:text> </xsl:text></script>
530 <script type="text/javascript">$(window).load(initPanoramaViewer);$(window).load(_animate);</script>
531 </xsl:template>
532
533</xsl:stylesheet>
Note: See TracBrowser for help on using the repository browser.