[18617] | 1 | <?xml version="1.0" encoding="UTF-8"?>
|
---|
[25869] | 2 | <xsl:stylesheet version="1.0"
|
---|
| 3 | xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
|
---|
| 4 | xmlns:xslt="http://www.w3.org/1999/XSL/Transform"
|
---|
| 5 | xmlns:gslib="http://www.greenstone.org/XSL/Library"
|
---|
| 6 | xmlns:gsf="http://www.greenstone.org/greenstone3/schema/ConfigFormat"
|
---|
| 7 | xmlns:util="http://org.greenstone.gsdl3.util.XSLTUtil"
|
---|
| 8 | exclude-result-prefixes="util xalan gslib gsf xslt">
|
---|
[25873] | 9 |
|
---|
| 10 |
|
---|
[27087] | 11 | <!-- force lower priority on xsl:output, so other files like rss.xsl can override with their own xsl:output stmt
|
---|
| 12 | If other files don't specify any, gslib.xsl specifies html output as default and defines a loose DOCTYPE for it. -->
|
---|
| 13 | <xsl:import href="html-output.xsl" />
|
---|
[25873] | 14 |
|
---|
[27087] | 15 | <xsl:include href="xml-to-string.xsl"/>
|
---|
[25920] | 16 |
|
---|
[23813] | 17 | <!-- some global parameters - these are set by whoever is invoking the transformation -->
|
---|
[18617] | 18 | <xsl:param name="interface_name"/>
|
---|
| 19 | <xsl:param name="library_name"/>
|
---|
[25280] | 20 | <xsl:param name="site_name"/>
|
---|
[30478] | 21 | <xsl:param name="use_client_side_xslt"/>
|
---|
[18617] | 22 | <!-- every pages ....................................................................... -->
|
---|
[25280] | 23 |
|
---|
[23813] | 24 | <xsl:template name="siteName">
|
---|
| 25 | <xsl:value-of select="/page/pageResponse/metadataList/metadata[@name='siteName']"/>
|
---|
| 26 | </xsl:template>
|
---|
[25280] | 27 |
|
---|
[23813] | 28 | <xsl:template name="siteLink">
|
---|
| 29 | <a href="./{$library_name}">
|
---|
| 30 | <xsl:call-template name="siteName"/>
|
---|
| 31 | </a>
|
---|
[26202] | 32 | <xsl:text> </xsl:text>
|
---|
[23813] | 33 | </xsl:template>
|
---|
[24018] | 34 |
|
---|
[23813] | 35 | <xsl:variable name="a">
|
---|
| 36 | <xsl:value-of select="/page/pageRequest/paramList/param[@name='a']/@value"/>
|
---|
| 37 | </xsl:variable>
|
---|
[24018] | 38 |
|
---|
[23813] | 39 | <xsl:variable name="collections" select="/page/pageResponse/collectionList/collection"/>
|
---|
[24018] | 40 |
|
---|
[23813] | 41 | <xsl:variable name="berrybasketswitch">
|
---|
| 42 | <xsl:value-of select="/page/pageRequest/paramList/param[@name='berrybasket']/@value"/>
|
---|
| 43 | </xsl:variable>
|
---|
[24018] | 44 |
|
---|
[23813] | 45 | <xsl:variable name="berryBasketOn" select="/page/pageRequest/paramList/param[@name='berrybasket' and @value='on']"/>
|
---|
[24510] | 46 | <xsl:variable name="documentBasketOn" select="/page/pageRequest/paramList/param[@name='documentbasket' and @value='on']"/>
|
---|
[24018] | 47 |
|
---|
[25144] | 48 | <xsl:variable name="thisCollectionEditor">
|
---|
| 49 | <xsl:value-of select="/page/pageRequest/paramList/param[@name = 'c']/@value"/>
|
---|
| 50 | <xsl:text>-collection-editor</xsl:text>
|
---|
| 51 | </xsl:variable>
|
---|
| 52 |
|
---|
[23813] | 53 | <!-- template to get the name of the current collection -->
|
---|
| 54 | <xsl:template name="collectionName">
|
---|
| 55 | <xsl:choose>
|
---|
| 56 | <xsl:when test="/page/pageResponse/collection">
|
---|
| 57 | <xsl:value-of select="/page/pageResponse/collection/displayItem[@name='name']"/>
|
---|
| 58 | </xsl:when>
|
---|
| 59 | <xsl:otherwise>All Collections</xsl:otherwise>
|
---|
| 60 | </xsl:choose>
|
---|
| 61 | </xsl:template>
|
---|
[24018] | 62 |
|
---|
[23813] | 63 | <xsl:template name="collectionNameShort">
|
---|
| 64 | <xsl:value-of select="/page/pageResponse/collection/@name"/>
|
---|
| 65 | </xsl:template>
|
---|
| 66 | <xsl:template name="collectionNameLinked">
|
---|
| 67 | <xsl:if test="/page/pageResponse/collection">
|
---|
| 68 | <a>
|
---|
[25439] | 69 | <xsl:attribute name="href">./<xsl:value-of select="$library_name"/>/collection/<xsl:call-template name="collectionNameShort"/>/page/about</xsl:attribute>
|
---|
[23813] | 70 | <xsl:call-template name="collectionName"/>
|
---|
| 71 | </a>
|
---|
| 72 | </xsl:if>
|
---|
| 73 | </xsl:template>
|
---|
[24018] | 74 |
|
---|
[23813] | 75 | <!-- text to get the name of the current service ("Browse","Search" etc) -->
|
---|
| 76 | <xsl:template name="serviceName">
|
---|
| 77 | <xsl:value-of select="/page/pageResponse/service/displayItem[@name='name']"/>
|
---|
| 78 | </xsl:template>
|
---|
[24018] | 79 |
|
---|
[23813] | 80 | <xsl:template name="textDirectionAttribute">
|
---|
| 81 | <xsl:attribute name="dir">
|
---|
| 82 | <xsl:choose>
|
---|
| 83 | <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>
|
---|
| 84 | <xsl:otherwise>ltr</xsl:otherwise>
|
---|
| 85 | </xsl:choose>
|
---|
| 86 | </xsl:attribute>
|
---|
| 87 | </xsl:template>
|
---|
[24018] | 88 |
|
---|
[23813] | 89 | <xsl:template name="actionClass">
|
---|
| 90 | <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>
|
---|
| 91 | </xsl:template>
|
---|
| 92 | <!-- username, if logged in -->
|
---|
| 93 | <!--
|
---|
[19988] | 94 | <xsl:template name="username">
|
---|
| 95 | <xsl:if test="$un_s!=''">
|
---|
| 96 | <xsl:if test="$asn!='' and $asn!='0'">
|
---|
| 97 | <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'authen.username')"/> : <xsl:value-of select="$un_s"/>
|
---|
| 98 | </xsl:if>
|
---|
| 99 | </xsl:if>
|
---|
| 100 | </xsl:template>
|
---|
| 101 | -->
|
---|
[23813] | 102 | <xsl:template name="defaultDividerBar">
|
---|
| 103 | <xsl:param name="text"/>
|
---|
| 104 | <xsl:choose>
|
---|
[18617] | 105 | <xsl:when test="$text">
|
---|
[23813] | 106 | <div class="divbar">
|
---|
| 107 | <xsl:value-of select="$text"/>
|
---|
| 108 | </div>
|
---|
[18617] | 109 | </xsl:when>
|
---|
| 110 | <xsl:otherwise>
|
---|
[23813] | 111 | <div class="divbar">
|
---|
| 112 | <xsl:text disable-output-escaping="yes">&nbsp;</xsl:text>
|
---|
| 113 | </div>
|
---|
[18617] | 114 | </xsl:otherwise>
|
---|
[19988] | 115 | </xsl:choose>
|
---|
[18617] | 116 | </xsl:template>
|
---|
[24018] | 117 |
|
---|
[23813] | 118 | <xsl:template match="error">
|
---|
[26488] | 119 | <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'error')"/> <xsl:value-of select="."/>
|
---|
[18617] | 120 | </xsl:template>
|
---|
[23813] | 121 | <xsl:template name="displayErrorsIfAny">
|
---|
| 122 | <xsl:if test="descendant::error">
|
---|
[18617] | 123 | <script language="Javascript">
|
---|
[23813] | 124 | <xsl:text disable-output-escaping="yes">
|
---|
[18617] | 125 | function removeAllChildren(node) {
|
---|
| 126 | while (node.hasChildNodes()) {
|
---|
| 127 | node.removeChild(node.firstChild);
|
---|
| 128 | }
|
---|
| 129 | }
|
---|
| 130 |
|
---|
| 131 | function toggleHideError(obj) {
|
---|
| 132 | if (obj.style.display == "none") {
|
---|
| 133 | obj.style.display = "";
|
---|
| 134 | hide_link = document.getElementById("hide");
|
---|
| 135 | removeAllChildren(hide_link);
|
---|
[23813] | 136 | hide_link.appendChild(document.createTextNode("</xsl:text>
|
---|
| 137 | <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'hide_error')"/>
|
---|
| 138 | <xsl:text disable-output-escaping="yes">"));
|
---|
[18617] | 139 | } else {
|
---|
| 140 | obj.style.display = "none";
|
---|
| 141 | hide_link = document.getElementById("hide");
|
---|
| 142 | removeAllChildren(hide_link);
|
---|
[23813] | 143 | hide_link.appendChild(document.createTextNode("</xsl:text>
|
---|
| 144 | <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'show_error')"/>
|
---|
| 145 | <xsl:text disable-output-escaping="yes">"));
|
---|
[19988] | 146 | }
|
---|
[18617] | 147 | }
|
---|
| 148 | </xsl:text>
|
---|
| 149 | </script>
|
---|
[23813] | 150 | <p align="right">
|
---|
| 151 | <a id="hide" href="javascript:toggleHideError(error);">
|
---|
| 152 | <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'show_error')"/>
|
---|
| 153 | </a>
|
---|
| 154 | </p>
|
---|
[18617] | 155 | <div id="error" style="display: none;">
|
---|
[23813] | 156 | <xsl:apply-templates select="descendant::error"/>
|
---|
[18617] | 157 | </div>
|
---|
| 158 | </xsl:if>
|
---|
| 159 | </xsl:template>
|
---|
[24018] | 160 |
|
---|
[23813] | 161 | <xsl:template name="noTextBar">
|
---|
[30478] | 162 | <xsl:text disable-output-escaping="yes">&nbsp;</xsl:text><!-- could also be expressed   -->
|
---|
[23813] | 163 | </xsl:template>
|
---|
[24018] | 164 |
|
---|
[23813] | 165 | <xsl:template name="poweredByGS3TextBar">
|
---|
| 166 | <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'gs3power')"/>
|
---|
| 167 | </xsl:template>
|
---|
[24018] | 168 |
|
---|
[23813] | 169 | <xsl:template name="rightArrow">
|
---|
[30478] | 170 | <xsl:text disable-output-escaping="yes"> &raquo; </xsl:text> <!-- could also be expressed » -->
|
---|
[23813] | 171 | </xsl:template>
|
---|
[24018] | 172 |
|
---|
[23813] | 173 | <!-- site home ....................................................................... -->
|
---|
| 174 | <xsl:template name="siteHomePageTitle">
|
---|
| 175 | <!-- put a space in the title in case the actual value is missing - mozilla will not display a page with no title-->
|
---|
| 176 | <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'gsdl')"/>
|
---|
| 177 | <xsl:text> </xsl:text>
|
---|
| 178 | </xsl:template>
|
---|
[24018] | 179 |
|
---|
[23813] | 180 | <xsl:template name="selectACollectionTextBar">
|
---|
| 181 | <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'home.select_a_collection')"/>
|
---|
| 182 | </xsl:template>
|
---|
[24018] | 183 |
|
---|
[23813] | 184 | <xsl:template name="crossCollectionQuickSearchForm">
|
---|
| 185 | <xsl:apply-templates select="serviceList/service[@name='TextQuery']"/>
|
---|
| 186 | </xsl:template>
|
---|
[24018] | 187 |
|
---|
[23813] | 188 | <xsl:template match="service[@name='TextQuery']">
|
---|
| 189 | <form name="QuickSearch" method="get" action="{$library_name}">
|
---|
| 190 | <input type="hidden" name="a" value="q"/>
|
---|
| 191 | <input type="hidden" name="rt" value="rd"/>
|
---|
| 192 | <input type="hidden" name="s" value="{@name}"/>
|
---|
| 193 | <input type="hidden" name="s1.collection" value="all"/>
|
---|
| 194 | <input type="text" name="s1.query" size="20"/>
|
---|
| 195 | <input type="submit">
|
---|
| 196 | <xsl:attribute name="value">
|
---|
| 197 | <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'home.quick_search')"/>
|
---|
| 198 | </xsl:attribute>
|
---|
| 199 | </input>
|
---|
| 200 | </form>
|
---|
| 201 | </xsl:template>
|
---|
[24018] | 202 |
|
---|
[30540] | 203 | <xsl:template name="groupLinkWithImage">
|
---|
| 204 | <xsl:variable name="desc"><xsl:value-of select="description"/></xsl:variable>
|
---|
| 205 | <xsl:variable name="group_href"><xsl:value-of select="$library_name"/>?a=p&sa=home&group=<xsl:value-of select="/page/pageRequest/paramList/param[@name='group']/@value"/>/<xsl:value-of select="@name"/></xsl:variable>
|
---|
[30542] | 206 |
|
---|
[30540] | 207 | <xsl:choose>
|
---|
[30542] | 208 | <xsl:when test="util:checkFileExistence($site_name, backgroundImage)">
|
---|
[30540] | 209 | <a href="{$group_href}" title="{$desc}">
|
---|
| 210 | <img class="groupLinkImage">
|
---|
| 211 | <xsl:attribute name="alt"><xsl:value-of select="displayItem[@name='name']"/></xsl:attribute>
|
---|
[30542] | 212 | <xsl:attribute name="src">sites/<xsl:value-of select="$site_name"/>/<xsl:value-of select="backgroundImage"/></xsl:attribute>
|
---|
[30540] | 213 | </img>
|
---|
| 214 | </a>
|
---|
| 215 | </xsl:when>
|
---|
| 216 | <xsl:otherwise>
|
---|
| 217 | <a href="{$group_href}" title="{$desc}">
|
---|
| 218 | <div class="groupLink ui-corner-all">
|
---|
| 219 | <div class="groupLinkText ui-widget-content ui-corner-top">
|
---|
[30542] | 220 | <xsl:choose>
|
---|
| 221 | <xsl:when test="boolean(title)">
|
---|
| 222 | <xsl:value-of select="title"/>
|
---|
| 223 | </xsl:when>
|
---|
| 224 | <xsl:otherwise>
|
---|
| 225 | <xsl:value-of select="@name"/>
|
---|
| 226 | </xsl:otherwise>
|
---|
| 227 | </xsl:choose>
|
---|
[30540] | 228 | </div>
|
---|
| 229 | <div style="height:15px;" class="ui-state-default ui-corner-bottom"><xsl:text> </xsl:text></div>
|
---|
| 230 | </div>
|
---|
| 231 | </a>
|
---|
| 232 | </xsl:otherwise>
|
---|
| 233 | </xsl:choose>
|
---|
| 234 | </xsl:template>
|
---|
| 235 |
|
---|
[23813] | 236 | <xsl:template name="collectionLinkWithImage">
|
---|
[25784] | 237 | <xsl:variable name="desc"><xsl:value-of select="displayItem[@name='shortDescription']"/></xsl:variable>
|
---|
[26448] | 238 | <xsl:variable name="coll_href"><xsl:value-of select="$library_name"/>/collection/<xsl:value-of select="@name"/>/page/about<xsl:choose><xsl:when test="libraryParamList/param">?<xsl:for-each select="libraryParamList/param"><xsl:value-of select="@name"/>=<xsl:value-of select="@default"/>&</xsl:for-each></xsl:when></xsl:choose></xsl:variable>
|
---|
[23813] | 239 | <xsl:choose>
|
---|
| 240 | <xsl:when test="displayItem[@name='icon']">
|
---|
[26448] | 241 | <a href="{$coll_href}" title="{$desc}">
|
---|
[23813] | 242 | <img class="collectionLinkImage">
|
---|
[25784] | 243 | <xsl:attribute name="alt"><xsl:value-of select="displayItem[@name='name']"/></xsl:attribute>
|
---|
| 244 | <xsl:attribute name="src">sites/<xsl:value-of select="$site_name"/>/collect/<xsl:value-of select="@name"/>/images/<xsl:value-of select="displayItem[@name='icon']"/></xsl:attribute>
|
---|
[23813] | 245 | </img>
|
---|
| 246 | </a>
|
---|
| 247 | </xsl:when>
|
---|
| 248 | <xsl:otherwise>
|
---|
[26448] | 249 | <a href="{$coll_href}" title="{$desc}">
|
---|
[28051] | 250 | <div class="collectionLink ui-corner-all">
|
---|
| 251 | <div class="collectionLinkText ui-widget-content ui-corner-top">
|
---|
| 252 | <xsl:value-of select="displayItem[@name='name']"/>
|
---|
| 253 | </div>
|
---|
| 254 | <div style="height:15px;" class="ui-state-default ui-corner-bottom"><xsl:text> </xsl:text></div>
|
---|
[23813] | 255 | </div>
|
---|
| 256 | </a>
|
---|
| 257 | </xsl:otherwise>
|
---|
| 258 | </xsl:choose>
|
---|
[19988] | 259 | </xsl:template>
|
---|
[24018] | 260 |
|
---|
[23813] | 261 | <xsl:template name="serviceClusterList">
|
---|
| 262 | <xsl:apply-templates select="serviceClusterList"/>
|
---|
[19988] | 263 | </xsl:template>
|
---|
[24018] | 264 |
|
---|
[23813] | 265 | <xsl:template match="serviceClusterList">
|
---|
| 266 | <xsl:for-each select="serviceCluster">
|
---|
| 267 | <a href="{$library_name}?a=p&sa=about&c={@name}">
|
---|
| 268 | <xsl:value-of select="@name"/>
|
---|
| 269 | <xsl:value-of select="displayItem[@name='name']"/>
|
---|
| 270 | </a>
|
---|
| 271 | </xsl:for-each>
|
---|
| 272 | </xsl:template>
|
---|
[24018] | 273 |
|
---|
[23813] | 274 | <xsl:template name="serviceLink">
|
---|
| 275 | <div class="paramLabel">
|
---|
| 276 | <a href="{$library_name}?a=q&rt=d&s={@name}">
|
---|
| 277 | <xsl:value-of select="displayItem[@name='name']"/>
|
---|
| 278 | </a>
|
---|
| 279 | </div>
|
---|
| 280 | <div class="paramValue">
|
---|
| 281 | <xsl:value-of select="displayItem[@name='description']"/>
|
---|
| 282 | </div>
|
---|
| 283 | <br class="clear"/>
|
---|
| 284 | </xsl:template>
|
---|
[24018] | 285 |
|
---|
[23813] | 286 | <xsl:template name="authenticationLink">
|
---|
[24149] | 287 | <xsl:for-each select="//serviceList/service[@type='authen']">
|
---|
| 288 | <div class="paramLabel">
|
---|
[25280] | 289 | <a href="{$library_name}/admin/ListUsers">
|
---|
[24149] | 290 | <xsl:value-of select="displayItem[@name='name']"/>
|
---|
| 291 | </a>
|
---|
| 292 | </div>
|
---|
| 293 | <div class="paramValue">
|
---|
| 294 | <xsl:value-of select="displayItem[@name='description']"/>
|
---|
| 295 | </div>
|
---|
[23813] | 296 | </xsl:for-each>
|
---|
| 297 | </xsl:template>
|
---|
[25280] | 298 |
|
---|
| 299 | <xsl:template name="registerLink">
|
---|
| 300 | <xsl:for-each select="//serviceList/service[@type='authen']">
|
---|
| 301 | <div class="paramLabel">
|
---|
| 302 | <a href="{$library_name}/admin/Register">
|
---|
| 303 | <xsl:text>Register</xsl:text>
|
---|
| 304 | </a>
|
---|
| 305 | </div>
|
---|
| 306 | <div class="paramValue">
|
---|
| 307 | <xsl:text>Register as a new user</xsl:text>
|
---|
| 308 | </div>
|
---|
| 309 | </xsl:for-each>
|
---|
| 310 | </xsl:template>
|
---|
| 311 |
|
---|
[23813] | 312 | <xsl:template name="libraryInterfaceLink">
|
---|
| 313 | <li>
|
---|
| 314 | <a href="{$library_name}?a=p&sa=gli4gs3">
|
---|
| 315 | <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'home.librarian_interface')"/>
|
---|
| 316 | </a>
|
---|
| 317 | </li>
|
---|
| 318 | </xsl:template>
|
---|
[24018] | 319 |
|
---|
[23813] | 320 | <xsl:template name="greenstoneLogoAlternateText">
|
---|
| 321 | <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'gsdl')"/>
|
---|
| 322 | </xsl:template>
|
---|
[24018] | 323 |
|
---|
[23813] | 324 | <!-- about page - collection home ....................................................................... -->
|
---|
| 325 | <xsl:variable name="collName" select="/page/pageRequest/paramList/param[@name='c']/@value"/>
|
---|
[25835] | 326 | <xsl:variable name="httpPath" select="/page/pageResponse/collection/metadataList/metadata[@name='httpPath']"/>
|
---|
[25934] | 327 | <xsl:variable name="siteName" select="$site_name"/>
|
---|
[30478] | 328 | <!--
|
---|
| 329 | Already defined above as a variable, not sure why if way being defined here again as a 'param'
|
---|
| 330 | <xsl:param name="collName" select="/page/pageRequest/paramList/param[@name='c']/@value"/>
|
---|
| 331 | -->
|
---|
[23813] | 332 | <xsl:param name="pageType"/>
|
---|
| 333 | <xsl:variable name="this-element" select="/page/pageResponse/collection|/page/pageResponse/serviceCluster"/>
|
---|
[25920] | 334 | <xsl:variable name="this-service" select="/page/pageRequest/paramList/param[@name = 's']/@value"/>
|
---|
[26501] | 335 |
|
---|
| 336 | <!--
|
---|
| 337 | _httpimages_ {_httpweb_/images}
|
---|
| 338 | _httpscript_ {_httpweb_/script}
|
---|
| 339 | _httpstyle_ {_httpweb_/style}
|
---|
| 340 | _httpflash_ {_httpweb_/flash}
|
---|
| 341 | _httpjava_ {_httpweb_/java}
|
---|
| 342 | -->
|
---|
| 343 |
|
---|
| 344 |
|
---|
| 345 | <xsl:template name="define-js-variable">
|
---|
| 346 | <xsl:param name="name"/>
|
---|
| 347 | <xsl:param name="value"/>
|
---|
| 348 | <script type="text/javascript">
|
---|
| 349 | gs.variables[<xslt:text disable-output-escaping="yes">"</xslt:text><xsl:value-of select="$name"/><xslt:text disable-output-escaping="yes">"</xslt:text>]
|
---|
| 350 | <xslt:text disable-output-escaping="yes"> = "</xslt:text>
|
---|
| 351 | <xsl:value-of select="$value"/>
|
---|
| 352 | <xslt:text disable-output-escaping="yes">";</xslt:text>
|
---|
| 353 | </script>
|
---|
| 354 | </xsl:template>
|
---|
| 355 |
|
---|
| 356 | <xsl:variable name="_httpcollection_" select="$httpPath"/>
|
---|
| 357 | <xsl:variable name="_httpbrowse_"><xsl:value-of select="$library_name"/>/collection/<xsl:value-of select="$collName"/>/browse</xsl:variable>
|
---|
| 358 | <xsl:variable name="_httpquery_"><xsl:value-of select="$library_name"/>/collection/<xsl:value-of select="$collName"/>/search</xsl:variable>
|
---|
| 359 |
|
---|
| 360 | <xsl:template name="define-js-macro-variables">
|
---|
| 361 |
|
---|
| 362 | <xsl:call-template name="define-js-variable">
|
---|
| 363 | <xsl:with-param name="name" select="'_httpbrowse_'"/>
|
---|
| 364 | <xsl:with-param name="value" select="$_httpbrowse_"/>
|
---|
| 365 | </xsl:call-template>
|
---|
| 366 |
|
---|
| 367 | <xsl:call-template name="define-js-variable">
|
---|
| 368 | <xsl:with-param name="name" select="'_httpquery_'"/>
|
---|
| 369 | <xsl:with-param name="value" select="$_httpquery_"/>
|
---|
| 370 | </xsl:call-template>
|
---|
| 371 |
|
---|
| 372 | </xsl:template>
|
---|
| 373 |
|
---|
| 374 |
|
---|
[23813] | 375 | <xsl:template name="aboutCollectionPageTitle">
|
---|
| 376 | <!-- put a space in the title in case the actual value is missing - mozilla will not display a page with no title-->
|
---|
| 377 | <xsl:value-of select="/page/pageResponse/collection/displayItem[@name='name']"/>
|
---|
| 378 | <xsl:text> </xsl:text>
|
---|
| 379 | </xsl:template>
|
---|
[24018] | 380 |
|
---|
[23813] | 381 | <xsl:template name="collectionHomeLinkWithLogoIfAvailable">
|
---|
| 382 | <a href="{$library_name}?a=p&sa=about&c={$collName}">
|
---|
| 383 | <xsl:choose>
|
---|
| 384 | <xsl:when test="$this-element/displayItem[@name='icon']">
|
---|
| 385 | <img border="0">
|
---|
| 386 | <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>
|
---|
| 387 | <xsl:attribute name="alt">
|
---|
| 388 | <xsl:value-of select="$this-element/displayItem[@name='name']"/>
|
---|
| 389 | </xsl:attribute>
|
---|
| 390 | <xsl:attribute name="title">
|
---|
| 391 | <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'aboutpage')"/>
|
---|
| 392 | </xsl:attribute>
|
---|
| 393 | </img>
|
---|
| 394 | </xsl:when>
|
---|
| 395 | <xsl:otherwise>
|
---|
| 396 | <xsl:value-of select="$this-element/displayItem[@name='name']"/>
|
---|
| 397 | </xsl:otherwise>
|
---|
| 398 | </xsl:choose>
|
---|
| 399 | </a>
|
---|
| 400 | </xsl:template>
|
---|
[24018] | 401 |
|
---|
[23813] | 402 | <xsl:template name="homeButtonTop">
|
---|
| 403 | <a href="{$library_name}?a=p&sa=home">
|
---|
| 404 | <xsl:attribute name="title">
|
---|
| 405 | <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'home_tip')"/>
|
---|
| 406 | </xsl:attribute>
|
---|
| 407 | <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'home_b')"/>
|
---|
| 408 | </a>
|
---|
| 409 | </xsl:template>
|
---|
[24018] | 410 |
|
---|
[23813] | 411 | <xsl:template name="helpButtonTop">
|
---|
[19856] | 412 | <xsl:choose>
|
---|
| 413 | <xsl:when test="$pageType='help'">
|
---|
[23813] | 414 | <li>
|
---|
| 415 | <a>
|
---|
| 416 | <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'help_b')"/>
|
---|
| 417 | </a>
|
---|
| 418 | </li>
|
---|
[19856] | 419 | </xsl:when>
|
---|
| 420 | <xsl:otherwise>
|
---|
[23813] | 421 | <li>
|
---|
| 422 | <a href="{$library_name}?a=p&sa=help&c={$collName}">
|
---|
| 423 | <xsl:attribute name="title">
|
---|
| 424 | <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'help_tip')"/>
|
---|
| 425 | </xsl:attribute>
|
---|
| 426 | <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'help_b')"/>
|
---|
| 427 | </a>
|
---|
| 428 | </li>
|
---|
[19856] | 429 | </xsl:otherwise>
|
---|
| 430 | </xsl:choose>
|
---|
[23813] | 431 | </xsl:template>
|
---|
[24018] | 432 |
|
---|
[23813] | 433 | <xsl:template name="preferencesButtonTop">
|
---|
| 434 | <xsl:choose>
|
---|
| 435 | <xsl:when test="$pageType='pref'">
|
---|
| 436 | <li>
|
---|
| 437 | <a>
|
---|
| 438 | <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'pref_b')"/>
|
---|
| 439 | </a>
|
---|
| 440 | </li>
|
---|
| 441 | </xsl:when>
|
---|
| 442 | <xsl:otherwise>
|
---|
| 443 | <li>
|
---|
| 444 | <a href="{$library_name}?a=p&sa=pref&c={$collName}">
|
---|
| 445 | <xsl:attribute name="title">
|
---|
| 446 | <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'pref_tip')"/>
|
---|
| 447 | </xsl:attribute>
|
---|
| 448 | <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'pref_b')"/>
|
---|
| 449 | </a>
|
---|
| 450 | </li>
|
---|
| 451 | </xsl:otherwise>
|
---|
| 452 | </xsl:choose>
|
---|
| 453 | </xsl:template>
|
---|
[24018] | 454 |
|
---|
[23813] | 455 | <xsl:template name="servicesNavigationBar">
|
---|
| 456 | <xsl:for-each select="$this-element/serviceList/service">
|
---|
| 457 | <xsl:variable name="action">
|
---|
| 458 | <xsl:choose>
|
---|
| 459 | <xsl:when test="@name=$this-service">CURRENT</xsl:when>
|
---|
| 460 | <xsl:when test="@type='query'">q</xsl:when>
|
---|
| 461 | <xsl:when test="@type='browse'">b</xsl:when>
|
---|
| 462 | <xsl:when test="@type='process'">pr</xsl:when>
|
---|
| 463 | <xsl:when test="@type='applet'">a</xsl:when>
|
---|
| 464 | <xsl:otherwise>DO_NOT_DISPLAY</xsl:otherwise>
|
---|
| 465 | </xsl:choose>
|
---|
| 466 | </xsl:variable>
|
---|
| 467 | <xsl:choose>
|
---|
| 468 | <xsl:when test="$action='CURRENT'">
|
---|
| 469 | <li>
|
---|
| 470 | <a>
|
---|
| 471 | <xsl:value-of select="displayItem[@name='name']"/>
|
---|
| 472 | </a>
|
---|
| 473 | </li>
|
---|
| 474 | </xsl:when>
|
---|
| 475 | <xsl:when test="$action !='DO_NOT_DISPLAY'">
|
---|
| 476 | <li>
|
---|
| 477 | <a href="{$library_name}?a={$action}&rt=d&s={@name}&c={$collName}">
|
---|
| 478 | <xsl:if test="displayItem[@name='description']">
|
---|
| 479 | <xsl:attribute name="title">
|
---|
| 480 | <xsl:value-of select="displayItem[@name='description']"/>
|
---|
| 481 | </xsl:attribute>
|
---|
| 482 | </xsl:if>
|
---|
| 483 | <xsl:value-of select="displayItem[@name='name']"/>
|
---|
| 484 | </a>
|
---|
| 485 | </li>
|
---|
| 486 | </xsl:when>
|
---|
| 487 | </xsl:choose>
|
---|
| 488 | </xsl:for-each>
|
---|
| 489 | </xsl:template>
|
---|
[24018] | 490 |
|
---|
[23813] | 491 | <xsl:template name="collectionDescriptionTextAndServicesLinks">
|
---|
| 492 | <xsl:apply-templates select="pageResponse/collection|serviceCluster"/>
|
---|
| 493 | </xsl:template>
|
---|
| 494 | <xsl:template match="collection|serviceCluster">
|
---|
| 495 | <xsl:value-of select="displayItem[@name='description']" disable-output-escaping="yes"/>
|
---|
[28625] | 496 | <!-- Uncomment this section if you want the collection service links and their descriptions to appear -->
|
---|
| 497 | <!--<xsl:apply-templates select="serviceList">
|
---|
[23813] | 498 | <xsl:with-param name="collName" select="$collName"/>
|
---|
[28625] | 499 | </xsl:apply-templates>-->
|
---|
[23813] | 500 | </xsl:template>
|
---|
[24018] | 501 |
|
---|
[23813] | 502 | <xsl:template match="serviceList">
|
---|
| 503 | <xsl:param name="collName"/>
|
---|
| 504 | <h3>
|
---|
| 505 | <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'about.services')"/>
|
---|
| 506 | </h3>
|
---|
| 507 | <p>
|
---|
| 508 | <xsl:choose>
|
---|
| 509 | <xsl:when test="service">
|
---|
| 510 | <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'about.servicehelp')"/>
|
---|
[19988] | 511 | </xsl:when>
|
---|
| 512 | <xsl:otherwise>
|
---|
[23813] | 513 | <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'about.noservices')"/>
|
---|
[19988] | 514 | </xsl:otherwise>
|
---|
[23813] | 515 | </xsl:choose>
|
---|
[19988] | 516 | </p>
|
---|
| 517 | <xsl:if test="service">
|
---|
[23813] | 518 | <div id="servicelist">
|
---|
| 519 | <xsl:for-each select="service">
|
---|
| 520 | <xsl:sort select="position()" order="descending" data-type="number"/>
|
---|
| 521 | <xsl:variable name="action">
|
---|
[20465] | 522 | <xsl:choose>
|
---|
[23813] | 523 | <xsl:when test="@type='query'">q</xsl:when>
|
---|
| 524 | <xsl:when test="@type='process'">pr</xsl:when>
|
---|
| 525 | <xsl:when test="@type='applet'">a</xsl:when>
|
---|
| 526 | <xsl:otherwise>DO_NOT_DISPLAY</xsl:otherwise>
|
---|
[20465] | 527 | </xsl:choose>
|
---|
[23813] | 528 | </xsl:variable>
|
---|
| 529 | <xsl:if test="$action != 'DO_NOT_DISPLAY'">
|
---|
| 530 | <div class="paramLabel">
|
---|
| 531 | <a href="{$library_name}?a={$action}&rt=d&s={@name}&c={$collName}">
|
---|
| 532 | <xsl:value-of select="displayItem[@name='name']"/>
|
---|
| 533 | </a>
|
---|
| 534 | </div>
|
---|
| 535 | <div class="paramLabel">
|
---|
| 536 | <xsl:value-of select="displayItem[@name='description']"/>
|
---|
| 537 | </div>
|
---|
| 538 | <br class="clear"/>
|
---|
| 539 | </xsl:if>
|
---|
| 540 | </xsl:for-each>
|
---|
| 541 | </div>
|
---|
| 542 | </xsl:if>
|
---|
[28625] | 543 |
|
---|
[23813] | 544 | </xsl:template>
|
---|
[24018] | 545 |
|
---|
[23813] | 546 | <!-- classifier page ............................................................................ -->
|
---|
| 547 | <xsl:template name="collapsedNavigationTab">
|
---|
| 548 | <xsl:param name="type"/>
|
---|
| 549 | <xsl:variable name="isCurrent" select="/page/pageResponse/service[@type=$type]"/>
|
---|
| 550 | <li>
|
---|
| 551 | <xsl:if test="$isCurrent">
|
---|
| 552 | <xsl:attribute name="class">current</xsl:attribute>
|
---|
| 553 | </xsl:if>
|
---|
| 554 | <a>
|
---|
| 555 | <xsl:if test="service[@name=$type]/displayItem[@name='description']">
|
---|
| 556 | <xsl:attribute name="title">
|
---|
| 557 | <xsl:value-of select="service[@name=$type]/displayItem[@name='description']"/>
|
---|
| 558 | </xsl:attribute>
|
---|
| 559 | </xsl:if>
|
---|
| 560 | <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>
|
---|
| 561 | <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, $type)"/>
|
---|
| 562 | </a>
|
---|
| 563 | </li>
|
---|
| 564 | </xsl:template>
|
---|
[24018] | 565 |
|
---|
[23813] | 566 | <xsl:template name="navigationTab">
|
---|
| 567 | <xsl:variable name="isCurrent" select="@name=/page/pageResponse/service/@name"/>
|
---|
| 568 | <xsl:variable name="action">
|
---|
| 569 | <xsl:choose>
|
---|
| 570 | <xsl:when test="@type='query'">q</xsl:when>
|
---|
| 571 | <xsl:when test="@type='browse'">b</xsl:when>
|
---|
| 572 | <xsl:when test="@type='process'">pr</xsl:when>
|
---|
| 573 | <xsl:when test="@type='applet'">a</xsl:when>
|
---|
| 574 | <xsl:otherwise>DO_NOT_DISPLAY</xsl:otherwise>
|
---|
| 575 | </xsl:choose>
|
---|
| 576 | </xsl:variable>
|
---|
| 577 | <xsl:if test="$action!='DO_NOT_DISPLAY'">
|
---|
| 578 | <li>
|
---|
| 579 | <xsl:if test="$isCurrent">
|
---|
| 580 | <xsl:attribute name="class">current</xsl:attribute>
|
---|
| 581 | </xsl:if>
|
---|
| 582 | <a>
|
---|
| 583 | <xsl:if test="displayItem[@name='description']">
|
---|
| 584 | <xsl:attribute name="title">
|
---|
| 585 | <xsl:value-of select="displayItem[@name='description']"/>
|
---|
| 586 | </xsl:attribute>
|
---|
| 587 | </xsl:if>
|
---|
| 588 | <xsl:choose>
|
---|
| 589 | <xsl:when test="classifierList/classifier/@name">
|
---|
| 590 | <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>
|
---|
| 591 | </xsl:when>
|
---|
| 592 | <xsl:otherwise>
|
---|
| 593 | <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>
|
---|
| 594 | </xsl:otherwise>
|
---|
| 595 | </xsl:choose>
|
---|
| 596 | <xsl:value-of select="displayItem[@name='name']"/>
|
---|
| 597 | </a>
|
---|
| 598 | </li>
|
---|
| 599 | </xsl:if>
|
---|
| 600 | </xsl:template>
|
---|
[24018] | 601 |
|
---|
[23813] | 602 | <xsl:template name="classifierLink">
|
---|
| 603 | <xsl:if test="@name=/page/pageResponse/classifier/@name">
|
---|
| 604 | <xsl:attribute name="class">current</xsl:attribute>
|
---|
| 605 | </xsl:if>
|
---|
| 606 | <a href="{$library_name}?a=b&rt=r&s={/page/pageResponse/service/@name}&c={/page/pageResponse/collection/@name}&cl={@name}">
|
---|
| 607 | <xsl:value-of select="displayItem[@name='description']"/>
|
---|
| 608 | </a>
|
---|
| 609 | </xsl:template>
|
---|
[24018] | 610 |
|
---|
[23813] | 611 | <!-- query page ............................................................................ -->
|
---|
| 612 | <xsl:template name="indexName">
|
---|
| 613 | <xsl:value-of select="/page/pageResponse/service/displayItem[@name='name']"/>
|
---|
| 614 | </xsl:template>
|
---|
| 615 | <xsl:template name="queryPageCollectionName">
|
---|
| 616 | <xsl:choose>
|
---|
| 617 | <xsl:when test="/page/pageResponse/collection">
|
---|
| 618 | <gslib:aboutCollectionPageTitle/>
|
---|
| 619 | </xsl:when>
|
---|
| 620 | <xsl:otherwise>Cross-Collection</xsl:otherwise>
|
---|
| 621 | </xsl:choose>
|
---|
| 622 | </xsl:template>
|
---|
[24018] | 623 |
|
---|
[23813] | 624 | <!--
|
---|
[19856] | 625 | BERRY BASKET TEMPLATES
|
---|
| 626 | These get used on many different pages to add the
|
---|
| 627 | berry basket function to the site
|
---|
| 628 | -->
|
---|
[23813] | 629 | <!-- put the drag&drop berry basket on the page -->
|
---|
| 630 | <xsl:template name="berryBasket">
|
---|
| 631 | <xsl:if test="$berryBasketOn">
|
---|
| 632 | <div id="berrybasket" class="hide">
|
---|
| 633 | <span>Berry Basket</span>
|
---|
| 634 | <span id="berryBasketExpandCollapseLinks" style="display: none;">
|
---|
| 635 | <a id="berryBasketExpandLink" href="javascript:showBasket()">Expand</a>
|
---|
| 636 | <a id="berryBasketCollapseLink" style="display: none;" href="javascript:hideBasket()">Collapse</a>
|
---|
| 637 | </span>
|
---|
| 638 | <div id="baskethandle">
|
---|
| 639 | <span>
|
---|
| 640 | <xsl:text> </xsl:text>
|
---|
| 641 | </span>
|
---|
| 642 | </div>
|
---|
| 643 | <div id="berries">
|
---|
| 644 | <span>
|
---|
| 645 | <xsl:text> </xsl:text>
|
---|
| 646 | </span>
|
---|
| 647 | </div>
|
---|
| 648 | </div>
|
---|
| 649 | </xsl:if>
|
---|
| 650 | </xsl:template>
|
---|
[24018] | 651 |
|
---|
[25071] | 652 | <!-- put the drag&drop document basket on the page -->
|
---|
| 653 | <xsl:template name="documentBasket">
|
---|
[28229] | 654 | <xsl:if test="$documentBasketOn and /page/pageRequest/userInformation and /page/pageRequest/userInformation/@editEnabled = 'true' and (util:contains(/page/pageRequest/userInformation/@groups, 'administrator') or util:contains(/page/pageRequest/userInformation/@groups, 'all-collections-editor') or util:contains(/page/pageRequest/userInformation/@groups, $thisCollectionEditor))">
|
---|
[25071] | 655 | <div id="documentbasket" class="hide">
|
---|
| 656 | <span>Document Basket</span>
|
---|
| 657 | <span id="documentBasketExpandCollapseLinks" style="display: none;">
|
---|
| 658 | <a id="documentBasketExpandLink" href="javascript:showDocumentBox()">Expand</a>
|
---|
| 659 | <a id="documentBasketCollapseLink" style="display: none;" href="javascript:hideDocumentBox()">Collapse</a>
|
---|
| 660 | </span>
|
---|
| 661 | <div id="documenthandle">
|
---|
| 662 | <span>
|
---|
| 663 | <xsl:text> </xsl:text>
|
---|
| 664 | </span>
|
---|
| 665 | </div>
|
---|
| 666 | <div id="documentpages">
|
---|
| 667 | <span>
|
---|
| 668 | <xsl:text> </xsl:text>
|
---|
| 669 | </span>
|
---|
| 670 | </div>
|
---|
| 671 | <div>
|
---|
| 672 | <a href="javascript:clearBasket();">Clear basket</a>
|
---|
| 673 | </div>
|
---|
| 674 | </div>
|
---|
| 675 | </xsl:if>
|
---|
| 676 | </xsl:template>
|
---|
[24510] | 677 |
|
---|
[23813] | 678 | <!-- include the required javascript and css for berry baskets -->
|
---|
| 679 | <xsl:template name="berryBasketHeadTags">
|
---|
[24018] | 680 | <script type="text/javascript" src="interfaces/{$interface_name}/js/yui/yahoo-min.js"><xsl:text> </xsl:text></script>
|
---|
| 681 | <script type="text/javascript" src="interfaces/{$interface_name}/js/yui/event-min.js"><xsl:text> </xsl:text></script>
|
---|
| 682 | <script type="text/javascript" src="interfaces/{$interface_name}/js/yui/connection-min.js"><xsl:text> </xsl:text></script>
|
---|
| 683 | <script type="text/javascript" src="interfaces/{$interface_name}/js/yui/dom-min.js"><xsl:text> </xsl:text></script>
|
---|
| 684 | <script type="text/javascript" src="interfaces/{$interface_name}/js/yui/dragdrop-min.js"><xsl:text> </xsl:text></script>
|
---|
| 685 | <script type="text/javascript" src="interfaces/{$interface_name}/js/yui/cookie-min.js"><xsl:text> </xsl:text></script>
|
---|
[25003] | 686 | <script type="text/javascript" src="interfaces/{$interface_name}/js/yui/animation-min.js"><xsl:text> </xsl:text></script>
|
---|
| 687 |
|
---|
[24018] | 688 | <script type="text/javascript" src="interfaces/{$interface_name}/js/berrybasket/ygDDPlayer.js"><xsl:text> </xsl:text></script>
|
---|
| 689 | <script type="text/javascript" src="interfaces/{$interface_name}/js/berrybasket/ygDDOnTop.js"><xsl:text> </xsl:text></script>
|
---|
| 690 | <script type="text/javascript" src="interfaces/{$interface_name}/js/berrybasket/berrybasket.js"><xsl:text> </xsl:text></script>
|
---|
[23813] | 691 | <link rel="stylesheet" href="interfaces/{$interface_name}/style/berry.css" type="text/css"/>
|
---|
[24510] | 692 |
|
---|
| 693 | <!-- Combo-handled YUI CSS files: -->
|
---|
| 694 | <link rel="stylesheet" type="text/css" href="interfaces/{$interface_name}/style/skin.css"/>
|
---|
| 695 |
|
---|
| 696 | <script type="text/javascript" src="interfaces/{$interface_name}/js/documentbasket/documentbasket.js"><xsl:text> </xsl:text></script>
|
---|
| 697 | <script type="text/javascript" src="interfaces/{$interface_name}/js/documentbasket/documentBasketDragDrop.js"><xsl:text> </xsl:text></script>
|
---|
| 698 | <!-- Combo-handled YUI JS files: -->
|
---|
| 699 | <script type="text/javascript" src="interfaces/{$interface_name}/js/documentbasket/yahoo-dom-event.js"><xsl:text> </xsl:text></script>
|
---|
| 700 | <script type="text/javascript" src="interfaces/{$interface_name}/js/documentbasket/container_core-min.js"><xsl:text> </xsl:text></script>
|
---|
| 701 | <script type="text/javascript" src="interfaces/{$interface_name}/js/documentbasket/element-min.js"><xsl:text> </xsl:text></script>
|
---|
| 702 | <script type="text/javascript" src="interfaces/{$interface_name}/js/documentbasket/menu-min.js"><xsl:text> </xsl:text></script>
|
---|
| 703 | <script type="text/javascript" src="interfaces/{$interface_name}/js/documentbasket/button-min.js"><xsl:text> </xsl:text></script>
|
---|
| 704 | <script type="text/javascript" src="interfaces/{$interface_name}/js/documentbasket/editor-min.js"><xsl:text> </xsl:text></script>
|
---|
| 705 | <script type="text/javascript" src="interfaces/{$interface_name}/js/documentbasket/yuiloader-min.js"><xsl:text> </xsl:text></script>
|
---|
| 706 | <!--<script type="text/javascript" src="interfaces/{$interface_name}/js/documentbasket/editor-dialog.js"><xsl:text> </xsl:text></script>-->
|
---|
| 707 |
|
---|
| 708 | <link rel="stylesheet" href="interfaces/{$interface_name}/style/documentbasket.css" type="text/css"/>
|
---|
[23813] | 709 | </xsl:template>
|
---|
[24018] | 710 |
|
---|
[23813] | 711 | <!--
|
---|
[19856] | 712 | create a little berry which can be drag&dropped onto the berry basket
|
---|
| 713 | used on classifier and search result pages
|
---|
| 714 | -->
|
---|
[23813] | 715 | <xsl:template name="documentBerryForClassifierOrSearchPage">
|
---|
| 716 | <xsl:if test="$berryBasketOn">
|
---|
| 717 | <img class="pick" src="interfaces/{$interface_name}/images/berry.png" alt="in basket" width="15" height="15" border="0">
|
---|
| 718 | <xsl:attribute name="id"><xsl:value-of select="/page/pageResponse/collection/@name"/>:<xsl:value-of select="@nodeID"/></xsl:attribute>
|
---|
| 719 | </img>
|
---|
| 720 | </xsl:if>
|
---|
| 721 | </xsl:template>
|
---|
[24018] | 722 |
|
---|
[23813] | 723 | <!--
|
---|
[19856] | 724 | create little berrys which can be drag&dropped onto the berry basket
|
---|
| 725 | used on the document page
|
---|
| 726 | -->
|
---|
[23813] | 727 | <xsl:template name="documentBerryForDocumentPage">
|
---|
| 728 | <xsl:variable name="selectedNode">
|
---|
| 729 | <xsl:value-of select="/page/pageResponse/document/@selectedNode"/>
|
---|
| 730 | </xsl:variable>
|
---|
| 731 | <xsl:variable name="rootNode">
|
---|
| 732 | <xsl:value-of select="/page/pageResponse/document/documentNode[@nodeType='root']/@nodeID"/>
|
---|
| 733 | </xsl:variable>
|
---|
| 734 | <xsl:if test="$berryBasketOn">
|
---|
| 735 | <div id="documentberries">
|
---|
| 736 | <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"/>
|
---|
| 737 | <span id="{/page/pageResponse/collection/@name}:{$rootNode}:root" class="documentberry">the whole document</span>
|
---|
[23989] | 738 | <!--<xsl:if test="$selectedNode != $rootNode">
|
---|
[23813] | 739 | <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"/>
|
---|
| 740 | <span id="{/page/pageResponse/collection/@name}:{$selectedNode}:section" class="documentberry">the current section</span>
|
---|
[23989] | 741 | </xsl:if>-->
|
---|
[23813] | 742 | </div>
|
---|
| 743 | </xsl:if>
|
---|
| 744 | </xsl:template>
|
---|
[24018] | 745 |
|
---|
[23813] | 746 | <!-- document page -->
|
---|
| 747 | <xsl:template name="documentTitle">
|
---|
| 748 | <xsl:value-of select="/page/pageResponse/document/documentNode/metadataList/metadata[@name='Title']"/>
|
---|
| 749 | </xsl:template>
|
---|
| 750 | <xsl:template name="coverImage">
|
---|
| 751 | <img>
|
---|
[23989] | 752 | <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] | 753 | </img>
|
---|
| 754 | </xsl:template>
|
---|
[24018] | 755 |
|
---|
[23813] | 756 | <xsl:template name="previousNextButtons">
|
---|
| 757 | <!-- prev -->
|
---|
| 758 | <a>
|
---|
[25920] | 759 | <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>
|
---|
[23813] | 760 | <img class="lessarrow" src="interfaces/{$interface_name}/images/previous.png"/>
|
---|
| 761 | </a>
|
---|
| 762 | <!-- next -->
|
---|
| 763 | <a>
|
---|
[25920] | 764 | <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>
|
---|
[23813] | 765 | <img class="morearrow" src="interfaces/{$interface_name}/images/next.png"/>
|
---|
| 766 | </a>
|
---|
| 767 | </xsl:template>
|
---|
[25347] | 768 |
|
---|
[25398] | 769 |
|
---|
[25417] | 770 | <!-- This next template expands gslib:langfrag (used by document.xsl and documentbasket.xsl).
|
---|
[25398] | 771 | When debugging with o=skinandlibdoc, it's seen that <gslib:langfrag name='dse' /> gets expanded to:
|
---|
| 772 | <xsl:call-template name="langfrag">
|
---|
| 773 | <xsl:with-param name="name">dse</xsl:with-param>
|
---|
| 774 | </xsl:call-template>
|
---|
| 775 | Before the param can be used in this template, need to retrieve it by name with <xsl:param/>
|
---|
| 776 | as explained in http://www.maconstateit.net/tutorials/XML/XML05/xml05-05.aspx
|
---|
| 777 | -->
|
---|
[25347] | 778 | <xsl:template name="langfrag">
|
---|
[25398] | 779 | <xsl:param name="name"/>
|
---|
| 780 | <script type="text/javascript">
|
---|
| 781 | <xsl:value-of disable-output-escaping="yes" select="util:getInterfaceStringsAsJavascript($interface_name, /page/@lang, $name)"/>
|
---|
[25347] | 782 | </script>
|
---|
| 783 | </xsl:template>
|
---|
| 784 |
|
---|
[26023] | 785 |
|
---|
| 786 | <!-- builds up links to available document types equivalent to the default source
|
---|
| 787 | document with as anchor the equivalent documents' doctype icons. -->
|
---|
| 788 | <xsl:template name="equivDocLinks">
|
---|
| 789 | <xsl:param name="count"/>
|
---|
| 790 |
|
---|
| 791 | <xsl:variable name="docicon" select="metadataList/metadata[contains(@name, 'equivDocIcon')]"/>
|
---|
| 792 | <xsl:variable name="docEndlink" select="metadataList/metadata[contains(@name, '/equivDocLink')]"/>
|
---|
| 793 |
|
---|
| 794 | <!--<xsl:variable name="docStartlink" select="metadataList/metadata[contains(@name, 'all_*,*_equivDocLink')]"/>-->
|
---|
| 795 | <!-- In the following variable statement, we're trying to set the docStartlink to any metadata whose value
|
---|
| 796 | ends on equivDocLink but NOT /equivDocLink. Unfortunately, the xslt function fn:ends-with only exists from
|
---|
| 797 | xslt 2.0 onwards. So need to use substring() and string-lenth() functions now to check whether the 13th char
|
---|
| 798 | from the end is a slash or not, in order to distinguish between the start of a doclink and end of one.
|
---|
| 799 | If this 13th char from the end is not a slash, then we found (the string we want to store in) docStartlink. -->
|
---|
| 800 | <xsl:variable name="docStartlink">
|
---|
| 801 | <xsl:for-each select="metadataList/metadata">
|
---|
| 802 | <xsl:if test="contains(@name, 'equivDocLink')">
|
---|
| 803 | <xsl:variable name="tmpvar" select="substring(@name, string-length(@name)-12, 1)"/>
|
---|
| 804 | <xsl:if test="not($tmpvar='/')">
|
---|
| 805 | <xsl:value-of select="self::node()[@name]"/>
|
---|
| 806 | </xsl:if>
|
---|
| 807 | </xsl:if>
|
---|
| 808 | </xsl:for-each>
|
---|
| 809 | </xsl:variable>
|
---|
| 810 |
|
---|
| 811 | <xsl:variable name="equivDocIcon" select="java:org.greenstone.gsdl3.util.XSLTUtil.getNumberedItem($docicon, $count)" />
|
---|
| 812 | <xsl:variable name="equivStartlink" select="java:org.greenstone.gsdl3.util.XSLTUtil.getNumberedItem($docStartlink, $count)" />
|
---|
| 813 | <xsl:variable name="equivEndlink" select="java:org.greenstone.gsdl3.util.XSLTUtil.getNumberedItem($docEndlink, $count)" />
|
---|
| 814 |
|
---|
| 815 | <xsl:if test="$equivDocIcon != ''">
|
---|
| 816 | <xsl:value-of disable-output-escaping="yes" select="$equivStartlink"/>
|
---|
| 817 | <xsl:value-of disable-output-escaping="yes" select="$equivDocIcon"/>
|
---|
| 818 | <xsl:value-of disable-output-escaping="yes" select="$equivEndlink"/>
|
---|
| 819 |
|
---|
| 820 | <!-- recursively call this template to get multiple entries -->
|
---|
| 821 | <xsl:call-template name="equivDocLinks">
|
---|
| 822 | <xsl:with-param name="count"><xsl:value-of select="$count + 1"/></xsl:with-param>
|
---|
| 823 | </xsl:call-template>
|
---|
| 824 | </xsl:if>
|
---|
| 825 |
|
---|
| 826 | </xsl:template>
|
---|
| 827 |
|
---|
[18617] | 828 | </xsl:stylesheet>
|
---|