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