[18617] | 1 | <?xml version="1.0" encoding="UTF-8"?>
|
---|
[23813] | 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 -->
|
---|
[18617] | 4 | <xsl:param name="interface_name"/>
|
---|
| 5 | <xsl:param name="library_name"/>
|
---|
[22458] | 6 | <xsl:include href="xml-to-string.xsl"/>
|
---|
[18617] | 7 | <!-- every pages ....................................................................... -->
|
---|
[23813] | 8 | <xsl:template name="siteName">
|
---|
| 9 | <xsl:value-of select="/page/pageResponse/metadataList/metadata[@name='siteName']"/>
|
---|
| 10 | </xsl:template>
|
---|
[24018] | 11 |
|
---|
[23813] | 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>
|
---|
[24018] | 18 |
|
---|
[23813] | 19 | <xsl:variable name="a">
|
---|
| 20 | <xsl:value-of select="/page/pageRequest/paramList/param[@name='a']/@value"/>
|
---|
| 21 | </xsl:variable>
|
---|
[24018] | 22 |
|
---|
[23813] | 23 | <xsl:variable name="collections" select="/page/pageResponse/collectionList/collection"/>
|
---|
[24018] | 24 |
|
---|
[23813] | 25 | <xsl:variable name="berrybasketswitch">
|
---|
| 26 | <xsl:value-of select="/page/pageRequest/paramList/param[@name='berrybasket']/@value"/>
|
---|
| 27 | </xsl:variable>
|
---|
[24018] | 28 |
|
---|
[23813] | 29 | <xsl:variable name="berryBasketOn" select="/page/pageRequest/paramList/param[@name='berrybasket' and @value='on']"/>
|
---|
[24018] | 30 |
|
---|
[23813] | 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>
|
---|
[24018] | 40 |
|
---|
[23813] | 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&sa=about&c=<xsl:call-template name="collectionNameShort"/></xsl:attribute>
|
---|
| 48 | <xsl:call-template name="collectionName"/>
|
---|
| 49 | </a>
|
---|
| 50 | </xsl:if>
|
---|
| 51 | </xsl:template>
|
---|
[24018] | 52 |
|
---|
[23813] | 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>
|
---|
[24018] | 57 |
|
---|
[23813] | 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>
|
---|
[24018] | 66 |
|
---|
[23813] | 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 | <!--
|
---|
[19988] | 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 | -->
|
---|
[23813] | 80 | <xsl:template name="defaultDividerBar">
|
---|
| 81 | <xsl:param name="text"/>
|
---|
| 82 | <xsl:choose>
|
---|
[18617] | 83 | <xsl:when test="$text">
|
---|
[23813] | 84 | <div class="divbar">
|
---|
| 85 | <xsl:value-of select="$text"/>
|
---|
| 86 | </div>
|
---|
[18617] | 87 | </xsl:when>
|
---|
| 88 | <xsl:otherwise>
|
---|
[23813] | 89 | <div class="divbar">
|
---|
| 90 | <xsl:text disable-output-escaping="yes">&nbsp;</xsl:text>
|
---|
| 91 | </div>
|
---|
[18617] | 92 | </xsl:otherwise>
|
---|
[19988] | 93 | </xsl:choose>
|
---|
[18617] | 94 | </xsl:template>
|
---|
[24018] | 95 |
|
---|
[23813] | 96 | <xsl:template match="error">
|
---|
[18617] | 97 | Error: <xsl:value-of select="."/>
|
---|
| 98 | </xsl:template>
|
---|
[23813] | 99 | <xsl:template name="displayErrorsIfAny">
|
---|
| 100 | <xsl:if test="descendant::error">
|
---|
[18617] | 101 | <script language="Javascript">
|
---|
[23813] | 102 | <xsl:text disable-output-escaping="yes">
|
---|
[18617] | 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);
|
---|
[23813] | 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">"));
|
---|
[18617] | 117 | } else {
|
---|
| 118 | obj.style.display = "none";
|
---|
| 119 | hide_link = document.getElementById("hide");
|
---|
| 120 | removeAllChildren(hide_link);
|
---|
[23813] | 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">"));
|
---|
[19988] | 124 | }
|
---|
[18617] | 125 | }
|
---|
| 126 | </xsl:text>
|
---|
| 127 | </script>
|
---|
[23813] | 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>
|
---|
[18617] | 133 | <div id="error" style="display: none;">
|
---|
[23813] | 134 | <xsl:apply-templates select="descendant::error"/>
|
---|
[18617] | 135 | </div>
|
---|
| 136 | </xsl:if>
|
---|
| 137 | </xsl:template>
|
---|
[24018] | 138 |
|
---|
[23813] | 139 | <xsl:template name="noTextBar">
|
---|
| 140 | <xsl:text disable-output-escaping="yes">&nbsp;</xsl:text>
|
---|
| 141 | </xsl:template>
|
---|
[24018] | 142 |
|
---|
[23813] | 143 | <xsl:template name="poweredByGS3TextBar">
|
---|
| 144 | <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'gs3power')"/>
|
---|
| 145 | </xsl:template>
|
---|
[24018] | 146 |
|
---|
[23813] | 147 | <xsl:template name="rightArrow">
|
---|
| 148 | <xsl:text disable-output-escaping="yes"> &raquo; </xsl:text>
|
---|
| 149 | </xsl:template>
|
---|
[24018] | 150 |
|
---|
[23813] | 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>
|
---|
[24018] | 157 |
|
---|
[23813] | 158 | <xsl:template name="selectACollectionTextBar">
|
---|
| 159 | <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'home.select_a_collection')"/>
|
---|
| 160 | </xsl:template>
|
---|
[24018] | 161 |
|
---|
[23813] | 162 | <xsl:template name="crossCollectionQuickSearchForm">
|
---|
| 163 | <xsl:apply-templates select="serviceList/service[@name='TextQuery']"/>
|
---|
| 164 | </xsl:template>
|
---|
[24018] | 165 |
|
---|
[23813] | 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>
|
---|
[24018] | 180 |
|
---|
[23813] | 181 | <xsl:template name="collectionLinkWithImage">
|
---|
| 182 | <xsl:choose>
|
---|
| 183 | <xsl:when test="displayItem[@name='icon']">
|
---|
| 184 | <a href="{$library_name}?a=p&sa=about&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 | <!--
|
---|
[20465] | 190 | <div class="collectionLink">
|
---|
[20630] | 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>
|
---|
[20465] | 192 | <xsl:value-of select="displayItem[@name='name']"/>
|
---|
| 193 | </div>
|
---|
[20630] | 194 | -->
|
---|
[23813] | 195 | </a>
|
---|
| 196 | </xsl:when>
|
---|
| 197 | <xsl:otherwise>
|
---|
| 198 | <a href="{$library_name}?a=p&sa=about&c={@name}">
|
---|
| 199 | <div class="collectionLink">
|
---|
| 200 | <xsl:value-of select="displayItem[@name='name']"/>
|
---|
| 201 | </div>
|
---|
| 202 | </a>
|
---|
| 203 | </xsl:otherwise>
|
---|
| 204 | </xsl:choose>
|
---|
[19988] | 205 | </xsl:template>
|
---|
[24018] | 206 |
|
---|
[23813] | 207 | <xsl:template name="serviceClusterList">
|
---|
| 208 | <xsl:apply-templates select="serviceClusterList"/>
|
---|
[19988] | 209 | </xsl:template>
|
---|
[24018] | 210 |
|
---|
[23813] | 211 | <xsl:template match="serviceClusterList">
|
---|
| 212 | <xsl:for-each select="serviceCluster">
|
---|
| 213 | <a href="{$library_name}?a=p&sa=about&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>
|
---|
[24018] | 219 |
|
---|
[23813] | 220 | <xsl:template name="serviceLink">
|
---|
| 221 | <div class="paramLabel">
|
---|
| 222 | <a href="{$library_name}?a=q&rt=d&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>
|
---|
[24018] | 231 |
|
---|
[23813] | 232 | <xsl:template name="authenticationLink">
|
---|
| 233 | <xsl:for-each select="serviceList/service[@type='authen']">
|
---|
| 234 | <li>
|
---|
| 235 | <a href="{$library_name}?a=g&rt=r&sa=authen&s={@name}&s1.aup=Login&s1.un=&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>
|
---|
[24018] | 242 |
|
---|
[23813] | 243 | <xsl:template name="libraryInterfaceLink">
|
---|
| 244 | <li>
|
---|
| 245 | <a href="{$library_name}?a=p&sa=gli4gs3">
|
---|
| 246 | <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'home.librarian_interface')"/>
|
---|
| 247 | </a>
|
---|
| 248 | </li>
|
---|
| 249 | </xsl:template>
|
---|
[24018] | 250 |
|
---|
[23813] | 251 | <xsl:template name="greenstoneLogoAlternateText">
|
---|
| 252 | <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'gsdl')"/>
|
---|
| 253 | </xsl:template>
|
---|
[24018] | 254 |
|
---|
[23813] | 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"/>
|
---|
[24018] | 261 |
|
---|
[23813] | 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>
|
---|
[24018] | 267 |
|
---|
[23813] | 268 | <xsl:template name="collectionHomeLinkWithLogoIfAvailable">
|
---|
| 269 | <a href="{$library_name}?a=p&sa=about&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>
|
---|
[24018] | 288 |
|
---|
[23813] | 289 | <xsl:template name="homeButtonTop">
|
---|
| 290 | <a href="{$library_name}?a=p&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>
|
---|
[24018] | 297 |
|
---|
[23813] | 298 | <xsl:template name="helpButtonTop">
|
---|
[19856] | 299 | <xsl:choose>
|
---|
| 300 | <xsl:when test="$pageType='help'">
|
---|
[23813] | 301 | <li>
|
---|
| 302 | <a>
|
---|
| 303 | <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'help_b')"/>
|
---|
| 304 | </a>
|
---|
| 305 | </li>
|
---|
[19856] | 306 | </xsl:when>
|
---|
| 307 | <xsl:otherwise>
|
---|
[23813] | 308 | <li>
|
---|
| 309 | <a href="{$library_name}?a=p&sa=help&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>
|
---|
[19856] | 316 | </xsl:otherwise>
|
---|
| 317 | </xsl:choose>
|
---|
[23813] | 318 | </xsl:template>
|
---|
[24018] | 319 |
|
---|
[23813] | 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&sa=pref&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>
|
---|
[24018] | 341 |
|
---|
[23813] | 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}&rt=d&s={@name}&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>
|
---|
[24018] | 377 |
|
---|
[23813] | 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>
|
---|
[24018] | 387 |
|
---|
[23813] | 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')"/>
|
---|
[19988] | 398 | </xsl:when>
|
---|
| 399 | <xsl:otherwise>
|
---|
[23813] | 400 | <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'about.noservices')"/>
|
---|
[19988] | 401 | </xsl:otherwise>
|
---|
[23813] | 402 | </xsl:choose>
|
---|
[19988] | 403 | </p>
|
---|
| 404 | <xsl:if test="service">
|
---|
[23813] | 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">
|
---|
[20465] | 409 | <xsl:choose>
|
---|
[23813] | 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>
|
---|
[20465] | 415 | </xsl:choose>
|
---|
[23813] | 416 | </xsl:variable>
|
---|
| 417 | <xsl:if test="$action != 'DO_NOT_DISPLAY'">
|
---|
| 418 | <div class="paramLabel">
|
---|
| 419 | <a href="{$library_name}?a={$action}&rt=d&s={@name}&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>
|
---|
[18617] | 431 | </xsl:if>
|
---|
[23813] | 432 | </xsl:template>
|
---|
[24018] | 433 |
|
---|
[23813] | 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&rt=d&s=<xsl:value-of select="service[@type=$type]/@name"/>&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>
|
---|
[24018] | 453 |
|
---|
[23813] | 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"/>&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>
|
---|
| 479 | </xsl:when>
|
---|
| 480 | <xsl:otherwise>
|
---|
| 481 | <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>
|
---|
| 482 | </xsl:otherwise>
|
---|
| 483 | </xsl:choose>
|
---|
| 484 | <xsl:value-of select="displayItem[@name='name']"/>
|
---|
| 485 | </a>
|
---|
| 486 | </li>
|
---|
| 487 | </xsl:if>
|
---|
| 488 | </xsl:template>
|
---|
[24018] | 489 |
|
---|
[23813] | 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&rt=r&s={/page/pageResponse/service/@name}&c={/page/pageResponse/collection/@name}&cl={@name}">
|
---|
| 495 | <xsl:value-of select="displayItem[@name='description']"/>
|
---|
| 496 | </a>
|
---|
| 497 | </xsl:template>
|
---|
[24018] | 498 |
|
---|
[23813] | 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>
|
---|
[24018] | 511 |
|
---|
[23813] | 512 | <!--
|
---|
[19856] | 513 | BERRY BASKET TEMPLATES
|
---|
| 514 | These get used on many different pages to add the
|
---|
| 515 | berry basket function to the site
|
---|
| 516 | -->
|
---|
[23813] | 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>
|
---|
[24018] | 539 |
|
---|
[23813] | 540 | <!-- include the required javascript and css for berry baskets -->
|
---|
| 541 | <xsl:template name="berryBasketHeadTags">
|
---|
[24018] | 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>
|
---|
[23813] | 551 | <link rel="stylesheet" href="interfaces/{$interface_name}/style/berry.css" type="text/css"/>
|
---|
| 552 | </xsl:template>
|
---|
[24018] | 553 |
|
---|
[23813] | 554 | <!--
|
---|
[19856] | 555 | create a little berry which can be drag&dropped onto the berry basket
|
---|
| 556 | used on classifier and search result pages
|
---|
| 557 | -->
|
---|
[23813] | 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>
|
---|
[24018] | 565 |
|
---|
[23813] | 566 | <!--
|
---|
[19856] | 567 | create little berrys which can be drag&dropped onto the berry basket
|
---|
| 568 | used on the document page
|
---|
| 569 | -->
|
---|
[23813] | 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>
|
---|
[23989] | 581 | <!--<xsl:if test="$selectedNode != $rootNode">
|
---|
[23813] | 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>
|
---|
[23989] | 584 | </xsl:if>-->
|
---|
[23813] | 585 | </div>
|
---|
| 586 | </xsl:if>
|
---|
| 587 | </xsl:template>
|
---|
[24018] | 588 |
|
---|
[23813] | 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>
|
---|
[23989] | 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>
|
---|
[23813] | 596 | </img>
|
---|
| 597 | </xsl:template>
|
---|
[24018] | 598 |
|
---|
[23813] | 599 | <xsl:template name="previousNextButtons">
|
---|
| 600 | <!-- prev -->
|
---|
| 601 | <a>
|
---|
| 602 | <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>
|
---|
| 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&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>
|
---|
| 608 | <img class="morearrow" src="interfaces/{$interface_name}/images/next.png"/>
|
---|
| 609 | </a>
|
---|
| 610 | </xsl:template>
|
---|
[24018] | 611 |
|
---|
[18617] | 612 | </xsl:stylesheet>
|
---|