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 | xmlns:lxslt="http://xml.apache.org/xslt"
|
---|
9 | xmlns:result="http://www.example.com/results"
|
---|
10 | xmlns:exsl="http://exslt.org/common"
|
---|
11 |
|
---|
12 | extension-element-prefixes="java util result exsl"
|
---|
13 | exclude-result-prefixes="util java gsf">
|
---|
14 |
|
---|
15 | <xsl:import href="./toc.xsl" />
|
---|
16 | <!--
|
---|
17 | <xsl:import href="footer.xsl"/>
|
---|
18 | -->
|
---|
19 |
|
---|
20 | <!-- The main layout is defined here -->
|
---|
21 | <!-- Every page in our library uses this template -->
|
---|
22 | <xsl:template name="mainTemplate">
|
---|
23 | <html>
|
---|
24 | <head>
|
---|
25 | <!-- ***** in header.xsl ***** -->
|
---|
26 | <xsl:call-template name="create-html-header"/>
|
---|
27 | <xsl:call-template name="basketHeadTags"/>
|
---|
28 | </head>
|
---|
29 | <body id="top" class="banner-overlay-on">
|
---|
30 | <div id="spacer-for-nav"> </div>
|
---|
31 | <div class="wrapper">
|
---|
32 | <div class="shifted-frame">
|
---|
33 |
|
---|
34 | <!-- Whakatohea.co.nz's navbar - no longer in use now that the dl site is
|
---|
35 | embedded in iframe on whakatohea.co.nz site which provides the navbar -->
|
---|
36 | <!--<xsl:call-template name="whakatohea-navbar"/>-->
|
---|
37 |
|
---|
38 | <div class="site-canvas">
|
---|
39 | <div class="wrapper-old">
|
---|
40 | <div id="header-old">
|
---|
41 | <div class="banner-wrap">
|
---|
42 | <div class="wsite-elements wsite-not-footer wsite-header-elements">
|
---|
43 | <div class="wsite-section-wrap">
|
---|
44 | <div style="background-image: url("interfaces/{$interface_name}/images/digital-library.jpg");">
|
---|
45 | <xsl:choose>
|
---|
46 | <xsl:when test="/page/pageResponse/collection or /page/pageResponse/pathList/group">
|
---|
47 | <xsl:attribute name="class">wsite-section wsite-header-section wsite-section-bg-image crop-bg</xsl:attribute>
|
---|
48 | </xsl:when>
|
---|
49 | <xsl:otherwise>
|
---|
50 | <xsl:attribute name="class">wsite-section wsite-header-section wsite-section-bg-image full-bg</xsl:attribute>
|
---|
51 | </xsl:otherwise>
|
---|
52 | </xsl:choose>
|
---|
53 |
|
---|
54 | <div class="wsite-section-content">
|
---|
55 | <div class="container">
|
---|
56 | <div class="banner">
|
---|
57 | <div class="wsite-section-elements">
|
---|
58 | <h2 class="wsite-content-title" style="text-align:center;"><font size="6"><a href="{$library_name}"><xsl:call-template name="siteName"/></a></font></h2>
|
---|
59 |
|
---|
60 | <!-- Why does this feel like it's still inside the banner-wrap? -->
|
---|
61 | <xsl:choose>
|
---|
62 | <xsl:when test="page/pageResponse/collection">
|
---|
63 | <div id="coll-name-link">
|
---|
64 | <p> 
|
---|
65 | <a href="{$library_name}/collection/{$collNameChecked}/page/about">
|
---|
66 | <xsl:value-of select="page/pageResponse/collection/displayItemList/displayItem[@name='name']"/>
|
---|
67 | </a>
|
---|
68 | </p>
|
---|
69 | <br class="clear"/>
|
---|
70 | </div>
|
---|
71 | </xsl:when>
|
---|
72 |
|
---|
73 | <xsl:when test="/page/pageRequest/paramList/param[@name='group']/@value">
|
---|
74 | <div id="coll-name-link">
|
---|
75 | <p>
|
---|
76 | <xsl:value-of select="/page/pageRequest/paramList/param[@name='group']/@value"/>
|
---|
77 | </p>
|
---|
78 | <br class="clear"/>
|
---|
79 | </div>
|
---|
80 | </xsl:when>
|
---|
81 | </xsl:choose>
|
---|
82 | </div> <!-- end wsite-section-elements -->
|
---|
83 | </div> <!-- end banner -->
|
---|
84 | </div> <!-- end container -->
|
---|
85 | </div> <!-- end wsite-section-content -->
|
---|
86 | </div> <!-- end header container -->
|
---|
87 | </div> <!-- end wsite-section-wrap -->
|
---|
88 | </div> <!-- end header section -->
|
---|
89 |
|
---|
90 | <div class="container wrapper-old col2" id="browse-search-bars">
|
---|
91 | <div id="topbar">
|
---|
92 | <xsl:if test="page/pageRequest/@subaction='home'">
|
---|
93 | <div id="cross-coll-div">
|
---|
94 | <xsl:call-template name="crossCollSearch"/>
|
---|
95 | </div>
|
---|
96 | </xsl:if>
|
---|
97 | <xsl:if test="page/pageRequest/paramList/param/@name='c' and /page/pageResponse/collection[@name=$collNameChecked]/serviceList/service[@name='TextQuery']">
|
---|
98 | <xsl:call-template name="quick-search-area"/>
|
---|
99 | </xsl:if>
|
---|
100 | </div>
|
---|
101 | </div>
|
---|
102 |
|
---|
103 | </div> <!-- end banner-wrap -->
|
---|
104 | </div> <!-- end header-old -->
|
---|
105 | </div> <!-- end wrapper-old -->
|
---|
106 |
|
---|
107 | <!--<xsl:call-template name="login-prefs-help-links"/>-->
|
---|
108 | <!--<hr class="spacer" />-->
|
---|
109 | <div class="outer">
|
---|
110 | <xsl:if test="page/pageResponse/collection">
|
---|
111 | <xsl:attribute name="class">outer collectionDisplay</xsl:attribute>
|
---|
112 | <xsl:call-template name="sideNavBar"/>
|
---|
113 | </xsl:if>
|
---|
114 |
|
---|
115 | <div id="gs_content" class="container">
|
---|
116 | <xsl:apply-templates select="/page" />
|
---|
117 | </div>
|
---|
118 |
|
---|
119 | <xsl:choose>
|
---|
120 | <xsl:when test="not(/page/pageResponse/format[@type='display']/gsf:option[@name='sideBar']) or /page/pageResponse/format[@type='display']/gsf:option[@name='sideBar']/@value='true'">
|
---|
121 | <xsl:variable name="documentCount" select="count(/page/pageResponse/document)" />
|
---|
122 |
|
---|
123 | <xsl:choose>
|
---|
124 | <xsl:when test="$documentCount > 0">
|
---|
125 | <!-- We need this for-each statement to select the right node -->
|
---|
126 | <xsl:for-each select="/page/pageResponse/document">
|
---|
127 | <xsl:call-template name="rightSidebarTOCAlt"/>
|
---|
128 | </xsl:for-each>
|
---|
129 | </xsl:when>
|
---|
130 |
|
---|
131 | <!-- No sidebars were created, add spacer -->
|
---|
132 | <xsl:otherwise>
|
---|
133 | <gsf:div />
|
---|
134 | </xsl:otherwise>
|
---|
135 | </xsl:choose>
|
---|
136 | </xsl:when>
|
---|
137 |
|
---|
138 | <!-- The sidebar is disabled, add spacer -->
|
---|
139 | <xsl:otherwise>
|
---|
140 | <gsf:div />
|
---|
141 | </xsl:otherwise>
|
---|
142 | </xsl:choose>
|
---|
143 |
|
---|
144 | <!-- <br class="clear" /> -->
|
---|
145 | </div> <!-- end outer -->
|
---|
146 |
|
---|
147 | <xsl:call-template name="wmtb-footer"/>
|
---|
148 |
|
---|
149 | </div> <!-- end site-canvas -->
|
---|
150 | </div> <!-- end shifted-frame -->
|
---|
151 | </div> <!-- end wrapper-->
|
---|
152 | </body>
|
---|
153 | </html>
|
---|
154 | </xsl:template>
|
---|
155 |
|
---|
156 | <xsl:template name="sideNavBar">
|
---|
157 | <div class="side-navbar">
|
---|
158 | <!--
|
---|
159 | Using select statement to count only non-empty elements, is harder than testing
|
---|
160 | for non-empty elements. Solution of using normalize-space() is from
|
---|
161 | https://stackoverflow.com/questions/31602369/xsl-return-only-the-first-non-empty-element
|
---|
162 | -->
|
---|
163 | <xsl:variable name="classifierCount" select="count(/page/pageResponse/collection/serviceList/service[@name='ClassifierBrowse']/classifierList/classifier/displayItem[@name = 'name'][normalize-space()])"/>
|
---|
164 |
|
---|
165 | <!-- TODO: Hardcoded strings! -->
|
---|
166 |
|
---|
167 | <a href="{$library_name}">Our Six Pou</a>
|
---|
168 |
|
---|
169 | <a href="{$library_name}/collection/{$collNameChecked}/page/about">
|
---|
170 | <xsl:if test="page/pageRequest/@subaction='about'">
|
---|
171 | <xsl:attribute name="class">active</xsl:attribute>
|
---|
172 | </xsl:if>
|
---|
173 |
|
---|
174 | About Collection
|
---|
175 | </a>
|
---|
176 |
|
---|
177 | <hr class="side-navbar-separator" />
|
---|
178 |
|
---|
179 | <xsl:if test="$classifierCount > 0">
|
---|
180 | <span>Browse by:</span>
|
---|
181 | <ul>
|
---|
182 | <xsl:call-template name="listBrowsingClassifiers"/>
|
---|
183 | </ul>
|
---|
184 | </xsl:if>
|
---|
185 |
|
---|
186 | <!--Login link is disabled, as it was determined to be confusing with Whakatohea's existing login elements -->
|
---|
187 | <!-- <hr class="side-navbar-separator" />
|
---|
188 | <xsl:call-template name="loginLinks"/> -->
|
---|
189 | </div>
|
---|
190 | </xsl:template>
|
---|
191 |
|
---|
192 | <!--
|
---|
193 | This was in the old navbar. Might come in useful?
|
---|
194 |
|
---|
195 | <xsl:variable name="currentPage" select="page/pageRequest/@fullURL"/>
|
---|
196 | <xsl:if test="/page/pageResponse/collection/serviceList/service/@type='query'">
|
---|
197 | <li>
|
---|
198 | <a href="{$currentPage}">Search</a>
|
---|
199 | <ul>
|
---|
200 | <xsl:for-each select="/page/pageResponse/collection/serviceList/service[@type='query']">
|
---|
201 | <xsl:variable name="search" select="@name"/>
|
---|
202 | <xsl:variable name="search_name" select="displayItem[@name='name']"/>
|
---|
203 |
|
---|
204 | <li>
|
---|
205 | <a href="{$library_name}/collection/{$collNameChecked}/search/{$search}">
|
---|
206 | <xsl:value-of select="$search_name"/>
|
---|
207 | </a>
|
---|
208 | </li>
|
---|
209 | </xsl:for-each>
|
---|
210 | </ul>
|
---|
211 | </li>
|
---|
212 | </xsl:if>
|
---|
213 | -->
|
---|
214 |
|
---|
215 | <!-- Builds a list of the named browsing classifiers that are defined in the response. -->
|
---|
216 | <xsl:template name="listBrowsingClassifiers">
|
---|
217 | <xsl:for-each select="/page/pageResponse/collection/serviceList/service[@name='ClassifierBrowse']/classifierList/classifier">
|
---|
218 | <xsl:choose>
|
---|
219 | <!--
|
---|
220 | Only display browsing classifiers that have a name.
|
---|
221 | Those that don't have a name are empty classifiers
|
---|
222 | denoted by no value/empty value for displayItem name=name elements.
|
---|
223 | Testing for non empty elements is easy: not() test.
|
---|
224 | -->
|
---|
225 | <xsl:when test="not(displayItem[@name='name'] ='')">
|
---|
226 | <li>
|
---|
227 | <a>
|
---|
228 | <!-- Indicates that this classifier's content is being displayed -->
|
---|
229 | <xsl:if test="util:contains(/page/pageRequest/paramList/param[@name = 'cl' and /page/pageRequest/@action = 'b']/@value, @name)">
|
---|
230 | <xsl:attribute name="class">active</xsl:attribute>
|
---|
231 | </xsl:if>
|
---|
232 |
|
---|
233 | <!-- Add a title element to the <a> tag if a description exists for this classifier -->
|
---|
234 | <xsl:if test="displayItem[@name='description']">
|
---|
235 | <xsl:attribute name='title'><xsl:value-of select="displayItem[@name='description']"/></xsl:attribute>
|
---|
236 | </xsl:if>
|
---|
237 |
|
---|
238 | <!-- Add the href element to the <a> tag -->
|
---|
239 | <xsl:choose>
|
---|
240 | <xsl:when test="@name">
|
---|
241 | <xsl:attribute name="href">
|
---|
242 | <xsl:value-of select="$library_name"/>/collection/<xsl:value-of select="/page/pageResponse/collection[@name=$collNameChecked]/@name"/>/browse/<xsl:value-of select="@name"/>
|
---|
243 | </xsl:attribute>
|
---|
244 | </xsl:when>
|
---|
245 | <xsl:otherwise>
|
---|
246 | <xsl:attribute name="href">
|
---|
247 | <xsl:value-of select="$library_name"/>/collection/<xsl:value-of select="/page/pageResponse/collection[@name=$collNameChecked]/@name"/>/browse/1
|
---|
248 | </xsl:attribute>
|
---|
249 | </xsl:otherwise>
|
---|
250 | </xsl:choose>
|
---|
251 |
|
---|
252 | <!-- Add the actual text of the <a> tag -->
|
---|
253 | <xsl:value-of select="displayItem[@name='name']"/>
|
---|
254 | </a>
|
---|
255 | </li>
|
---|
256 | </xsl:when>
|
---|
257 | </xsl:choose>
|
---|
258 | </xsl:for-each>
|
---|
259 | </xsl:template>
|
---|
260 |
|
---|
261 | <xsl:template name="crossCollSearch">
|
---|
262 | <div id="search">
|
---|
263 | <xsl:for-each select="/page/pageResponse/serviceList/service[@name='TextQuery']">
|
---|
264 | <form name="QuickSearch" method="get" action="{$library_name}">
|
---|
265 | <input type="hidden" name="a" value="q"/>
|
---|
266 | <input type="hidden" name="rt" value="rd"/>
|
---|
267 | <input type="hidden" name="s" value="{@name}"/>
|
---|
268 | <input type="hidden" name="s1.collection" value="all"/>
|
---|
269 | <input type="text" name="s1.query" id="search-text" value="Search all collectionsâŠ" onfocus="this.value=(this.value=='Search all collectionsâŠ')? '' : this.value ;" />
|
---|
270 | <input type="submit" name="go" id="go" value="Search" />
|
---|
271 | </form>
|
---|
272 | </xsl:for-each>
|
---|
273 | </div>
|
---|
274 | <br class="clear" />
|
---|
275 | </xsl:template>
|
---|
276 |
|
---|
277 | <xsl:template name="CollectionSearch">
|
---|
278 | <div id="search">
|
---|
279 | <xsl:variable name="subaction" select="/page/pageRequest/@subaction"/>
|
---|
280 | <form action="{$library_name}/collection/{$collNameChecked}/search/TextQuery">
|
---|
281 | <!-- This parameter says that we have come from the quick search area -->
|
---|
282 | <input type="hidden" name="qs" value="1"/>
|
---|
283 | <input type="hidden" name="rt" value="rd"/>
|
---|
284 | <input type="hidden" name="s1.level">
|
---|
285 | <xsl:attribute name="value">
|
---|
286 | <xsl:choose>
|
---|
287 | <xsl:when test="/page/pageRequest/paramList/param[@name = 's1.level']">
|
---|
288 | <xsl:value-of select="/page/pageRequest/paramList/param[@name = 's1.level']/@value"/>
|
---|
289 | </xsl:when>
|
---|
290 | <xsl:otherwise>
|
---|
291 | <xsl:value-of select="/page/pageResponse/collection/serviceList/service[@name='TextQuery']/paramList/param[@name = 'level']/@default"/>
|
---|
292 | </xsl:otherwise>
|
---|
293 | </xsl:choose>
|
---|
294 | </xsl:attribute>
|
---|
295 | </input>
|
---|
296 | <xsl:choose>
|
---|
297 | <xsl:when test="/page/pageResponse/service[@name = 'TextQuery']/paramList/param[@name = 'startPage']">
|
---|
298 | <input type="hidden" name="s1.startPage" value="1"/>
|
---|
299 | </xsl:when>
|
---|
300 | <xsl:otherwise>
|
---|
301 | <input type="hidden" name="startPage" value="1"/>
|
---|
302 | </xsl:otherwise>
|
---|
303 | </xsl:choose>
|
---|
304 | <xsl:if test="not(/page/pageRequest/paramList/param[@name = 's1.hitsPerPage'])">
|
---|
305 | <input type="hidden" name="s1.hitsPerPage" value="20"/>
|
---|
306 | </xsl:if>
|
---|
307 | <xsl:if test="not(/page/pageRequest/paramList/param[@name = 's1.maxDocs'])">
|
---|
308 | <input type="hidden" name="s1.maxDocs" value="100"/>
|
---|
309 | </xsl:if>
|
---|
310 | <!-- The query text box -->
|
---|
311 | <span class="querybox">
|
---|
312 | <xsl:variable name="qs">
|
---|
313 | <xsl:apply-templates select="/page/pageResponse/collection[@name=$collNameChecked]/serviceList/service[@name='TextQuery']/paramList/param[@name='query']" mode="calculate-default"/>
|
---|
314 | </xsl:variable>
|
---|
315 | <nobr>
|
---|
316 | <xsl:apply-templates select="/page/pageResponse/collection[@name=$collNameChecked]/serviceList/service[@name='TextQuery']/paramList/param[@name='query']">
|
---|
317 | <xsl:with-param name="default" select="java:org.greenstone.gsdl3.util.XSLTUtil.tidyWhitespace($qs, /page/@lang)"/>
|
---|
318 | </xsl:apply-templates>
|
---|
319 | </nobr>
|
---|
320 | </span>
|
---|
321 | <!-- The submit button (for TextQuery) -->
|
---|
322 | <xsl:if test="/page/pageResponse/collection[@name=$collNameChecked]/serviceList/service[@name='TextQuery']">
|
---|
323 | <input type="submit" name="go" id="go" value="Search" > </input>
|
---|
324 | <br/>
|
---|
325 | </xsl:if>
|
---|
326 | </form>
|
---|
327 | </div>
|
---|
328 | <br class="clear" />
|
---|
329 | <!--<div id="advanced"><a href="{$library_name}/collection/{$collNameChecked}/search/TextQuery">advanced search</a></div>-->
|
---|
330 | </xsl:template>
|
---|
331 |
|
---|
332 |
|
---|
333 | <xsl:template name="loginLinks">
|
---|
334 | <xsl:variable name="username" select="/page/pageRequest/userInformation/@username"/>
|
---|
335 | <xsl:variable name="groups" select="/page/pageRequest/userInformation/@groups"/>
|
---|
336 |
|
---|
337 | <xsl:choose>
|
---|
338 | <xsl:when test="$username">
|
---|
339 | <!-- Depositor link: only for logged-in users.
|
---|
340 | CSS class=login to make Depositor link blue to indicate it's only available when logged in.
|
---|
341 | Don't put this depositorTitleAndLink inside the test for whether user 'admin' is
|
---|
342 | in the current list of groups, as we want the depositor link to be visible for any
|
---|
343 | logged in user. The collection they want to deposit a doc into will determine whether
|
---|
344 | that user has the right to modify that collection.
|
---|
345 | -->
|
---|
346 | <xsl:if test="contains($groups,'admin')">
|
---|
347 | <li class="login"><gslib:depositorTitleAndLink/></li> <!-- move back up/outside if admin test if non-admin members should be able to deposit -->
|
---|
348 | <li class="login"><a href="{$library_name}/admin/AddUser">Add user</a></li>
|
---|
349 | <li class="login"><a href="{$library_name}/admin/ListUsers">Administration</a></li>
|
---|
350 | <li class="login"><a href="{$library_name}/admin/AccountSettings?s1.username={$username}">Logged in as: <xsl:value-of select="$username"/></a></li><!-- move back up/outside if admin test if non-admin members should be able to reset their password -->
|
---|
351 | </xsl:if>
|
---|
352 | <li class="login"><a href="{$library_name}?logout=">Logout</a></li>
|
---|
353 | </xsl:when>
|
---|
354 | <xsl:otherwise>
|
---|
355 | <li class="login">
|
---|
356 | <a href="{$library_name}?a=p&sa=login&redirectURL={$library_name}%3Fa=p%26sa=home">Login
|
---|
357 | <xsl:attribute name="title">
|
---|
358 | <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'login_tip')"/>
|
---|
359 | </xsl:attribute>
|
---|
360 | </a>
|
---|
361 | </li>
|
---|
362 | </xsl:otherwise>
|
---|
363 | </xsl:choose>
|
---|
364 | </xsl:template>
|
---|
365 |
|
---|
366 | <xsl:template name="quick-search-area">
|
---|
367 | <xsl:if test="/page/pageResponse/collection[@name=$collNameChecked]/serviceList/service[@type='query']">
|
---|
368 | <xsl:variable name="subaction" select="/page/pageRequest/@subaction"/>
|
---|
369 |
|
---|
370 | <div id="quicksearcharea">
|
---|
371 | <xsl:if test="/page/pageResponse/collection[@name=$collNameChecked]/serviceList/service[@name='TextQuery']">
|
---|
372 | <xsl:choose>
|
---|
373 | <xsl:when test="not(page/pageRequest[@action='q']) or /page/pageRequest/paramList/param[@name='qs']/@value = '1'">
|
---|
374 | <form action="{$library_name}/collection/{$collNameChecked}/search/TextQuery">
|
---|
375 | <!-- This parameter says that we have come from the quick search area -->
|
---|
376 |
|
---|
377 | <input type="hidden" name="qs" value="1"/>
|
---|
378 | <input type="hidden" name="rt" value="rd"/>
|
---|
379 | <!-- don't hide indexing levels: code further down will hide it if there's only 1 indexing level.
|
---|
380 | and display a dropdown if the collection's configured with more than 1 index level available -->
|
---|
381 | <!--<input type="hidden" name="s1.level">
|
---|
382 | <xsl:attribute name="value">
|
---|
383 | <xsl:value-of select="/page/pageResponse/collection/serviceList/service[@name='TextQuery']/paramList/param[@name = 'level']/@default"/>
|
---|
384 | </xsl:attribute>
|
---|
385 | </input>
|
---|
386 | -->
|
---|
387 | <xsl:choose>
|
---|
388 | <xsl:when test="/page/pageResponse/service[@name = 'TextQuery']/paramList/param[@name = 'startPage']">
|
---|
389 | <input type="hidden" name="s1.startPage" value="1"/>
|
---|
390 | </xsl:when>
|
---|
391 | <xsl:otherwise>
|
---|
392 | <input type="hidden" name="startPage" value="1"/>
|
---|
393 | </xsl:otherwise>
|
---|
394 | </xsl:choose>
|
---|
395 |
|
---|
396 | <!-- The query text box -->
|
---|
397 | Search for
|
---|
398 | <span class="querybox">
|
---|
399 | <xsl:variable name="qs">
|
---|
400 | <xsl:apply-templates select="/page/pageResponse/collection[@name=$collNameChecked]/serviceList/service[@name='TextQuery']/paramList/param[@name='query']" mode="calculate-default"/>
|
---|
401 | </xsl:variable>
|
---|
402 | <nobr>
|
---|
403 | <xsl:apply-templates select="/page/pageResponse/collection[@name=$collNameChecked]/serviceList/service[@name='TextQuery']/paramList/param[@name='query']">
|
---|
404 | <!--
|
---|
405 | <xsl:with-param name="default" select="java:org.greenstone.gsdl3.util.XSLTUtil.tidyWhitespace($qs, /page/@lang)"/>
|
---|
406 | -->
|
---|
407 | <xsl:with-param name="default" select="normalize-space($qs)"/>
|
---|
408 |
|
---|
409 | </xsl:apply-templates>
|
---|
410 | </nobr>
|
---|
411 | </span>
|
---|
412 | <!-- The index selection list -->
|
---|
413 | in
|
---|
414 | <xsl:if test="/page/pageResponse/collection[@name=$collNameChecked]/serviceList/service[@name='TextQuery']/paramList/param[@name='index']/@type = 'enum_single'">
|
---|
415 | <span class="textselect">
|
---|
416 | <xsl:apply-templates select="/page/pageResponse/collection[@name=$collNameChecked]/serviceList/service[@name='TextQuery']/paramList/param[@name='index']">
|
---|
417 | <xsl:with-param name="default">
|
---|
418 | <xsl:apply-templates select="/page/pageResponse/collection[@name=$collNameChecked]/serviceList/service[@name='TextQuery']/paramList/param[@name='index']" mode="calculate-default"/>
|
---|
419 | </xsl:with-param>
|
---|
420 | <xsl:with-param name="hideSingle">false</xsl:with-param>
|
---|
421 | <xsl:with-param name="quickSearch">true</xsl:with-param>
|
---|
422 | </xsl:apply-templates>
|
---|
423 | </span>
|
---|
424 | </xsl:if>
|
---|
425 | <!-- The partition selection list -->
|
---|
426 | <xsl:if test="/page/pageResponse/collection[@name=$collNameChecked]/serviceList/service[@name='TextQuery']/paramList/param[@name='indexSubcollection']/@type = 'enum_single'">
|
---|
427 | <span class="textselect">
|
---|
428 | <xsl:apply-templates select="/page/pageResponse/collection[@name=$collNameChecked]/serviceList/service[@name='TextQuery']/paramList/param[@name='indexSubcollection']">
|
---|
429 | <xsl:with-param name="default">
|
---|
430 | <xsl:apply-templates select="/page/pageResponse/collection[@name=$collNameChecked]/serviceList/service[@name='TextQuery']/paramList/param[@name='indexSubcollection']" mode="calculate-default"/>
|
---|
431 | </xsl:with-param>
|
---|
432 | <xsl:with-param name="hideSingle">true</xsl:with-param>
|
---|
433 | <xsl:with-param name="quickSearch">true</xsl:with-param>
|
---|
434 | </xsl:apply-templates>
|
---|
435 | </span>
|
---|
436 | </xsl:if>
|
---|
437 |
|
---|
438 | <!-- The index level selection list. hideSingle=true to hide the dropdown if there's only 1 level (the default). -->
|
---|
439 | at
|
---|
440 | <xsl:if test="/page/pageResponse/collection[@name=$collNameChecked]/serviceList/service[@name='TextQuery']/paramList/param[@name='level']/@type = 'enum_single'">
|
---|
441 | <span class="textselect">
|
---|
442 | <xsl:apply-templates select="/page/pageResponse/collection[@name=$collNameChecked]/serviceList/service[@name='TextQuery']/paramList/param[@name='level']">
|
---|
443 | <xsl:with-param name="default">
|
---|
444 | <xsl:apply-templates select="/page/pageResponse/collection[@name=$collNameChecked]/serviceList/service[@name='TextQuery']/paramList/param[@name='level']" mode="calculate-default"/>
|
---|
445 | </xsl:with-param>
|
---|
446 | <xsl:with-param name="hideSingle">true</xsl:with-param>
|
---|
447 | <xsl:with-param name="quickSearch">true</xsl:with-param>
|
---|
448 | </xsl:apply-templates>
|
---|
449 | </span>
|
---|
450 | </xsl:if>
|
---|
451 | level
|
---|
452 |
|
---|
453 | <!-- The language selection list -->
|
---|
454 | <xsl:if test="/page/pageResponse/collection[@name=$collNameChecked]/serviceList/service[@name='TextQuery']/paramList/param[@name='indexLanguage']/@type = 'enum_single'">
|
---|
455 | <span class="textselect">
|
---|
456 | <xsl:apply-templates select="/page/pageResponse/collection[@name=$collNameChecked]/serviceList/service[@name='TextQuery']/paramList/param[@name='indexLanguage']">
|
---|
457 | <xsl:with-param name="default">
|
---|
458 | <xsl:apply-templates select="/page/pageResponse/collection[@name=$collNameChecked]/serviceList/service[@name='TextQuery']/paramList/param[@name='indexLanguage']" mode="calculate-default"/>
|
---|
459 | </xsl:with-param>
|
---|
460 | <xsl:with-param name="hideSingle">true</xsl:with-param>
|
---|
461 | <xsl:with-param name="quickSearch">true</xsl:with-param>
|
---|
462 | </xsl:apply-templates>
|
---|
463 | </span>
|
---|
464 | </xsl:if>
|
---|
465 | <!-- The submit button (for TextQuery) -->
|
---|
466 | <xsl:if test="/page/pageResponse/collection[@name=$collNameChecked]/serviceList/service[@name='TextQuery']">
|
---|
467 | <!--<input type="submit" id="quickSearchSubmitButton">
|
---|
468 | <xsl:attribute name="value">
|
---|
469 | <xsl:value-of select="/page/pageResponse/collection[@name=$collNameChecked]/serviceList/service[@name='TextQuery']/displayItem[@name='submit']"/>
|
---|
470 | </xsl:attribute>
|
---|
471 | </input>-->
|
---|
472 |
|
---|
473 | <input type="submit" id="quickSearchSubmitButton" value="Go"/>
|
---|
474 |
|
---|
475 | <br/>
|
---|
476 | </xsl:if>
|
---|
477 | </form>
|
---|
478 |
|
---|
479 | <div class="query-form-links" id="advanced"><a href="{$library_name}/collection/{$collNameChecked}/search/AdvancedFieldQuery">Advanced search</a></div>
|
---|
480 |
|
---|
481 | </xsl:when>
|
---|
482 | <xsl:otherwise><br/></xsl:otherwise>
|
---|
483 | </xsl:choose>
|
---|
484 | </xsl:if>
|
---|
485 |
|
---|
486 | </div>
|
---|
487 | <!--<br class="clear" />-->
|
---|
488 | <!--<span id="advanced">-->
|
---|
489 |
|
---|
490 | <!-- The list of other search types -->
|
---|
491 | <!--<xsl:call-template name="all-other-search-form-links"/>-->
|
---|
492 |
|
---|
493 |
|
---|
494 | </xsl:if>
|
---|
495 |
|
---|
496 |
|
---|
497 | <!--<br class="clear" />
|
---|
498 | <div id="advanced"><a href="{$library_name}/collection/{$collNameChecked}/search/TextQuery">form search</a></div>
|
---|
499 | <div id="advanced"><a href="{$library_name}/collection/{$collNameChecked}/search/AdvancedFieldQuery">advanced search</a></div>
|
---|
500 | -->
|
---|
501 | </xsl:template>
|
---|
502 |
|
---|
503 | <!-- Bar that links to other search forms -->
|
---|
504 | <xsl:template name="all-other-search-form-links">
|
---|
505 | <!-- The list of other search types -->
|
---|
506 | <div class="query-form-links">
|
---|
507 | <ul>
|
---|
508 | <xsl:for-each select="/page/pageResponse/collection[@name=$collNameChecked]/serviceList/service[@type='query']">
|
---|
509 | <xsl:if test="/page/pageRequest/paramList/param[@name='qs']/@value = 1 or not(@name = /page/pageRequest/paramList/param[@name='s']/@value)">
|
---|
510 | <li class="ui-state-default ui-corner-all">
|
---|
511 | <a class="query-form-links">
|
---|
512 | <xsl:attribute name="href">
|
---|
513 | <xsl:value-of select="$library_name"/>/collection/<xsl:value-of select="$collNameChecked"/>/search/<xsl:value-of select="@name"/>
|
---|
514 | </xsl:attribute>
|
---|
515 | <xsl:value-of select="displayItem[@name='name']"/>
|
---|
516 | </a>
|
---|
517 | </li>
|
---|
518 | </xsl:if>
|
---|
519 | </xsl:for-each>
|
---|
520 | </ul>
|
---|
521 | </div>
|
---|
522 |
|
---|
523 | </xsl:template>
|
---|
524 |
|
---|
525 | <!-- navigation bar for login, preferences and help links -->
|
---|
526 | <xsl:template name="login-prefs-help-links">
|
---|
527 | <div class="container wrapper-old col0" style="margin:10px auto"> <!-- used to be 10px 30px -->
|
---|
528 | <div id="topline">
|
---|
529 | <ul>
|
---|
530 | <xsl:call-template name="loginLinks"/>
|
---|
531 | <li><a href="{$library_name}/collection/{$collNameChecked}/page/pref">Preferences</a></li>
|
---|
532 | <xsl:choose>
|
---|
533 | <xsl:when test="/page/pageResponse/collection">
|
---|
534 | <li><a href="{$library_name}/collection/{$collNameChecked}/page/help">Help</a></li>
|
---|
535 | </xsl:when>
|
---|
536 | <xsl:otherwise>
|
---|
537 | <li><a href="{$library_name}/page/help">Help</a></li>
|
---|
538 | </xsl:otherwise>
|
---|
539 | </xsl:choose>
|
---|
540 | </ul>
|
---|
541 | <br class="clear" />
|
---|
542 | </div>
|
---|
543 | </div>
|
---|
544 | </xsl:template>
|
---|
545 |
|
---|
546 | </xsl:stylesheet>
|
---|