root/main/trunk/greenstone3/web/interfaces/oran/transform/util.xsl @ 24018

Revision 24018, 25.9 KB (checked in by sjm84, 8 years ago)

Another big set of updates to the Oran interface

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      <li>
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        <xsl:value-of select="displayItem[@name='description']"/>
239      </li>
240    </xsl:for-each>
241  </xsl:template>
242 
243  <xsl:template name="libraryInterfaceLink">
244    <li>
245      <a href="{$library_name}?a=p&amp;sa=gli4gs3">
246        <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'home.librarian_interface')"/>
247      </a>
248    </li>
249  </xsl:template>
250 
251  <xsl:template name="greenstoneLogoAlternateText">
252    <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'gsdl')"/>
253  </xsl:template>
254 
255  <!-- about page - collection home ....................................................................... -->
256  <xsl:variable name="collName" select="/page/pageRequest/paramList/param[@name='c']/@value"/>
257  <xsl:param name="collName" select="/page/pageRequest/paramList/param[@name='c']/@value"/>
258  <xsl:param name="pageType"/>
259  <xsl:variable name="this-element" select="/page/pageResponse/collection|/page/pageResponse/serviceCluster"/>
260  <xsl:variable name="this-service" select="/page/pageResponse/service/@name"/>
261 
262  <xsl:template name="aboutCollectionPageTitle">
263    <!-- put a space in the title in case the actual value is missing - mozilla will not display a page with no title-->
264    <xsl:value-of select="/page/pageResponse/collection/displayItem[@name='name']"/>
265    <xsl:text> </xsl:text>
266  </xsl:template>
267 
268  <xsl:template name="collectionHomeLinkWithLogoIfAvailable">
269    <a href="{$library_name}?a=p&amp;sa=about&amp;c={$collName}">
270      <xsl:choose>
271        <xsl:when test="$this-element/displayItem[@name='icon']">
272          <img border="0">
273            <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>
274            <xsl:attribute name="alt">
275              <xsl:value-of select="$this-element/displayItem[@name='name']"/>
276            </xsl:attribute>
277            <xsl:attribute name="title">
278              <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'aboutpage')"/>
279            </xsl:attribute>
280          </img>
281        </xsl:when>
282        <xsl:otherwise>
283          <xsl:value-of select="$this-element/displayItem[@name='name']"/>
284        </xsl:otherwise>
285      </xsl:choose>
286    </a>
287  </xsl:template>
288 
289  <xsl:template name="homeButtonTop">
290    <a href="{$library_name}?a=p&amp;sa=home">
291      <xsl:attribute name="title">
292        <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'home_tip')"/>
293      </xsl:attribute>
294      <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'home_b')"/>
295    </a>
296  </xsl:template>
297 
298  <xsl:template name="helpButtonTop">
299    <xsl:choose>
300      <xsl:when test="$pageType='help'">
301        <li>
302          <a>
303            <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'help_b')"/>
304          </a>
305        </li>
306      </xsl:when>
307      <xsl:otherwise>
308        <li>
309          <a href="{$library_name}?a=p&amp;sa=help&amp;c={$collName}">
310            <xsl:attribute name="title">
311              <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'help_tip')"/>
312            </xsl:attribute>
313            <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'help_b')"/>
314          </a>
315        </li>
316      </xsl:otherwise>
317    </xsl:choose>
318  </xsl:template>
319 
320  <xsl:template name="preferencesButtonTop">
321    <xsl:choose>
322      <xsl:when test="$pageType='pref'">
323        <li>
324          <a>
325            <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'pref_b')"/>
326          </a>
327        </li>
328      </xsl:when>
329      <xsl:otherwise>
330        <li>
331          <a href="{$library_name}?a=p&amp;sa=pref&amp;c={$collName}">
332            <xsl:attribute name="title">
333              <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'pref_tip')"/>
334            </xsl:attribute>
335            <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'pref_b')"/>
336          </a>
337        </li>
338      </xsl:otherwise>
339    </xsl:choose>
340  </xsl:template>
341 
342  <xsl:template name="servicesNavigationBar">
343    <xsl:for-each select="$this-element/serviceList/service">
344      <xsl:variable name="action">
345        <xsl:choose>
346          <xsl:when test="@name=$this-service">CURRENT</xsl:when>
347          <xsl:when test="@type='query'">q</xsl:when>
348          <xsl:when test="@type='browse'">b</xsl:when>
349          <xsl:when test="@type='process'">pr</xsl:when>
350          <xsl:when test="@type='applet'">a</xsl:when>
351          <xsl:otherwise>DO_NOT_DISPLAY</xsl:otherwise>
352        </xsl:choose>
353      </xsl:variable>
354      <xsl:choose>
355        <xsl:when test="$action='CURRENT'">
356          <li>
357            <a>
358              <xsl:value-of select="displayItem[@name='name']"/>
359            </a>
360          </li>
361        </xsl:when>
362        <xsl:when test="$action !='DO_NOT_DISPLAY'">
363          <li>
364            <a href="{$library_name}?a={$action}&amp;rt=d&amp;s={@name}&amp;c={$collName}">
365              <xsl:if test="displayItem[@name='description']">
366                <xsl:attribute name="title">
367                  <xsl:value-of select="displayItem[@name='description']"/>
368                </xsl:attribute>
369              </xsl:if>
370              <xsl:value-of select="displayItem[@name='name']"/>
371            </a>
372          </li>
373        </xsl:when>
374      </xsl:choose>
375    </xsl:for-each>
376  </xsl:template>
377 
378  <xsl:template name="collectionDescriptionTextAndServicesLinks">
379    <xsl:apply-templates select="pageResponse/collection|serviceCluster"/>
380  </xsl:template>
381  <xsl:template match="collection|serviceCluster">
382    <xsl:value-of select="displayItem[@name='description']" disable-output-escaping="yes"/>
383    <xsl:apply-templates select="serviceList">
384      <xsl:with-param name="collName" select="$collName"/>
385    </xsl:apply-templates>
386  </xsl:template>
387 
388  <xsl:template match="serviceList">   
389    <xsl:param name="collName"/>
390    <xsl:if test="service[not(@type = 'query' or @type = 'browse' or @type = 'retrieve')]">
391        <h3>
392          <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'about.services')"/>
393        </h3>
394        <p>
395          <xsl:choose>
396            <xsl:when test="service">
397              <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'about.servicehelp')"/>
398            </xsl:when>
399            <xsl:otherwise>
400              <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'about.noservices')"/>
401            </xsl:otherwise>
402          </xsl:choose>
403        </p>
404        <xsl:if test="service">
405          <div id="servicelist">
406            <xsl:for-each select="service">
407              <xsl:sort select="position()" order="descending" data-type="number"/>
408              <xsl:variable name="action">
409                <xsl:choose>
410                  <xsl:when test="@type='query'">q</xsl:when>
411                  <xsl:when test="@type='browse'">b</xsl:when>
412                  <xsl:when test="@type='process'">pr</xsl:when>
413                  <xsl:when test="@type='applet'">a</xsl:when>
414                  <xsl:otherwise>DO_NOT_DISPLAY</xsl:otherwise>
415                </xsl:choose>
416              </xsl:variable>
417              <xsl:if test="$action != 'DO_NOT_DISPLAY'">
418                <div class="paramLabel">
419                  <a href="{$library_name}?a={$action}&amp;rt=d&amp;s={@name}&amp;c={$collName}">
420                    <xsl:value-of select="displayItem[@name='name']"/>
421                  </a>
422                </div>
423                <div class="paramLabel">
424                  <xsl:value-of select="displayItem[@name='description']"/>
425                </div>
426                <br class="clear"/>
427              </xsl:if>
428            </xsl:for-each>
429          </div>
430        </xsl:if>
431    </xsl:if>
432  </xsl:template>
433 
434  <!-- classifier page ............................................................................ -->
435  <xsl:template name="collapsedNavigationTab">
436    <xsl:param name="type"/>
437    <xsl:variable name="isCurrent" select="/page/pageResponse/service[@type=$type]"/>
438    <li>
439      <xsl:if test="$isCurrent">
440        <xsl:attribute name="class">current</xsl:attribute>
441      </xsl:if>
442      <a>
443        <xsl:if test="service[@name=$type]/displayItem[@name='description']">
444          <xsl:attribute name="title">
445            <xsl:value-of select="service[@name=$type]/displayItem[@name='description']"/>
446          </xsl:attribute>
447        </xsl:if>
448        <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>
449        <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, $type)"/>
450      </a>
451    </li>
452  </xsl:template>
453 
454  <xsl:template name="navigationTab">
455    <xsl:variable name="isCurrent" select="@name=/page/pageResponse/service/@name"/>
456    <xsl:variable name="action">
457      <xsl:choose>
458        <xsl:when test="@type='query'">q</xsl:when>
459        <xsl:when test="@type='browse'">b</xsl:when>
460        <xsl:when test="@type='process'">pr</xsl:when>
461        <xsl:when test="@type='applet'">a</xsl:when>
462        <xsl:otherwise>DO_NOT_DISPLAY</xsl:otherwise>
463      </xsl:choose>
464    </xsl:variable>
465    <xsl:if test="$action!='DO_NOT_DISPLAY'">
466      <li>
467        <xsl:if test="$isCurrent">
468          <xsl:attribute name="class">current</xsl:attribute>
469        </xsl:if>
470        <a>
471          <xsl:if test="displayItem[@name='description']">
472            <xsl:attribute name="title">
473              <xsl:value-of select="displayItem[@name='description']"/>
474            </xsl:attribute>
475          </xsl:if>
476          <xsl:choose>
477            <xsl:when test="classifierList/classifier/@name">
478              <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>
479            </xsl:when>
480            <xsl:otherwise>
481              <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>
482            </xsl:otherwise>
483          </xsl:choose>
484          <xsl:value-of select="displayItem[@name='name']"/>
485        </a>
486      </li>
487    </xsl:if>
488  </xsl:template>
489 
490  <xsl:template name="classifierLink">
491    <xsl:if test="@name=/page/pageResponse/classifier/@name">
492      <xsl:attribute name="class">current</xsl:attribute>
493    </xsl:if>
494    <a href="{$library_name}?a=b&amp;rt=r&amp;s={/page/pageResponse/service/@name}&amp;c={/page/pageResponse/collection/@name}&amp;cl={@name}">
495      <xsl:value-of select="displayItem[@name='description']"/>
496    </a>
497  </xsl:template>
498 
499  <!-- query page ............................................................................ -->
500  <xsl:template name="indexName">
501    <xsl:value-of select="/page/pageResponse/service/displayItem[@name='name']"/>
502  </xsl:template>
503  <xsl:template name="queryPageCollectionName">
504    <xsl:choose>
505      <xsl:when test="/page/pageResponse/collection">
506        <gslib:aboutCollectionPageTitle/>
507      </xsl:when>
508      <xsl:otherwise>Cross-Collection</xsl:otherwise>
509    </xsl:choose>
510  </xsl:template>
511 
512  <!--
513BERRY BASKET TEMPLATES
514These get used on many different pages to add the
515berry basket function to the site
516-->
517  <!-- put the drag&drop berry basket on the page -->
518  <xsl:template name="berryBasket">
519    <xsl:if test="$berryBasketOn">
520      <div id="berrybasket" class="hide">
521        <span>Berry Basket</span>
522        <span id="berryBasketExpandCollapseLinks" style="display: none;">
523          <a id="berryBasketExpandLink" href="javascript:showBasket()">Expand</a>
524          <a id="berryBasketCollapseLink" style="display: none;" href="javascript:hideBasket()">Collapse</a>
525        </span>
526        <div id="baskethandle">
527          <span>
528            <xsl:text> </xsl:text>
529          </span>
530        </div>
531        <div id="berries">
532          <span>
533            <xsl:text> </xsl:text>
534          </span>
535        </div>
536      </div>
537    </xsl:if>
538  </xsl:template>
539 
540  <!-- include the required javascript and css for berry baskets -->
541  <xsl:template name="berryBasketHeadTags">
542    <script type="text/javascript" src="interfaces/{$interface_name}/js/yui/yahoo-min.js"><xsl:text> </xsl:text></script>
543    <script type="text/javascript" src="interfaces/{$interface_name}/js/yui/event-min.js"><xsl:text> </xsl:text></script>
544    <script type="text/javascript" src="interfaces/{$interface_name}/js/yui/connection-min.js"><xsl:text> </xsl:text></script>
545    <script type="text/javascript" src="interfaces/{$interface_name}/js/yui/dom-min.js"><xsl:text> </xsl:text></script>
546    <script type="text/javascript" src="interfaces/{$interface_name}/js/yui/dragdrop-min.js"><xsl:text> </xsl:text></script>
547    <script type="text/javascript" src="interfaces/{$interface_name}/js/yui/cookie-min.js"><xsl:text> </xsl:text></script>
548    <script type="text/javascript" src="interfaces/{$interface_name}/js/berrybasket/ygDDPlayer.js"><xsl:text> </xsl:text></script>
549    <script type="text/javascript" src="interfaces/{$interface_name}/js/berrybasket/ygDDOnTop.js"><xsl:text> </xsl:text></script>
550    <script type="text/javascript" src="interfaces/{$interface_name}/js/berrybasket/berrybasket.js"><xsl:text> </xsl:text></script>
551    <link rel="stylesheet" href="interfaces/{$interface_name}/style/berry.css" type="text/css"/>
552  </xsl:template>
553 
554  <!--
555create a little berry which can be drag&dropped onto the berry basket
556used on classifier and search result pages
557-->
558  <xsl:template name="documentBerryForClassifierOrSearchPage">
559    <xsl:if test="$berryBasketOn">
560      <img class="pick" src="interfaces/{$interface_name}/images/berry.png" alt="in basket" width="15" height="15" border="0">
561        <xsl:attribute name="id"><xsl:value-of select="/page/pageResponse/collection/@name"/>:<xsl:value-of select="@nodeID"/></xsl:attribute>
562      </img>
563    </xsl:if>
564  </xsl:template>
565 
566  <!--
567create little berrys which can be drag&dropped onto the berry basket
568used on the document page
569-->
570  <xsl:template name="documentBerryForDocumentPage">
571    <xsl:variable name="selectedNode">
572      <xsl:value-of select="/page/pageResponse/document/@selectedNode"/>
573    </xsl:variable>
574    <xsl:variable name="rootNode">
575      <xsl:value-of select="/page/pageResponse/document/documentNode[@nodeType='root']/@nodeID"/>
576    </xsl:variable>
577    <xsl:if test="$berryBasketOn">
578      <div id="documentberries">
579        <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"/>
580        <span id="{/page/pageResponse/collection/@name}:{$rootNode}:root" class="documentberry">the whole document</span>
581        <!--<xsl:if test="$selectedNode != $rootNode">
582          <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"/>
583          <span id="{/page/pageResponse/collection/@name}:{$selectedNode}:section" class="documentberry">the current section</span>
584        </xsl:if>-->
585      </div>
586    </xsl:if>
587  </xsl:template>
588 
589  <!-- document page -->
590  <xsl:template name="documentTitle">
591    <xsl:value-of select="/page/pageResponse/document/documentNode/metadataList/metadata[@name='Title']"/>
592  </xsl:template>
593  <xsl:template name="coverImage">
594    <img>
595      <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>
596    </img>
597  </xsl:template>
598 
599  <xsl:template name="previousNextButtons">
600    <!-- prev -->
601    <a>
602      <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>
603      <img class="lessarrow" src="interfaces/{$interface_name}/images/previous.png"/>
604    </a>
605    <!-- next -->
606    <a>
607      <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>
608      <img class="morearrow" src="interfaces/{$interface_name}/images/next.png"/>
609    </a>
610  </xsl:template>
611 
612</xsl:stylesheet>
Note: See TracBrowser for help on using the browser.