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