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

Last change on this file since 20630 was 20630, checked in by oranfry, 12 years ago

xsl and css change for collections with images

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