[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">
|
---|
[30688] | 252 | <xsl:choose><xsl:when test="displayItem[@name='name']"><xsl:value-of select="displayItem[@name='name']"/></xsl:when>
|
---|
| 253 | <xsl:otherwise>
|
---|
| 254 | <xsl:value-of select="@name"/>
|
---|
| 255 | </xsl:otherwise>
|
---|
| 256 | </xsl:choose>
|
---|
| 257 |
|
---|
[28051] | 258 | </div>
|
---|
| 259 | <div style="height:15px;" class="ui-state-default ui-corner-bottom"><xsl:text> </xsl:text></div>
|
---|
[23813] | 260 | </div>
|
---|
| 261 | </a>
|
---|
| 262 | </xsl:otherwise>
|
---|
| 263 | </xsl:choose>
|
---|
[19988] | 264 | </xsl:template>
|
---|
[24018] | 265 |
|
---|
[23813] | 266 | <xsl:template name="serviceClusterList">
|
---|
| 267 | <xsl:apply-templates select="serviceClusterList"/>
|
---|
[19988] | 268 | </xsl:template>
|
---|
[24018] | 269 |
|
---|
[23813] | 270 | <xsl:template match="serviceClusterList">
|
---|
| 271 | <xsl:for-each select="serviceCluster">
|
---|
| 272 | <a href="{$library_name}?a=p&sa=about&c={@name}">
|
---|
| 273 | <xsl:value-of select="@name"/>
|
---|
| 274 | <xsl:value-of select="displayItem[@name='name']"/>
|
---|
| 275 | </a>
|
---|
| 276 | </xsl:for-each>
|
---|
| 277 | </xsl:template>
|
---|
[24018] | 278 |
|
---|
[23813] | 279 | <xsl:template name="serviceLink">
|
---|
| 280 | <div class="paramLabel">
|
---|
| 281 | <a href="{$library_name}?a=q&rt=d&s={@name}">
|
---|
| 282 | <xsl:value-of select="displayItem[@name='name']"/>
|
---|
| 283 | </a>
|
---|
| 284 | </div>
|
---|
| 285 | <div class="paramValue">
|
---|
| 286 | <xsl:value-of select="displayItem[@name='description']"/>
|
---|
| 287 | </div>
|
---|
| 288 | <br class="clear"/>
|
---|
| 289 | </xsl:template>
|
---|
[24018] | 290 |
|
---|
[23813] | 291 | <xsl:template name="authenticationLink">
|
---|
[24149] | 292 | <xsl:for-each select="//serviceList/service[@type='authen']">
|
---|
| 293 | <div class="paramLabel">
|
---|
[25280] | 294 | <a href="{$library_name}/admin/ListUsers">
|
---|
[24149] | 295 | <xsl:value-of select="displayItem[@name='name']"/>
|
---|
| 296 | </a>
|
---|
| 297 | </div>
|
---|
| 298 | <div class="paramValue">
|
---|
| 299 | <xsl:value-of select="displayItem[@name='description']"/>
|
---|
| 300 | </div>
|
---|
[23813] | 301 | </xsl:for-each>
|
---|
| 302 | </xsl:template>
|
---|
[25280] | 303 |
|
---|
| 304 | <xsl:template name="registerLink">
|
---|
| 305 | <xsl:for-each select="//serviceList/service[@type='authen']">
|
---|
| 306 | <div class="paramLabel">
|
---|
| 307 | <a href="{$library_name}/admin/Register">
|
---|
| 308 | <xsl:text>Register</xsl:text>
|
---|
| 309 | </a>
|
---|
| 310 | </div>
|
---|
| 311 | <div class="paramValue">
|
---|
| 312 | <xsl:text>Register as a new user</xsl:text>
|
---|
| 313 | </div>
|
---|
| 314 | </xsl:for-each>
|
---|
| 315 | </xsl:template>
|
---|
| 316 |
|
---|
[23813] | 317 | <xsl:template name="libraryInterfaceLink">
|
---|
| 318 | <li>
|
---|
| 319 | <a href="{$library_name}?a=p&sa=gli4gs3">
|
---|
| 320 | <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'home.librarian_interface')"/>
|
---|
| 321 | </a>
|
---|
| 322 | </li>
|
---|
| 323 | </xsl:template>
|
---|
[24018] | 324 |
|
---|
[23813] | 325 | <xsl:template name="greenstoneLogoAlternateText">
|
---|
| 326 | <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'gsdl')"/>
|
---|
| 327 | </xsl:template>
|
---|
[24018] | 328 |
|
---|
[23813] | 329 | <!-- about page - collection home ....................................................................... -->
|
---|
| 330 | <xsl:variable name="collName" select="/page/pageRequest/paramList/param[@name='c']/@value"/>
|
---|
[25835] | 331 | <xsl:variable name="httpPath" select="/page/pageResponse/collection/metadataList/metadata[@name='httpPath']"/>
|
---|
[25934] | 332 | <xsl:variable name="siteName" select="$site_name"/>
|
---|
[30478] | 333 | <!--
|
---|
| 334 | Already defined above as a variable, not sure why if way being defined here again as a 'param'
|
---|
| 335 | <xsl:param name="collName" select="/page/pageRequest/paramList/param[@name='c']/@value"/>
|
---|
| 336 | -->
|
---|
[23813] | 337 | <xsl:param name="pageType"/>
|
---|
| 338 | <xsl:variable name="this-element" select="/page/pageResponse/collection|/page/pageResponse/serviceCluster"/>
|
---|
[25920] | 339 | <xsl:variable name="this-service" select="/page/pageRequest/paramList/param[@name = 's']/@value"/>
|
---|
[26501] | 340 |
|
---|
| 341 | <!--
|
---|
| 342 | _httpimages_ {_httpweb_/images}
|
---|
| 343 | _httpscript_ {_httpweb_/script}
|
---|
| 344 | _httpstyle_ {_httpweb_/style}
|
---|
| 345 | _httpflash_ {_httpweb_/flash}
|
---|
| 346 | _httpjava_ {_httpweb_/java}
|
---|
| 347 | -->
|
---|
| 348 |
|
---|
| 349 |
|
---|
| 350 | <xsl:template name="define-js-variable">
|
---|
| 351 | <xsl:param name="name"/>
|
---|
| 352 | <xsl:param name="value"/>
|
---|
| 353 | <script type="text/javascript">
|
---|
| 354 | gs.variables[<xslt:text disable-output-escaping="yes">"</xslt:text><xsl:value-of select="$name"/><xslt:text disable-output-escaping="yes">"</xslt:text>]
|
---|
| 355 | <xslt:text disable-output-escaping="yes"> = "</xslt:text>
|
---|
| 356 | <xsl:value-of select="$value"/>
|
---|
| 357 | <xslt:text disable-output-escaping="yes">";</xslt:text>
|
---|
| 358 | </script>
|
---|
| 359 | </xsl:template>
|
---|
| 360 |
|
---|
| 361 | <xsl:variable name="_httpcollection_" select="$httpPath"/>
|
---|
| 362 | <xsl:variable name="_httpbrowse_"><xsl:value-of select="$library_name"/>/collection/<xsl:value-of select="$collName"/>/browse</xsl:variable>
|
---|
| 363 | <xsl:variable name="_httpquery_"><xsl:value-of select="$library_name"/>/collection/<xsl:value-of select="$collName"/>/search</xsl:variable>
|
---|
| 364 |
|
---|
| 365 | <xsl:template name="define-js-macro-variables">
|
---|
| 366 |
|
---|
| 367 | <xsl:call-template name="define-js-variable">
|
---|
| 368 | <xsl:with-param name="name" select="'_httpbrowse_'"/>
|
---|
| 369 | <xsl:with-param name="value" select="$_httpbrowse_"/>
|
---|
| 370 | </xsl:call-template>
|
---|
| 371 |
|
---|
| 372 | <xsl:call-template name="define-js-variable">
|
---|
| 373 | <xsl:with-param name="name" select="'_httpquery_'"/>
|
---|
| 374 | <xsl:with-param name="value" select="$_httpquery_"/>
|
---|
| 375 | </xsl:call-template>
|
---|
| 376 |
|
---|
| 377 | </xsl:template>
|
---|
| 378 |
|
---|
| 379 |
|
---|
[23813] | 380 | <xsl:template name="aboutCollectionPageTitle">
|
---|
| 381 | <!-- put a space in the title in case the actual value is missing - mozilla will not display a page with no title-->
|
---|
| 382 | <xsl:value-of select="/page/pageResponse/collection/displayItem[@name='name']"/>
|
---|
| 383 | <xsl:text> </xsl:text>
|
---|
| 384 | </xsl:template>
|
---|
[24018] | 385 |
|
---|
[23813] | 386 | <xsl:template name="collectionHomeLinkWithLogoIfAvailable">
|
---|
| 387 | <a href="{$library_name}?a=p&sa=about&c={$collName}">
|
---|
| 388 | <xsl:choose>
|
---|
| 389 | <xsl:when test="$this-element/displayItem[@name='icon']">
|
---|
| 390 | <img border="0">
|
---|
| 391 | <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>
|
---|
| 392 | <xsl:attribute name="alt">
|
---|
| 393 | <xsl:value-of select="$this-element/displayItem[@name='name']"/>
|
---|
| 394 | </xsl:attribute>
|
---|
| 395 | <xsl:attribute name="title">
|
---|
| 396 | <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'aboutpage')"/>
|
---|
| 397 | </xsl:attribute>
|
---|
| 398 | </img>
|
---|
| 399 | </xsl:when>
|
---|
| 400 | <xsl:otherwise>
|
---|
| 401 | <xsl:value-of select="$this-element/displayItem[@name='name']"/>
|
---|
| 402 | </xsl:otherwise>
|
---|
| 403 | </xsl:choose>
|
---|
| 404 | </a>
|
---|
| 405 | </xsl:template>
|
---|
[24018] | 406 |
|
---|
[23813] | 407 | <xsl:template name="homeButtonTop">
|
---|
| 408 | <a href="{$library_name}?a=p&sa=home">
|
---|
| 409 | <xsl:attribute name="title">
|
---|
| 410 | <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'home_tip')"/>
|
---|
| 411 | </xsl:attribute>
|
---|
| 412 | <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'home_b')"/>
|
---|
| 413 | </a>
|
---|
| 414 | </xsl:template>
|
---|
[24018] | 415 |
|
---|
[23813] | 416 | <xsl:template name="helpButtonTop">
|
---|
[19856] | 417 | <xsl:choose>
|
---|
| 418 | <xsl:when test="$pageType='help'">
|
---|
[23813] | 419 | <li>
|
---|
| 420 | <a>
|
---|
| 421 | <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'help_b')"/>
|
---|
| 422 | </a>
|
---|
| 423 | </li>
|
---|
[19856] | 424 | </xsl:when>
|
---|
| 425 | <xsl:otherwise>
|
---|
[23813] | 426 | <li>
|
---|
| 427 | <a href="{$library_name}?a=p&sa=help&c={$collName}">
|
---|
| 428 | <xsl:attribute name="title">
|
---|
| 429 | <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'help_tip')"/>
|
---|
| 430 | </xsl:attribute>
|
---|
| 431 | <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'help_b')"/>
|
---|
| 432 | </a>
|
---|
| 433 | </li>
|
---|
[19856] | 434 | </xsl:otherwise>
|
---|
| 435 | </xsl:choose>
|
---|
[23813] | 436 | </xsl:template>
|
---|
[24018] | 437 |
|
---|
[23813] | 438 | <xsl:template name="preferencesButtonTop">
|
---|
| 439 | <xsl:choose>
|
---|
| 440 | <xsl:when test="$pageType='pref'">
|
---|
| 441 | <li>
|
---|
| 442 | <a>
|
---|
| 443 | <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'pref_b')"/>
|
---|
| 444 | </a>
|
---|
| 445 | </li>
|
---|
| 446 | </xsl:when>
|
---|
| 447 | <xsl:otherwise>
|
---|
| 448 | <li>
|
---|
| 449 | <a href="{$library_name}?a=p&sa=pref&c={$collName}">
|
---|
| 450 | <xsl:attribute name="title">
|
---|
| 451 | <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'pref_tip')"/>
|
---|
| 452 | </xsl:attribute>
|
---|
| 453 | <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'pref_b')"/>
|
---|
| 454 | </a>
|
---|
| 455 | </li>
|
---|
| 456 | </xsl:otherwise>
|
---|
| 457 | </xsl:choose>
|
---|
| 458 | </xsl:template>
|
---|
[24018] | 459 |
|
---|
[23813] | 460 | <xsl:template name="servicesNavigationBar">
|
---|
| 461 | <xsl:for-each select="$this-element/serviceList/service">
|
---|
| 462 | <xsl:variable name="action">
|
---|
| 463 | <xsl:choose>
|
---|
| 464 | <xsl:when test="@name=$this-service">CURRENT</xsl:when>
|
---|
| 465 | <xsl:when test="@type='query'">q</xsl:when>
|
---|
| 466 | <xsl:when test="@type='browse'">b</xsl:when>
|
---|
| 467 | <xsl:when test="@type='process'">pr</xsl:when>
|
---|
| 468 | <xsl:when test="@type='applet'">a</xsl:when>
|
---|
| 469 | <xsl:otherwise>DO_NOT_DISPLAY</xsl:otherwise>
|
---|
| 470 | </xsl:choose>
|
---|
| 471 | </xsl:variable>
|
---|
| 472 | <xsl:choose>
|
---|
| 473 | <xsl:when test="$action='CURRENT'">
|
---|
| 474 | <li>
|
---|
| 475 | <a>
|
---|
| 476 | <xsl:value-of select="displayItem[@name='name']"/>
|
---|
| 477 | </a>
|
---|
| 478 | </li>
|
---|
| 479 | </xsl:when>
|
---|
| 480 | <xsl:when test="$action !='DO_NOT_DISPLAY'">
|
---|
| 481 | <li>
|
---|
| 482 | <a href="{$library_name}?a={$action}&rt=d&s={@name}&c={$collName}">
|
---|
| 483 | <xsl:if test="displayItem[@name='description']">
|
---|
| 484 | <xsl:attribute name="title">
|
---|
| 485 | <xsl:value-of select="displayItem[@name='description']"/>
|
---|
| 486 | </xsl:attribute>
|
---|
| 487 | </xsl:if>
|
---|
| 488 | <xsl:value-of select="displayItem[@name='name']"/>
|
---|
| 489 | </a>
|
---|
| 490 | </li>
|
---|
| 491 | </xsl:when>
|
---|
| 492 | </xsl:choose>
|
---|
| 493 | </xsl:for-each>
|
---|
| 494 | </xsl:template>
|
---|
[24018] | 495 |
|
---|
[23813] | 496 | <xsl:template name="collectionDescriptionTextAndServicesLinks">
|
---|
| 497 | <xsl:apply-templates select="pageResponse/collection|serviceCluster"/>
|
---|
| 498 | </xsl:template>
|
---|
| 499 | <xsl:template match="collection|serviceCluster">
|
---|
| 500 | <xsl:value-of select="displayItem[@name='description']" disable-output-escaping="yes"/>
|
---|
[28625] | 501 | <!-- Uncomment this section if you want the collection service links and their descriptions to appear -->
|
---|
| 502 | <!--<xsl:apply-templates select="serviceList">
|
---|
[23813] | 503 | <xsl:with-param name="collName" select="$collName"/>
|
---|
[28625] | 504 | </xsl:apply-templates>-->
|
---|
[23813] | 505 | </xsl:template>
|
---|
[24018] | 506 |
|
---|
[23813] | 507 | <xsl:template match="serviceList">
|
---|
| 508 | <xsl:param name="collName"/>
|
---|
| 509 | <h3>
|
---|
| 510 | <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'about.services')"/>
|
---|
| 511 | </h3>
|
---|
| 512 | <p>
|
---|
| 513 | <xsl:choose>
|
---|
| 514 | <xsl:when test="service">
|
---|
| 515 | <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'about.servicehelp')"/>
|
---|
[19988] | 516 | </xsl:when>
|
---|
| 517 | <xsl:otherwise>
|
---|
[23813] | 518 | <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'about.noservices')"/>
|
---|
[19988] | 519 | </xsl:otherwise>
|
---|
[23813] | 520 | </xsl:choose>
|
---|
[19988] | 521 | </p>
|
---|
| 522 | <xsl:if test="service">
|
---|
[23813] | 523 | <div id="servicelist">
|
---|
| 524 | <xsl:for-each select="service">
|
---|
| 525 | <xsl:sort select="position()" order="descending" data-type="number"/>
|
---|
| 526 | <xsl:variable name="action">
|
---|
[20465] | 527 | <xsl:choose>
|
---|
[23813] | 528 | <xsl:when test="@type='query'">q</xsl:when>
|
---|
| 529 | <xsl:when test="@type='process'">pr</xsl:when>
|
---|
| 530 | <xsl:when test="@type='applet'">a</xsl:when>
|
---|
| 531 | <xsl:otherwise>DO_NOT_DISPLAY</xsl:otherwise>
|
---|
[20465] | 532 | </xsl:choose>
|
---|
[23813] | 533 | </xsl:variable>
|
---|
| 534 | <xsl:if test="$action != 'DO_NOT_DISPLAY'">
|
---|
| 535 | <div class="paramLabel">
|
---|
| 536 | <a href="{$library_name}?a={$action}&rt=d&s={@name}&c={$collName}">
|
---|
| 537 | <xsl:value-of select="displayItem[@name='name']"/>
|
---|
| 538 | </a>
|
---|
| 539 | </div>
|
---|
| 540 | <div class="paramLabel">
|
---|
| 541 | <xsl:value-of select="displayItem[@name='description']"/>
|
---|
| 542 | </div>
|
---|
| 543 | <br class="clear"/>
|
---|
| 544 | </xsl:if>
|
---|
| 545 | </xsl:for-each>
|
---|
| 546 | </div>
|
---|
| 547 | </xsl:if>
|
---|
[28625] | 548 |
|
---|
[23813] | 549 | </xsl:template>
|
---|
[24018] | 550 |
|
---|
[23813] | 551 | <!-- classifier page ............................................................................ -->
|
---|
| 552 | <xsl:template name="collapsedNavigationTab">
|
---|
| 553 | <xsl:param name="type"/>
|
---|
| 554 | <xsl:variable name="isCurrent" select="/page/pageResponse/service[@type=$type]"/>
|
---|
| 555 | <li>
|
---|
| 556 | <xsl:if test="$isCurrent">
|
---|
| 557 | <xsl:attribute name="class">current</xsl:attribute>
|
---|
| 558 | </xsl:if>
|
---|
| 559 | <a>
|
---|
| 560 | <xsl:if test="service[@name=$type]/displayItem[@name='description']">
|
---|
| 561 | <xsl:attribute name="title">
|
---|
| 562 | <xsl:value-of select="service[@name=$type]/displayItem[@name='description']"/>
|
---|
| 563 | </xsl:attribute>
|
---|
| 564 | </xsl:if>
|
---|
| 565 | <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>
|
---|
| 566 | <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, $type)"/>
|
---|
| 567 | </a>
|
---|
| 568 | </li>
|
---|
| 569 | </xsl:template>
|
---|
[24018] | 570 |
|
---|
[23813] | 571 | <xsl:template name="navigationTab">
|
---|
| 572 | <xsl:variable name="isCurrent" select="@name=/page/pageResponse/service/@name"/>
|
---|
| 573 | <xsl:variable name="action">
|
---|
| 574 | <xsl:choose>
|
---|
| 575 | <xsl:when test="@type='query'">q</xsl:when>
|
---|
| 576 | <xsl:when test="@type='browse'">b</xsl:when>
|
---|
| 577 | <xsl:when test="@type='process'">pr</xsl:when>
|
---|
| 578 | <xsl:when test="@type='applet'">a</xsl:when>
|
---|
| 579 | <xsl:otherwise>DO_NOT_DISPLAY</xsl:otherwise>
|
---|
| 580 | </xsl:choose>
|
---|
| 581 | </xsl:variable>
|
---|
| 582 | <xsl:if test="$action!='DO_NOT_DISPLAY'">
|
---|
| 583 | <li>
|
---|
| 584 | <xsl:if test="$isCurrent">
|
---|
| 585 | <xsl:attribute name="class">current</xsl:attribute>
|
---|
| 586 | </xsl:if>
|
---|
| 587 | <a>
|
---|
| 588 | <xsl:if test="displayItem[@name='description']">
|
---|
| 589 | <xsl:attribute name="title">
|
---|
| 590 | <xsl:value-of select="displayItem[@name='description']"/>
|
---|
| 591 | </xsl:attribute>
|
---|
| 592 | </xsl:if>
|
---|
| 593 | <xsl:choose>
|
---|
| 594 | <xsl:when test="classifierList/classifier/@name">
|
---|
| 595 | <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>
|
---|
| 596 | </xsl:when>
|
---|
| 597 | <xsl:otherwise>
|
---|
| 598 | <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>
|
---|
| 599 | </xsl:otherwise>
|
---|
| 600 | </xsl:choose>
|
---|
| 601 | <xsl:value-of select="displayItem[@name='name']"/>
|
---|
| 602 | </a>
|
---|
| 603 | </li>
|
---|
| 604 | </xsl:if>
|
---|
| 605 | </xsl:template>
|
---|
[24018] | 606 |
|
---|
[23813] | 607 | <xsl:template name="classifierLink">
|
---|
| 608 | <xsl:if test="@name=/page/pageResponse/classifier/@name">
|
---|
| 609 | <xsl:attribute name="class">current</xsl:attribute>
|
---|
| 610 | </xsl:if>
|
---|
| 611 | <a href="{$library_name}?a=b&rt=r&s={/page/pageResponse/service/@name}&c={/page/pageResponse/collection/@name}&cl={@name}">
|
---|
| 612 | <xsl:value-of select="displayItem[@name='description']"/>
|
---|
| 613 | </a>
|
---|
| 614 | </xsl:template>
|
---|
[24018] | 615 |
|
---|
[23813] | 616 | <!-- query page ............................................................................ -->
|
---|
| 617 | <xsl:template name="indexName">
|
---|
| 618 | <xsl:value-of select="/page/pageResponse/service/displayItem[@name='name']"/>
|
---|
| 619 | </xsl:template>
|
---|
| 620 | <xsl:template name="queryPageCollectionName">
|
---|
| 621 | <xsl:choose>
|
---|
| 622 | <xsl:when test="/page/pageResponse/collection">
|
---|
| 623 | <gslib:aboutCollectionPageTitle/>
|
---|
| 624 | </xsl:when>
|
---|
| 625 | <xsl:otherwise>Cross-Collection</xsl:otherwise>
|
---|
| 626 | </xsl:choose>
|
---|
| 627 | </xsl:template>
|
---|
[24018] | 628 |
|
---|
[23813] | 629 | <!--
|
---|
[19856] | 630 | BERRY BASKET TEMPLATES
|
---|
| 631 | These get used on many different pages to add the
|
---|
| 632 | berry basket function to the site
|
---|
| 633 | -->
|
---|
[23813] | 634 | <!-- put the drag&drop berry basket on the page -->
|
---|
| 635 | <xsl:template name="berryBasket">
|
---|
| 636 | <xsl:if test="$berryBasketOn">
|
---|
| 637 | <div id="berrybasket" class="hide">
|
---|
| 638 | <span>Berry Basket</span>
|
---|
| 639 | <span id="berryBasketExpandCollapseLinks" style="display: none;">
|
---|
| 640 | <a id="berryBasketExpandLink" href="javascript:showBasket()">Expand</a>
|
---|
| 641 | <a id="berryBasketCollapseLink" style="display: none;" href="javascript:hideBasket()">Collapse</a>
|
---|
| 642 | </span>
|
---|
| 643 | <div id="baskethandle">
|
---|
| 644 | <span>
|
---|
| 645 | <xsl:text> </xsl:text>
|
---|
| 646 | </span>
|
---|
| 647 | </div>
|
---|
| 648 | <div id="berries">
|
---|
| 649 | <span>
|
---|
| 650 | <xsl:text> </xsl:text>
|
---|
| 651 | </span>
|
---|
| 652 | </div>
|
---|
| 653 | </div>
|
---|
| 654 | </xsl:if>
|
---|
| 655 | </xsl:template>
|
---|
[24018] | 656 |
|
---|
[25071] | 657 | <!-- put the drag&drop document basket on the page -->
|
---|
| 658 | <xsl:template name="documentBasket">
|
---|
[28229] | 659 | <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] | 660 | <div id="documentbasket" class="hide">
|
---|
| 661 | <span>Document Basket</span>
|
---|
| 662 | <span id="documentBasketExpandCollapseLinks" style="display: none;">
|
---|
| 663 | <a id="documentBasketExpandLink" href="javascript:showDocumentBox()">Expand</a>
|
---|
| 664 | <a id="documentBasketCollapseLink" style="display: none;" href="javascript:hideDocumentBox()">Collapse</a>
|
---|
| 665 | </span>
|
---|
| 666 | <div id="documenthandle">
|
---|
| 667 | <span>
|
---|
| 668 | <xsl:text> </xsl:text>
|
---|
| 669 | </span>
|
---|
| 670 | </div>
|
---|
| 671 | <div id="documentpages">
|
---|
| 672 | <span>
|
---|
| 673 | <xsl:text> </xsl:text>
|
---|
| 674 | </span>
|
---|
| 675 | </div>
|
---|
| 676 | <div>
|
---|
| 677 | <a href="javascript:clearBasket();">Clear basket</a>
|
---|
| 678 | </div>
|
---|
| 679 | </div>
|
---|
| 680 | </xsl:if>
|
---|
| 681 | </xsl:template>
|
---|
[24510] | 682 |
|
---|
[23813] | 683 | <!-- include the required javascript and css for berry baskets -->
|
---|
| 684 | <xsl:template name="berryBasketHeadTags">
|
---|
[24018] | 685 | <script type="text/javascript" src="interfaces/{$interface_name}/js/yui/yahoo-min.js"><xsl:text> </xsl:text></script>
|
---|
| 686 | <script type="text/javascript" src="interfaces/{$interface_name}/js/yui/event-min.js"><xsl:text> </xsl:text></script>
|
---|
| 687 | <script type="text/javascript" src="interfaces/{$interface_name}/js/yui/connection-min.js"><xsl:text> </xsl:text></script>
|
---|
| 688 | <script type="text/javascript" src="interfaces/{$interface_name}/js/yui/dom-min.js"><xsl:text> </xsl:text></script>
|
---|
| 689 | <script type="text/javascript" src="interfaces/{$interface_name}/js/yui/dragdrop-min.js"><xsl:text> </xsl:text></script>
|
---|
| 690 | <script type="text/javascript" src="interfaces/{$interface_name}/js/yui/cookie-min.js"><xsl:text> </xsl:text></script>
|
---|
[25003] | 691 | <script type="text/javascript" src="interfaces/{$interface_name}/js/yui/animation-min.js"><xsl:text> </xsl:text></script>
|
---|
| 692 |
|
---|
[24018] | 693 | <script type="text/javascript" src="interfaces/{$interface_name}/js/berrybasket/ygDDPlayer.js"><xsl:text> </xsl:text></script>
|
---|
| 694 | <script type="text/javascript" src="interfaces/{$interface_name}/js/berrybasket/ygDDOnTop.js"><xsl:text> </xsl:text></script>
|
---|
| 695 | <script type="text/javascript" src="interfaces/{$interface_name}/js/berrybasket/berrybasket.js"><xsl:text> </xsl:text></script>
|
---|
[23813] | 696 | <link rel="stylesheet" href="interfaces/{$interface_name}/style/berry.css" type="text/css"/>
|
---|
[24510] | 697 |
|
---|
| 698 | <!-- Combo-handled YUI CSS files: -->
|
---|
| 699 | <link rel="stylesheet" type="text/css" href="interfaces/{$interface_name}/style/skin.css"/>
|
---|
| 700 |
|
---|
| 701 | <script type="text/javascript" src="interfaces/{$interface_name}/js/documentbasket/documentbasket.js"><xsl:text> </xsl:text></script>
|
---|
| 702 | <script type="text/javascript" src="interfaces/{$interface_name}/js/documentbasket/documentBasketDragDrop.js"><xsl:text> </xsl:text></script>
|
---|
| 703 | <!-- Combo-handled YUI JS files: -->
|
---|
| 704 | <script type="text/javascript" src="interfaces/{$interface_name}/js/documentbasket/yahoo-dom-event.js"><xsl:text> </xsl:text></script>
|
---|
| 705 | <script type="text/javascript" src="interfaces/{$interface_name}/js/documentbasket/container_core-min.js"><xsl:text> </xsl:text></script>
|
---|
| 706 | <script type="text/javascript" src="interfaces/{$interface_name}/js/documentbasket/element-min.js"><xsl:text> </xsl:text></script>
|
---|
| 707 | <script type="text/javascript" src="interfaces/{$interface_name}/js/documentbasket/menu-min.js"><xsl:text> </xsl:text></script>
|
---|
| 708 | <script type="text/javascript" src="interfaces/{$interface_name}/js/documentbasket/button-min.js"><xsl:text> </xsl:text></script>
|
---|
| 709 | <script type="text/javascript" src="interfaces/{$interface_name}/js/documentbasket/editor-min.js"><xsl:text> </xsl:text></script>
|
---|
| 710 | <script type="text/javascript" src="interfaces/{$interface_name}/js/documentbasket/yuiloader-min.js"><xsl:text> </xsl:text></script>
|
---|
| 711 | <!--<script type="text/javascript" src="interfaces/{$interface_name}/js/documentbasket/editor-dialog.js"><xsl:text> </xsl:text></script>-->
|
---|
| 712 |
|
---|
| 713 | <link rel="stylesheet" href="interfaces/{$interface_name}/style/documentbasket.css" type="text/css"/>
|
---|
[23813] | 714 | </xsl:template>
|
---|
[24018] | 715 |
|
---|
[23813] | 716 | <!--
|
---|
[19856] | 717 | create a little berry which can be drag&dropped onto the berry basket
|
---|
| 718 | used on classifier and search result pages
|
---|
| 719 | -->
|
---|
[23813] | 720 | <xsl:template name="documentBerryForClassifierOrSearchPage">
|
---|
| 721 | <xsl:if test="$berryBasketOn">
|
---|
| 722 | <img class="pick" src="interfaces/{$interface_name}/images/berry.png" alt="in basket" width="15" height="15" border="0">
|
---|
| 723 | <xsl:attribute name="id"><xsl:value-of select="/page/pageResponse/collection/@name"/>:<xsl:value-of select="@nodeID"/></xsl:attribute>
|
---|
| 724 | </img>
|
---|
| 725 | </xsl:if>
|
---|
| 726 | </xsl:template>
|
---|
[24018] | 727 |
|
---|
[23813] | 728 | <!--
|
---|
[19856] | 729 | create little berrys which can be drag&dropped onto the berry basket
|
---|
| 730 | used on the document page
|
---|
| 731 | -->
|
---|
[23813] | 732 | <xsl:template name="documentBerryForDocumentPage">
|
---|
| 733 | <xsl:variable name="selectedNode">
|
---|
| 734 | <xsl:value-of select="/page/pageResponse/document/@selectedNode"/>
|
---|
| 735 | </xsl:variable>
|
---|
| 736 | <xsl:variable name="rootNode">
|
---|
| 737 | <xsl:value-of select="/page/pageResponse/document/documentNode[@nodeType='root']/@nodeID"/>
|
---|
| 738 | </xsl:variable>
|
---|
| 739 | <xsl:if test="$berryBasketOn">
|
---|
| 740 | <div id="documentberries">
|
---|
| 741 | <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"/>
|
---|
| 742 | <span id="{/page/pageResponse/collection/@name}:{$rootNode}:root" class="documentberry">the whole document</span>
|
---|
[23989] | 743 | <!--<xsl:if test="$selectedNode != $rootNode">
|
---|
[23813] | 744 | <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"/>
|
---|
| 745 | <span id="{/page/pageResponse/collection/@name}:{$selectedNode}:section" class="documentberry">the current section</span>
|
---|
[23989] | 746 | </xsl:if>-->
|
---|
[23813] | 747 | </div>
|
---|
| 748 | </xsl:if>
|
---|
| 749 | </xsl:template>
|
---|
[24018] | 750 |
|
---|
[23813] | 751 | <!-- document page -->
|
---|
| 752 | <xsl:template name="documentTitle">
|
---|
| 753 | <xsl:value-of select="/page/pageResponse/document/documentNode/metadataList/metadata[@name='Title']"/>
|
---|
| 754 | </xsl:template>
|
---|
| 755 | <xsl:template name="coverImage">
|
---|
| 756 | <img>
|
---|
[23989] | 757 | <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] | 758 | </img>
|
---|
| 759 | </xsl:template>
|
---|
[24018] | 760 |
|
---|
[23813] | 761 | <xsl:template name="previousNextButtons">
|
---|
| 762 | <!-- prev -->
|
---|
| 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"/>.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] | 765 | <img class="lessarrow" src="interfaces/{$interface_name}/images/previous.png"/>
|
---|
| 766 | </a>
|
---|
| 767 | <!-- next -->
|
---|
| 768 | <a>
|
---|
[25920] | 769 | <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] | 770 | <img class="morearrow" src="interfaces/{$interface_name}/images/next.png"/>
|
---|
| 771 | </a>
|
---|
| 772 | </xsl:template>
|
---|
[25347] | 773 |
|
---|
[25398] | 774 |
|
---|
[25417] | 775 | <!-- This next template expands gslib:langfrag (used by document.xsl and documentbasket.xsl).
|
---|
[25398] | 776 | When debugging with o=skinandlibdoc, it's seen that <gslib:langfrag name='dse' /> gets expanded to:
|
---|
| 777 | <xsl:call-template name="langfrag">
|
---|
| 778 | <xsl:with-param name="name">dse</xsl:with-param>
|
---|
| 779 | </xsl:call-template>
|
---|
| 780 | Before the param can be used in this template, need to retrieve it by name with <xsl:param/>
|
---|
| 781 | as explained in http://www.maconstateit.net/tutorials/XML/XML05/xml05-05.aspx
|
---|
| 782 | -->
|
---|
[25347] | 783 | <xsl:template name="langfrag">
|
---|
[25398] | 784 | <xsl:param name="name"/>
|
---|
| 785 | <script type="text/javascript">
|
---|
| 786 | <xsl:value-of disable-output-escaping="yes" select="util:getInterfaceStringsAsJavascript($interface_name, /page/@lang, $name)"/>
|
---|
[25347] | 787 | </script>
|
---|
| 788 | </xsl:template>
|
---|
| 789 |
|
---|
[26023] | 790 |
|
---|
| 791 | <!-- builds up links to available document types equivalent to the default source
|
---|
| 792 | document with as anchor the equivalent documents' doctype icons. -->
|
---|
| 793 | <xsl:template name="equivDocLinks">
|
---|
| 794 | <xsl:param name="count"/>
|
---|
| 795 |
|
---|
| 796 | <xsl:variable name="docicon" select="metadataList/metadata[contains(@name, 'equivDocIcon')]"/>
|
---|
| 797 | <xsl:variable name="docEndlink" select="metadataList/metadata[contains(@name, '/equivDocLink')]"/>
|
---|
| 798 |
|
---|
| 799 | <!--<xsl:variable name="docStartlink" select="metadataList/metadata[contains(@name, 'all_*,*_equivDocLink')]"/>-->
|
---|
| 800 | <!-- In the following variable statement, we're trying to set the docStartlink to any metadata whose value
|
---|
| 801 | ends on equivDocLink but NOT /equivDocLink. Unfortunately, the xslt function fn:ends-with only exists from
|
---|
| 802 | xslt 2.0 onwards. So need to use substring() and string-lenth() functions now to check whether the 13th char
|
---|
| 803 | from the end is a slash or not, in order to distinguish between the start of a doclink and end of one.
|
---|
| 804 | If this 13th char from the end is not a slash, then we found (the string we want to store in) docStartlink. -->
|
---|
| 805 | <xsl:variable name="docStartlink">
|
---|
| 806 | <xsl:for-each select="metadataList/metadata">
|
---|
| 807 | <xsl:if test="contains(@name, 'equivDocLink')">
|
---|
| 808 | <xsl:variable name="tmpvar" select="substring(@name, string-length(@name)-12, 1)"/>
|
---|
| 809 | <xsl:if test="not($tmpvar='/')">
|
---|
| 810 | <xsl:value-of select="self::node()[@name]"/>
|
---|
| 811 | </xsl:if>
|
---|
| 812 | </xsl:if>
|
---|
| 813 | </xsl:for-each>
|
---|
| 814 | </xsl:variable>
|
---|
| 815 |
|
---|
| 816 | <xsl:variable name="equivDocIcon" select="java:org.greenstone.gsdl3.util.XSLTUtil.getNumberedItem($docicon, $count)" />
|
---|
| 817 | <xsl:variable name="equivStartlink" select="java:org.greenstone.gsdl3.util.XSLTUtil.getNumberedItem($docStartlink, $count)" />
|
---|
| 818 | <xsl:variable name="equivEndlink" select="java:org.greenstone.gsdl3.util.XSLTUtil.getNumberedItem($docEndlink, $count)" />
|
---|
| 819 |
|
---|
| 820 | <xsl:if test="$equivDocIcon != ''">
|
---|
| 821 | <xsl:value-of disable-output-escaping="yes" select="$equivStartlink"/>
|
---|
| 822 | <xsl:value-of disable-output-escaping="yes" select="$equivDocIcon"/>
|
---|
| 823 | <xsl:value-of disable-output-escaping="yes" select="$equivEndlink"/>
|
---|
| 824 |
|
---|
| 825 | <!-- recursively call this template to get multiple entries -->
|
---|
| 826 | <xsl:call-template name="equivDocLinks">
|
---|
| 827 | <xsl:with-param name="count"><xsl:value-of select="$count + 1"/></xsl:with-param>
|
---|
| 828 | </xsl:call-template>
|
---|
| 829 | </xsl:if>
|
---|
| 830 |
|
---|
| 831 | </xsl:template>
|
---|
| 832 |
|
---|
[18617] | 833 | </xsl:stylesheet>
|
---|