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

Revision 23989, 25.6 KB (checked in by sjm84, 8 years ago)

More updates to the Oran skin

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