source: main/trunk/greenstone3/web/interfaces/oran/transform/util.xsl@ 24149

Last change on this file since 24149 was 24149, checked in by sjm84, 13 years ago

Adding authenication to the oran skin (and some other tidying)

File size: 26.0 KB
Line 
1<?xml version="1.0" encoding="UTF-8"?>
2<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xslt="http://www.w3.org/1999/XSL/Transform" xmlns:gslib="http://www.greenstone.org/XSL/Library" xmlns:gsf="http://www.greenstone.org/greenstone3/schema/ConfigFormat" xmlns:util="http://org.greenstone.gsdl3.util.XSLTUtil" version="1.0" exclude-result-prefixes="util gslib gsf xslt">
3 <!-- some global parameters - these are set by whoever is invoking the transformation -->
4 <xsl:param name="interface_name"/>
5 <xsl:param name="library_name"/>
6 <xsl:include href="xml-to-string.xsl"/>
7 <!-- every pages ....................................................................... -->
8 <xsl:template name="siteName">
9 <xsl:value-of select="/page/pageResponse/metadataList/metadata[@name='siteName']"/>
10 </xsl:template>
11
12 <xsl:template name="siteLink">
13 <a href="./{$library_name}">
14 <xsl:call-template name="siteName"/>
15 <xsl:text> </xsl:text>
16 </a>
17 </xsl:template>
18
19 <xsl:variable name="a">
20 <xsl:value-of select="/page/pageRequest/paramList/param[@name='a']/@value"/>
21 </xsl:variable>
22
23 <xsl:variable name="collections" select="/page/pageResponse/collectionList/collection"/>
24
25 <xsl:variable name="berrybasketswitch">
26 <xsl:value-of select="/page/pageRequest/paramList/param[@name='berrybasket']/@value"/>
27 </xsl:variable>
28
29 <xsl:variable name="berryBasketOn" select="/page/pageRequest/paramList/param[@name='berrybasket' and @value='on']"/>
30
31 <!-- template to get the name of the current collection -->
32 <xsl:template name="collectionName">
33 <xsl:choose>
34 <xsl:when test="/page/pageResponse/collection">
35 <xsl:value-of select="/page/pageResponse/collection/displayItem[@name='name']"/>
36 </xsl:when>
37 <xsl:otherwise>All Collections</xsl:otherwise>
38 </xsl:choose>
39 </xsl:template>
40
41 <xsl:template name="collectionNameShort">
42 <xsl:value-of select="/page/pageResponse/collection/@name"/>
43 </xsl:template>
44 <xsl:template name="collectionNameLinked">
45 <xsl:if test="/page/pageResponse/collection">
46 <a>
47 <xsl:attribute name="href">./<xsl:value-of select="$library_name"/>?a=p&amp;sa=about&amp;c=<xsl:call-template name="collectionNameShort"/></xsl:attribute>
48 <xsl:call-template name="collectionName"/>
49 </a>
50 </xsl:if>
51 </xsl:template>
52
53 <!-- text to get the name of the current service ("Browse","Search" etc) -->
54 <xsl:template name="serviceName">
55 <xsl:value-of select="/page/pageResponse/service/displayItem[@name='name']"/>
56 </xsl:template>
57
58 <xsl:template name="textDirectionAttribute">
59 <xsl:attribute name="dir">
60 <xsl:choose>
61 <xsl:when test="/page/@lang='ar' or /page/@lang='fa' or /page/@lang='he' or /page/@lang='ur' or /page/@lang='ps' or /page/@lang='prs'">rtl</xsl:when>
62 <xsl:otherwise>ltr</xsl:otherwise>
63 </xsl:choose>
64 </xsl:attribute>
65 </xsl:template>
66
67 <xsl:template name="actionClass">
68 <xsl:attribute name="class"><xsl:value-of select="/page/pageRequest/@action"/>Action <xsl:if test="/page/pageRequest/@subaction"><xsl:value-of select="/page/pageRequest/@subaction"/>Subaction</xsl:if></xsl:attribute>
69 </xsl:template>
70 <!-- username, if logged in -->
71 <!--
72 <xsl:template name="username">
73 <xsl:if test="$un_s!=''">
74 <xsl:if test="$asn!='' and $asn!='0'">
75 <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'authen.username')"/> : <xsl:value-of select="$un_s"/>
76 </xsl:if>
77 </xsl:if>
78 </xsl:template>
79 -->
80 <xsl:template name="defaultDividerBar">
81 <xsl:param name="text"/>
82 <xsl:choose>
83 <xsl:when test="$text">
84 <div class="divbar">
85 <xsl:value-of select="$text"/>
86 </div>
87 </xsl:when>
88 <xsl:otherwise>
89 <div class="divbar">
90 <xsl:text disable-output-escaping="yes">&amp;nbsp;</xsl:text>
91 </div>
92 </xsl:otherwise>
93 </xsl:choose>
94 </xsl:template>
95
96 <xsl:template match="error">
97 Error: <xsl:value-of select="."/>
98 </xsl:template>
99 <xsl:template name="displayErrorsIfAny">
100 <xsl:if test="descendant::error">
101 <script language="Javascript">
102 <xsl:text disable-output-escaping="yes">
103 function removeAllChildren(node) {
104 while (node.hasChildNodes()) {
105 node.removeChild(node.firstChild);
106 }
107 }
108
109 function toggleHideError(obj) {
110 if (obj.style.display == "none") {
111 obj.style.display = "";
112 hide_link = document.getElementById("hide");
113 removeAllChildren(hide_link);
114 hide_link.appendChild(document.createTextNode("</xsl:text>
115 <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'hide_error')"/>
116 <xsl:text disable-output-escaping="yes">"));
117 } else {
118 obj.style.display = "none";
119 hide_link = document.getElementById("hide");
120 removeAllChildren(hide_link);
121 hide_link.appendChild(document.createTextNode("</xsl:text>
122 <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'show_error')"/>
123 <xsl:text disable-output-escaping="yes">"));
124 }
125 }
126 </xsl:text>
127 </script>
128 <p align="right">
129 <a id="hide" href="javascript:toggleHideError(error);">
130 <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'show_error')"/>
131 </a>
132 </p>
133 <div id="error" style="display: none;">
134 <xsl:apply-templates select="descendant::error"/>
135 </div>
136 </xsl:if>
137 </xsl:template>
138
139 <xsl:template name="noTextBar">
140 <xsl:text disable-output-escaping="yes">&amp;nbsp;</xsl:text>
141 </xsl:template>
142
143 <xsl:template name="poweredByGS3TextBar">
144 <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'gs3power')"/>
145 </xsl:template>
146
147 <xsl:template name="rightArrow">
148 <xsl:text disable-output-escaping="yes"> &amp;raquo; </xsl:text>
149 </xsl:template>
150
151 <!-- site home ....................................................................... -->
152 <xsl:template name="siteHomePageTitle">
153 <!-- put a space in the title in case the actual value is missing - mozilla will not display a page with no title-->
154 <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'gsdl')"/>
155 <xsl:text> </xsl:text>
156 </xsl:template>
157
158 <xsl:template name="selectACollectionTextBar">
159 <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'home.select_a_collection')"/>
160 </xsl:template>
161
162 <xsl:template name="crossCollectionQuickSearchForm">
163 <xsl:apply-templates select="serviceList/service[@name='TextQuery']"/>
164 </xsl:template>
165
166 <xsl:template match="service[@name='TextQuery']">
167 <form name="QuickSearch" method="get" action="{$library_name}">
168 <input type="hidden" name="a" value="q"/>
169 <input type="hidden" name="rt" value="rd"/>
170 <input type="hidden" name="s" value="{@name}"/>
171 <input type="hidden" name="s1.collection" value="all"/>
172 <input type="text" name="s1.query" size="20"/>
173 <input type="submit">
174 <xsl:attribute name="value">
175 <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'home.quick_search')"/>
176 </xsl:attribute>
177 </input>
178 </form>
179 </xsl:template>
180
181 <xsl:template name="collectionLinkWithImage">
182 <xsl:choose>
183 <xsl:when test="displayItem[@name='icon']">
184 <a href="{$library_name}?a=p&amp;sa=about&amp;c={@name}">
185 <img class="collectionLinkImage">
186 <xsl:attribute name="alt"/>
187 <xsl:attribute name="src">sites/localsite/collect/<xsl:value-of select="@name"/>/images/<xsl:value-of select="displayItem[@name='icon']"/></xsl:attribute>
188 </img>
189 <!--
190 <div class="collectionLink">
191 <xsl:attribute name="style">background-image: url(/sites/localsite/collect/<xsl:value-of select="@name"/>/images/<xsl:value-of select="displayItem[@name='icon']"/>);</xsl:attribute>
192 <xsl:value-of select="displayItem[@name='name']"/>
193 </div>
194-->
195 </a>
196 </xsl:when>
197 <xsl:otherwise>
198 <a href="{$library_name}?a=p&amp;sa=about&amp;c={@name}">
199 <div class="collectionLink">
200 <xsl:value-of select="displayItem[@name='name']"/>
201 </div>
202 </a>
203 </xsl:otherwise>
204 </xsl:choose>
205 </xsl:template>
206
207 <xsl:template name="serviceClusterList">
208 <xsl:apply-templates select="serviceClusterList"/>
209 </xsl:template>
210
211 <xsl:template match="serviceClusterList">
212 <xsl:for-each select="serviceCluster">
213 <a href="{$library_name}?a=p&amp;sa=about&amp;c={@name}">
214 <xsl:value-of select="@name"/>
215 <xsl:value-of select="displayItem[@name='name']"/>
216 </a>
217 </xsl:for-each>
218 </xsl:template>
219
220 <xsl:template name="serviceLink">
221 <div class="paramLabel">
222 <a href="{$library_name}?a=q&amp;rt=d&amp;s={@name}">
223 <xsl:value-of select="displayItem[@name='name']"/>
224 </a>
225 </div>
226 <div class="paramValue">
227 <xsl:value-of select="displayItem[@name='description']"/>
228 </div>
229 <br class="clear"/>
230 </xsl:template>
231
232 <xsl:template name="authenticationLink">
233 <xsl:for-each select="//serviceList/service[@type='authen']">
234 <div class="paramLabel">
235 <a href="{$library_name}?a=g&amp;rt=r&amp;sa=authen&amp;s={@name}&amp;s1.aup=Login&amp;s1.un=&amp;s1.asn=">
236 <xsl:value-of select="displayItem[@name='name']"/>
237 </a>
238 </div>
239 <div class="paramValue">
240 <xsl:value-of select="displayItem[@name='description']"/>
241 </div>
242 </xsl:for-each>
243 </xsl:template>
244
245 <xsl:template name="libraryInterfaceLink">
246 <li>
247 <a href="{$library_name}?a=p&amp;sa=gli4gs3">
248 <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'home.librarian_interface')"/>
249 </a>
250 </li>
251 </xsl:template>
252
253 <xsl:template name="greenstoneLogoAlternateText">
254 <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'gsdl')"/>
255 </xsl:template>
256
257 <!-- about page - collection home ....................................................................... -->
258 <xsl:variable name="collName" select="/page/pageRequest/paramList/param[@name='c']/@value"/>
259 <xsl:param name="collName" select="/page/pageRequest/paramList/param[@name='c']/@value"/>
260 <xsl:param name="pageType"/>
261 <xsl:variable name="this-element" select="/page/pageResponse/collection|/page/pageResponse/serviceCluster"/>
262 <xsl:variable name="this-service" select="/page/pageResponse/service/@name"/>
263
264 <xsl:template name="aboutCollectionPageTitle">
265 <!-- put a space in the title in case the actual value is missing - mozilla will not display a page with no title-->
266 <xsl:value-of select="/page/pageResponse/collection/displayItem[@name='name']"/>
267 <xsl:text> </xsl:text>
268 </xsl:template>
269
270 <xsl:template name="collectionHomeLinkWithLogoIfAvailable">
271 <a href="{$library_name}?a=p&amp;sa=about&amp;c={$collName}">
272 <xsl:choose>
273 <xsl:when test="$this-element/displayItem[@name='icon']">
274 <img border="0">
275 <xsl:attribute name="src"><xsl:value-of select="$this-element/metadataList/metadata[@name='httpPath']"/>/images/<xsl:value-of select="$this-element/displayItem[@name='icon']"/></xsl:attribute>
276 <xsl:attribute name="alt">
277 <xsl:value-of select="$this-element/displayItem[@name='name']"/>
278 </xsl:attribute>
279 <xsl:attribute name="title">
280 <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'aboutpage')"/>
281 </xsl:attribute>
282 </img>
283 </xsl:when>
284 <xsl:otherwise>
285 <xsl:value-of select="$this-element/displayItem[@name='name']"/>
286 </xsl:otherwise>
287 </xsl:choose>
288 </a>
289 </xsl:template>
290
291 <xsl:template name="homeButtonTop">
292 <a href="{$library_name}?a=p&amp;sa=home">
293 <xsl:attribute name="title">
294 <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'home_tip')"/>
295 </xsl:attribute>
296 <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'home_b')"/>
297 </a>
298 </xsl:template>
299
300 <xsl:template name="helpButtonTop">
301 <xsl:choose>
302 <xsl:when test="$pageType='help'">
303 <li>
304 <a>
305 <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'help_b')"/>
306 </a>
307 </li>
308 </xsl:when>
309 <xsl:otherwise>
310 <li>
311 <a href="{$library_name}?a=p&amp;sa=help&amp;c={$collName}">
312 <xsl:attribute name="title">
313 <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'help_tip')"/>
314 </xsl:attribute>
315 <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'help_b')"/>
316 </a>
317 </li>
318 </xsl:otherwise>
319 </xsl:choose>
320 </xsl:template>
321
322 <xsl:template name="preferencesButtonTop">
323 <xsl:choose>
324 <xsl:when test="$pageType='pref'">
325 <li>
326 <a>
327 <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'pref_b')"/>
328 </a>
329 </li>
330 </xsl:when>
331 <xsl:otherwise>
332 <li>
333 <a href="{$library_name}?a=p&amp;sa=pref&amp;c={$collName}">
334 <xsl:attribute name="title">
335 <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'pref_tip')"/>
336 </xsl:attribute>
337 <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'pref_b')"/>
338 </a>
339 </li>
340 </xsl:otherwise>
341 </xsl:choose>
342 </xsl:template>
343
344 <xsl:template name="servicesNavigationBar">
345 <xsl:for-each select="$this-element/serviceList/service">
346 <xsl:variable name="action">
347 <xsl:choose>
348 <xsl:when test="@name=$this-service">CURRENT</xsl:when>
349 <xsl:when test="@type='query'">q</xsl:when>
350 <xsl:when test="@type='browse'">b</xsl:when>
351 <xsl:when test="@type='process'">pr</xsl:when>
352 <xsl:when test="@type='applet'">a</xsl:when>
353 <xsl:otherwise>DO_NOT_DISPLAY</xsl:otherwise>
354 </xsl:choose>
355 </xsl:variable>
356 <xsl:choose>
357 <xsl:when test="$action='CURRENT'">
358 <li>
359 <a>
360 <xsl:value-of select="displayItem[@name='name']"/>
361 </a>
362 </li>
363 </xsl:when>
364 <xsl:when test="$action !='DO_NOT_DISPLAY'">
365 <li>
366 <a href="{$library_name}?a={$action}&amp;rt=d&amp;s={@name}&amp;c={$collName}">
367 <xsl:if test="displayItem[@name='description']">
368 <xsl:attribute name="title">
369 <xsl:value-of select="displayItem[@name='description']"/>
370 </xsl:attribute>
371 </xsl:if>
372 <xsl:value-of select="displayItem[@name='name']"/>
373 </a>
374 </li>
375 </xsl:when>
376 </xsl:choose>
377 </xsl:for-each>
378 </xsl:template>
379
380 <xsl:template name="collectionDescriptionTextAndServicesLinks">
381 <xsl:apply-templates select="pageResponse/collection|serviceCluster"/>
382 </xsl:template>
383 <xsl:template match="collection|serviceCluster">
384 <xsl:value-of select="displayItem[@name='description']" disable-output-escaping="yes"/>
385 <xsl:apply-templates select="serviceList">
386 <xsl:with-param name="collName" select="$collName"/>
387 </xsl:apply-templates>
388 </xsl:template>
389
390 <xsl:template match="serviceList">
391 <xsl:param name="collName"/>
392 <xsl:if test="service[not(@type = 'query' or @type = 'browse' or @type = 'retrieve')]">
393 <h3>
394 <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'about.services')"/>
395 </h3>
396 <p>
397 <xsl:choose>
398 <xsl:when test="service">
399 <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'about.servicehelp')"/>
400 </xsl:when>
401 <xsl:otherwise>
402 <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'about.noservices')"/>
403 </xsl:otherwise>
404 </xsl:choose>
405 </p>
406 <xsl:if test="service">
407 <div id="servicelist">
408 <xsl:for-each select="service">
409 <xsl:sort select="position()" order="descending" data-type="number"/>
410 <xsl:variable name="action">
411 <xsl:choose>
412 <xsl:when test="@type='query'">q</xsl:when>
413 <xsl:when test="@type='browse'">b</xsl:when>
414 <xsl:when test="@type='process'">pr</xsl:when>
415 <xsl:when test="@type='applet'">a</xsl:when>
416 <xsl:otherwise>DO_NOT_DISPLAY</xsl:otherwise>
417 </xsl:choose>
418 </xsl:variable>
419 <xsl:if test="$action != 'DO_NOT_DISPLAY'">
420 <div class="paramLabel">
421 <a href="{$library_name}?a={$action}&amp;rt=d&amp;s={@name}&amp;c={$collName}">
422 <xsl:value-of select="displayItem[@name='name']"/>
423 </a>
424 </div>
425 <div class="paramLabel">
426 <xsl:value-of select="displayItem[@name='description']"/>
427 </div>
428 <br class="clear"/>
429 </xsl:if>
430 </xsl:for-each>
431 </div>
432 </xsl:if>
433 </xsl:if>
434 </xsl:template>
435
436 <!-- classifier page ............................................................................ -->
437 <xsl:template name="collapsedNavigationTab">
438 <xsl:param name="type"/>
439 <xsl:variable name="isCurrent" select="/page/pageResponse/service[@type=$type]"/>
440 <li>
441 <xsl:if test="$isCurrent">
442 <xsl:attribute name="class">current</xsl:attribute>
443 </xsl:if>
444 <a>
445 <xsl:if test="service[@name=$type]/displayItem[@name='description']">
446 <xsl:attribute name="title">
447 <xsl:value-of select="service[@name=$type]/displayItem[@name='description']"/>
448 </xsl:attribute>
449 </xsl:if>
450 <xsl:attribute name="href"><xsl:value-of select="$library_name"/>?a=q&amp;rt=d&amp;s=<xsl:value-of select="service[@type=$type]/@name"/>&amp;c=<xsl:value-of select="/page/pageResponse/collection/@name"/></xsl:attribute>
451 <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, $type)"/>
452 </a>
453 </li>
454 </xsl:template>
455
456 <xsl:template name="navigationTab">
457 <xsl:variable name="isCurrent" select="@name=/page/pageResponse/service/@name"/>
458 <xsl:variable name="action">
459 <xsl:choose>
460 <xsl:when test="@type='query'">q</xsl:when>
461 <xsl:when test="@type='browse'">b</xsl:when>
462 <xsl:when test="@type='process'">pr</xsl:when>
463 <xsl:when test="@type='applet'">a</xsl:when>
464 <xsl:otherwise>DO_NOT_DISPLAY</xsl:otherwise>
465 </xsl:choose>
466 </xsl:variable>
467 <xsl:if test="$action!='DO_NOT_DISPLAY'">
468 <li>
469 <xsl:if test="$isCurrent">
470 <xsl:attribute name="class">current</xsl:attribute>
471 </xsl:if>
472 <a>
473 <xsl:if test="displayItem[@name='description']">
474 <xsl:attribute name="title">
475 <xsl:value-of select="displayItem[@name='description']"/>
476 </xsl:attribute>
477 </xsl:if>
478 <xsl:choose>
479 <xsl:when test="classifierList/classifier/@name">
480 <xsl:attribute name="href"><xsl:value-of select="$library_name"/>?a=<xsl:value-of select="$action"/>&amp;rt=s&amp;s=<xsl:value-of select="@name"/>&amp;c=<xsl:value-of select="/page/pageResponse/collection/@name"/>&amp;cl=<xsl:value-of select="classifierList/classifier/@name"/></xsl:attribute>
481 </xsl:when>
482 <xsl:otherwise>
483 <xsl:attribute name="href"><xsl:value-of select="$library_name"/>?a=<xsl:value-of select="$action"/>&amp;rt=d&amp;s=<xsl:value-of select="@name"/>&amp;c=<xsl:value-of select="/page/pageResponse/collection/@name"/></xsl:attribute>
484 </xsl:otherwise>
485 </xsl:choose>
486 <xsl:value-of select="displayItem[@name='name']"/>
487 </a>
488 </li>
489 </xsl:if>
490 </xsl:template>
491
492 <xsl:template name="classifierLink">
493 <xsl:if test="@name=/page/pageResponse/classifier/@name">
494 <xsl:attribute name="class">current</xsl:attribute>
495 </xsl:if>
496 <a href="{$library_name}?a=b&amp;rt=r&amp;s={/page/pageResponse/service/@name}&amp;c={/page/pageResponse/collection/@name}&amp;cl={@name}">
497 <xsl:value-of select="displayItem[@name='description']"/>
498 </a>
499 </xsl:template>
500
501 <!-- query page ............................................................................ -->
502 <xsl:template name="indexName">
503 <xsl:value-of select="/page/pageResponse/service/displayItem[@name='name']"/>
504 </xsl:template>
505 <xsl:template name="queryPageCollectionName">
506 <xsl:choose>
507 <xsl:when test="/page/pageResponse/collection">
508 <gslib:aboutCollectionPageTitle/>
509 </xsl:when>
510 <xsl:otherwise>Cross-Collection</xsl:otherwise>
511 </xsl:choose>
512 </xsl:template>
513
514 <!--
515BERRY BASKET TEMPLATES
516These get used on many different pages to add the
517berry basket function to the site
518-->
519 <!-- put the drag&drop berry basket on the page -->
520 <xsl:template name="berryBasket">
521 <xsl:if test="$berryBasketOn">
522 <div id="berrybasket" class="hide">
523 <span>Berry Basket</span>
524 <span id="berryBasketExpandCollapseLinks" style="display: none;">
525 <a id="berryBasketExpandLink" href="javascript:showBasket()">Expand</a>
526 <a id="berryBasketCollapseLink" style="display: none;" href="javascript:hideBasket()">Collapse</a>
527 </span>
528 <div id="baskethandle">
529 <span>
530 <xsl:text> </xsl:text>
531 </span>
532 </div>
533 <div id="berries">
534 <span>
535 <xsl:text> </xsl:text>
536 </span>
537 </div>
538 </div>
539 </xsl:if>
540 </xsl:template>
541
542 <!-- include the required javascript and css for berry baskets -->
543 <xsl:template name="berryBasketHeadTags">
544 <script type="text/javascript" src="interfaces/{$interface_name}/js/yui/yahoo-min.js"><xsl:text> </xsl:text></script>
545 <script type="text/javascript" src="interfaces/{$interface_name}/js/yui/event-min.js"><xsl:text> </xsl:text></script>
546 <script type="text/javascript" src="interfaces/{$interface_name}/js/yui/connection-min.js"><xsl:text> </xsl:text></script>
547 <script type="text/javascript" src="interfaces/{$interface_name}/js/yui/dom-min.js"><xsl:text> </xsl:text></script>
548 <script type="text/javascript" src="interfaces/{$interface_name}/js/yui/dragdrop-min.js"><xsl:text> </xsl:text></script>
549 <script type="text/javascript" src="interfaces/{$interface_name}/js/yui/cookie-min.js"><xsl:text> </xsl:text></script>
550 <script type="text/javascript" src="interfaces/{$interface_name}/js/berrybasket/ygDDPlayer.js"><xsl:text> </xsl:text></script>
551 <script type="text/javascript" src="interfaces/{$interface_name}/js/berrybasket/ygDDOnTop.js"><xsl:text> </xsl:text></script>
552 <script type="text/javascript" src="interfaces/{$interface_name}/js/berrybasket/berrybasket.js"><xsl:text> </xsl:text></script>
553 <link rel="stylesheet" href="interfaces/{$interface_name}/style/berry.css" type="text/css"/>
554 </xsl:template>
555
556 <!--
557create a little berry which can be drag&dropped onto the berry basket
558used on classifier and search result pages
559-->
560 <xsl:template name="documentBerryForClassifierOrSearchPage">
561 <xsl:if test="$berryBasketOn">
562 <img class="pick" src="interfaces/{$interface_name}/images/berry.png" alt="in basket" width="15" height="15" border="0">
563 <xsl:attribute name="id"><xsl:value-of select="/page/pageResponse/collection/@name"/>:<xsl:value-of select="@nodeID"/></xsl:attribute>
564 </img>
565 </xsl:if>
566 </xsl:template>
567
568 <!--
569create little berrys which can be drag&dropped onto the berry basket
570used on the document page
571-->
572 <xsl:template name="documentBerryForDocumentPage">
573 <xsl:variable name="selectedNode">
574 <xsl:value-of select="/page/pageResponse/document/@selectedNode"/>
575 </xsl:variable>
576 <xsl:variable name="rootNode">
577 <xsl:value-of select="/page/pageResponse/document/documentNode[@nodeType='root']/@nodeID"/>
578 </xsl:variable>
579 <xsl:if test="$berryBasketOn">
580 <div id="documentberries">
581 <img class="pick" id="{/page/pageResponse/collection/@name}:{$rootNode}" src="interfaces/{$interface_name}/images/berry.png" alt="in basket" width="15" height="15" border="0"/>
582 <span id="{/page/pageResponse/collection/@name}:{$rootNode}:root" class="documentberry">the whole document</span>
583 <!--<xsl:if test="$selectedNode != $rootNode">
584 <img class="pick" id="{/page/pageResponse/collection/@name}:{$selectedNode}" src="interfaces/{$interface_name}/images/berry.png" alt="in basket" width="15" height="15" border="0"/>
585 <span id="{/page/pageResponse/collection/@name}:{$selectedNode}:section" class="documentberry">the current section</span>
586 </xsl:if>-->
587 </div>
588 </xsl:if>
589 </xsl:template>
590
591 <!-- document page -->
592 <xsl:template name="documentTitle">
593 <xsl:value-of select="/page/pageResponse/document/documentNode/metadataList/metadata[@name='Title']"/>
594 </xsl:template>
595 <xsl:template name="coverImage">
596 <img>
597 <xsl:attribute name="src"><xsl:value-of select="/page/pageResponse/collection/metadataList/metadata[@name='httpPath']"/>/index/assoc/<xsl:value-of select="metadataList/metadata[@name='assocfilepath']"/>/cover.jpg</xsl:attribute>
598 </img>
599 </xsl:template>
600
601 <xsl:template name="previousNextButtons">
602 <!-- prev -->
603 <a>
604 <xsl:attribute name="href"><xsl:value-of select="$library_name"/>?a=d&amp;c=<xsl:value-of select="/page/pageResponse/collection/@name"/>&amp;d=<xsl:value-of select="@selectedNode"/>.pp&amp;sib=1&amp;p.s=<xsl:value-of select="/page/pageRequest/paramList/param[@name=&quot;p.s&quot;]/@value"/>&amp;p.sa=<xsl:value-of select="/page/pageRequest/paramList/param[@name=&quot;p.sa&quot;]/@value"/>&amp;p.a=<xsl:value-of select="/page/pageRequest/paramList/param[@name=&quot;p.a&quot;]/@value"/></xsl:attribute>
605 <img class="lessarrow" src="interfaces/{$interface_name}/images/previous.png"/>
606 </a>
607 <!-- next -->
608 <a>
609 <xsl:attribute name="href"><xsl:value-of select="$library_name"/>?a=d&amp;c=<xsl:value-of select="/page/pageResponse/collection/@name"/>&amp;d=<xsl:value-of select="@selectedNode"/>.np&amp;sib=1&amp;p.s=<xsl:value-of select="/page/pageRequest/paramList/param[@name=&quot;p.s&quot;]/@value"/>&amp;p.sa=<xsl:value-of select="/page/pageRequest/paramList/param[@name=&quot;p.sa&quot;]/@value"/>&amp;p.a=<xsl:value-of select="/page/pageRequest/paramList/param[@name=&quot;p.a&quot;]/@value"/></xsl:attribute>
610 <img class="morearrow" src="interfaces/{$interface_name}/images/next.png"/>
611 </a>
612 </xsl:template>
613
614</xsl:stylesheet>
Note: See TracBrowser for help on using the repository browser.