- Timestamp:
- 2011-03-25T11:12:23+13:00 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/trunk/greenstone3/web/interfaces/oran/transform/util.xsl
r22458 r23813 1 1 <?xml version="1.0" encoding="UTF-8"?> 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 gslib gsf xslt"> 9 10 <!-- some global parameters - these are set by whoever is invoking the transformation --> 2 <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xslt="http://www.w3.org/1999/XSL/Transform" xmlns:gslib="http://www.greenstone.org/XSL/Library" xmlns:gsf="http://www.greenstone.org/greenstone3/schema/ConfigFormat" xmlns:util="http://org.greenstone.gsdl3.util.XSLTUtil" version="1.0" exclude-result-prefixes="util gslib gsf xslt"> 3 <!-- some global parameters - these are set by whoever is invoking the transformation --> 11 4 <xsl:param name="interface_name"/> 12 5 <xsl:param name="library_name"/> 13 14 6 <xsl:include href="xml-to-string.xsl"/> 15 16 7 <!-- every pages ....................................................................... --> 17 <xsl:template name="siteName"><xsl:value-of select="/page/pageResponse/metadataList/metadata[@name='siteName']"/></xsl:template> 18 <xsl:template name="siteLink"><a href="./{$library_name}"><xsl:call-template name="siteName"/><xsl:text> </xsl:text></a></xsl:template> 19 20 <xsl:variable name="a"><xsl:value-of select="/page/pageRequest/paramList/param[@name='a']/@value"/> </xsl:variable> 21 <xsl:variable name="collections" select="/page/pageResponse/collectionList/collection"/> 22 23 <xsl:variable name="berrybasketswitch"><xsl:value-of select="/page/pageRequest/paramList/param[@name='berrybasket']/@value"/></xsl:variable> 24 <xsl:variable name="berryBasketOn" select="/page/pageRequest/paramList/param[@name='berrybasket' and @value='on']"/> 25 26 <!-- template to get the name of the current collection --> 27 <xsl:template name="collectionName"> 28 <xsl:choose> 29 <xsl:when test="/page/pageResponse/collection"><xsl:value-of select="/page/pageResponse/collection/displayItem[@name='name']"/></xsl:when> 30 <xsl:otherwise>All Collections</xsl:otherwise> 31 </xsl:choose> 32 </xsl:template> 33 34 <xsl:template name="collectionNameShort"> 35 <xsl:value-of select="/page/pageResponse/collection/@name"/> 36 </xsl:template> 37 38 <xsl:template name="collectionNameLinked"> 39 <xsl:if test="/page/pageResponse/collection"> 40 <a> 41 <xsl:attribute name="href">./<xsl:value-of select="$library_name"/>?a=p&sa=about&c=<xsl:call-template name="collectionNameShort"/></xsl:attribute> 42 <xsl:call-template name="collectionName"/> 43 </a> 44 </xsl:if> 45 </xsl:template> 46 47 <!-- text to get the name of the current service ("Browse","Search" etc) --> 48 <xsl:template name="serviceName"> 49 <xsl:value-of select="/page/pageResponse/service/displayItem[@name='name']"/> 50 </xsl:template> 51 52 <xsl:template name="textDirectionAttribute"> 53 <xsl:attribute name="dir"> 54 <xsl:choose> 55 <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> 56 <xsl:otherwise>ltr</xsl:otherwise> 57 </xsl:choose> 58 </xsl:attribute> 59 </xsl:template> 60 61 <xsl:template name="actionClass"> 62 <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> 63 </xsl:template> 64 65 <!-- username, if logged in --> 66 <!-- 8 <xsl:template name="siteName"> 9 <xsl:value-of select="/page/pageResponse/metadataList/metadata[@name='siteName']"/> 10 </xsl:template> 11 <xsl:template name="siteLink"> 12 <a href="./{$library_name}"> 13 <xsl:call-template name="siteName"/> 14 <xsl:text> </xsl:text> 15 </a> 16 </xsl:template> 17 <xsl:variable name="a"> 18 <xsl:value-of select="/page/pageRequest/paramList/param[@name='a']/@value"/> 19 </xsl:variable> 20 <xsl:variable name="collections" select="/page/pageResponse/collectionList/collection"/> 21 <xsl:variable name="berrybasketswitch"> 22 <xsl:value-of select="/page/pageRequest/paramList/param[@name='berrybasket']/@value"/> 23 </xsl:variable> 24 <xsl:variable name="berryBasketOn" select="/page/pageRequest/paramList/param[@name='berrybasket' and @value='on']"/> 25 <!-- template to get the name of the current collection --> 26 <xsl:template name="collectionName"> 27 <xsl:choose> 28 <xsl:when test="/page/pageResponse/collection"> 29 <xsl:value-of select="/page/pageResponse/collection/displayItem[@name='name']"/> 30 </xsl:when> 31 <xsl:otherwise>All Collections</xsl:otherwise> 32 </xsl:choose> 33 </xsl:template> 34 <xsl:template name="collectionNameShort"> 35 <xsl:value-of select="/page/pageResponse/collection/@name"/> 36 </xsl:template> 37 <xsl:template name="collectionNameLinked"> 38 <xsl:if test="/page/pageResponse/collection"> 39 <a> 40 <xsl:attribute name="href">./<xsl:value-of select="$library_name"/>?a=p&sa=about&c=<xsl:call-template name="collectionNameShort"/></xsl:attribute> 41 <xsl:call-template name="collectionName"/> 42 </a> 43 </xsl:if> 44 </xsl:template> 45 <!-- text to get the name of the current service ("Browse","Search" etc) --> 46 <xsl:template name="serviceName"> 47 <xsl:value-of select="/page/pageResponse/service/displayItem[@name='name']"/> 48 </xsl:template> 49 <xsl:template name="textDirectionAttribute"> 50 <xsl:attribute name="dir"> 51 <xsl:choose> 52 <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> 53 <xsl:otherwise>ltr</xsl:otherwise> 54 </xsl:choose> 55 </xsl:attribute> 56 </xsl:template> 57 <xsl:template name="actionClass"> 58 <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> 59 </xsl:template> 60 <!-- username, if logged in --> 61 <!-- 67 62 <xsl:template name="username"> 68 63 <xsl:if test="$un_s!=''"> … … 73 68 </xsl:template> 74 69 --> 75 76 <xsl:template name="defaultDividerBar"> 77 <xsl:param name='text'/> 78 <xsl:choose> 70 <xsl:template name="defaultDividerBar"> 71 <xsl:param name="text"/> 72 <xsl:choose> 79 73 <xsl:when test="$text"> 80 <div class="divbar"><xsl:value-of select="$text"/></div> 74 <div class="divbar"> 75 <xsl:value-of select="$text"/> 76 </div> 81 77 </xsl:when> 82 78 <xsl:otherwise> 83 <div class="divbar"><xsl:text disable-output-escaping="yes">&nbsp;</xsl:text></div> 79 <div class="divbar"> 80 <xsl:text disable-output-escaping="yes">&nbsp;</xsl:text> 81 </div> 84 82 </xsl:otherwise> 85 83 </xsl:choose> 86 84 </xsl:template> 87 88 89 <xsl:template match="error"> 85 <xsl:template match="error"> 90 86 Error: <xsl:value-of select="."/> 91 87 </xsl:template> 92 93 94 <xsl:template name="displayErrorsIfAny"> 95 <xsl:if test="descendant::error"> 88 <xsl:template name="displayErrorsIfAny"> 89 <xsl:if test="descendant::error"> 96 90 <script language="Javascript"> 97 91 <xsl:text disable-output-escaping="yes"> 98 92 function removeAllChildren(node) { 99 93 while (node.hasChildNodes()) { … … 107 101 hide_link = document.getElementById("hide"); 108 102 removeAllChildren(hide_link); 109 hide_link.appendChild(document.createTextNode("</xsl:text><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'hide_error')"/><xsl:text disable-output-escaping="yes">")); 103 hide_link.appendChild(document.createTextNode("</xsl:text> 104 <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'hide_error')"/> 105 <xsl:text disable-output-escaping="yes">")); 110 106 } else { 111 107 obj.style.display = "none"; 112 108 hide_link = document.getElementById("hide"); 113 109 removeAllChildren(hide_link); 114 hide_link.appendChild(document.createTextNode("</xsl:text><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'show_error')"/><xsl:text disable-output-escaping="yes">")); 110 hide_link.appendChild(document.createTextNode("</xsl:text> 111 <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'show_error')"/> 112 <xsl:text disable-output-escaping="yes">")); 115 113 } 116 114 } 117 115 </xsl:text> 118 116 </script> 119 <p align='right'><a id="hide" href="javascript:toggleHideError(error);"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'show_error')"/></a></p> 117 <p align="right"> 118 <a id="hide" href="javascript:toggleHideError(error);"> 119 <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'show_error')"/> 120 </a> 121 </p> 120 122 <div id="error" style="display: none;"> 121 123 <xsl:apply-templates select="descendant::error"/> 122 124 </div> 123 125 </xsl:if> 124 </xsl:template> 125 126 127 <xsl:template name="noTextBar"> 128 <xsl:text disable-output-escaping="yes">&nbsp;</xsl:text> 129 </xsl:template> 130 131 132 <xsl:template name="poweredByGS3TextBar"> 133 <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'gs3power')"/> 134 </xsl:template> 135 136 <xsl:template name="rightArrow"><xsl:text disable-output-escaping="yes"> &raquo; </xsl:text></xsl:template> 137 138 139 140 <!-- site home ....................................................................... --> 141 142 <xsl:template name="siteHomePageTitle"> 143 <!-- put a space in the title in case the actual value is missing - mozilla will not display a page with no title--> 144 <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'gsdl')"/><xsl:text> </xsl:text> 145 </xsl:template> 146 147 148 <xsl:template name="selectACollectionTextBar"> 149 <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'home.select_a_collection')"/> 150 </xsl:template> 151 <xsl:template name="crossCollectionQuickSearchForm"> 152 <xsl:apply-templates select="serviceList/service[@name='TextQuery']"/> 153 </xsl:template> 154 155 <xsl:template match="service[@name='TextQuery']"> 156 <form name="QuickSearch" method="get" action="{$library_name}"> 157 <input type="hidden" name="a" value="q"/> 158 <input type="hidden" name="rt" value="rd"/> 159 <input type="hidden" name="s" value="{@name}"/> 160 <input type="hidden" name="s1.collection" value="all"/> 161 <input type="text" name="s1.query" size="20"/> 162 <input type="submit"><xsl:attribute name="value"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'home.quick_search')"/></xsl:attribute></input> 163 </form> 164 </xsl:template> 165 166 <xsl:template name="collectionLinkWithImage"> 167 <xsl:choose> 168 <xsl:when test="displayItem[@name='icon']"> 169 <a href="{$library_name}?a=p&sa=about&c={@name}"> 170 <img class="collectionLinkImage"> 171 <xsl:attribute name="alt"></xsl:attribute> 172 <xsl:attribute name="src">sites/localsite/collect/<xsl:value-of select="@name"/>/images/<xsl:value-of select="displayItem[@name='icon']"/></xsl:attribute> 173 </img> 174 <!-- 126 </xsl:template> 127 <xsl:template name="noTextBar"> 128 <xsl:text disable-output-escaping="yes">&nbsp;</xsl:text> 129 </xsl:template> 130 <xsl:template name="poweredByGS3TextBar"> 131 <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'gs3power')"/> 132 </xsl:template> 133 <xsl:template name="rightArrow"> 134 <xsl:text disable-output-escaping="yes"> &raquo; </xsl:text> 135 </xsl:template> 136 <!-- site home ....................................................................... --> 137 <xsl:template name="siteHomePageTitle"> 138 <!-- put a space in the title in case the actual value is missing - mozilla will not display a page with no title--> 139 <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'gsdl')"/> 140 <xsl:text> </xsl:text> 141 </xsl:template> 142 <xsl:template name="selectACollectionTextBar"> 143 <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'home.select_a_collection')"/> 144 </xsl:template> 145 <xsl:template name="crossCollectionQuickSearchForm"> 146 <xsl:apply-templates select="serviceList/service[@name='TextQuery']"/> 147 </xsl:template> 148 <xsl:template match="service[@name='TextQuery']"> 149 <form name="QuickSearch" method="get" action="{$library_name}"> 150 <input type="hidden" name="a" value="q"/> 151 <input type="hidden" name="rt" value="rd"/> 152 <input type="hidden" name="s" value="{@name}"/> 153 <input type="hidden" name="s1.collection" value="all"/> 154 <input type="text" name="s1.query" size="20"/> 155 <input type="submit"> 156 <xsl:attribute name="value"> 157 <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'home.quick_search')"/> 158 </xsl:attribute> 159 </input> 160 </form> 161 </xsl:template> 162 <xsl:template name="collectionLinkWithImage"> 163 <xsl:choose> 164 <xsl:when test="displayItem[@name='icon']"> 165 <a href="{$library_name}?a=p&sa=about&c={@name}"> 166 <img class="collectionLinkImage"> 167 <xsl:attribute name="alt"/> 168 <xsl:attribute name="src">sites/localsite/collect/<xsl:value-of select="@name"/>/images/<xsl:value-of select="displayItem[@name='icon']"/></xsl:attribute> 169 </img> 170 <!-- 175 171 <div class="collectionLink"> 176 172 <xsl:attribute name="style">background-image: url(/sites/localsite/collect/<xsl:value-of select="@name"/>/images/<xsl:value-of select="displayItem[@name='icon']"/>);</xsl:attribute> … … 178 174 </div> 179 175 --> 180 </a> 176 </a> 177 </xsl:when> 178 <xsl:otherwise> 179 <a href="{$library_name}?a=p&sa=about&c={@name}"> 180 <div class="collectionLink"> 181 <xsl:value-of select="displayItem[@name='name']"/> 182 </div> 183 </a> 184 </xsl:otherwise> 185 </xsl:choose> 186 </xsl:template> 187 <xsl:template name="serviceClusterList"> 188 <xsl:apply-templates select="serviceClusterList"/> 189 </xsl:template> 190 <xsl:template match="serviceClusterList"> 191 <xsl:for-each select="serviceCluster"> 192 <a href="{$library_name}?a=p&sa=about&c={@name}"> 193 <xsl:value-of select="@name"/> 194 <xsl:value-of select="displayItem[@name='name']"/> 195 </a> 196 </xsl:for-each> 197 </xsl:template> 198 <xsl:template name="serviceLink"> 199 <div class="paramLabel"> 200 <a href="{$library_name}?a=q&rt=d&s={@name}"> 201 <xsl:value-of select="displayItem[@name='name']"/> 202 </a> 203 </div> 204 <div class="paramValue"> 205 <xsl:value-of select="displayItem[@name='description']"/> 206 </div> 207 <br class="clear"/> 208 </xsl:template> 209 <xsl:template name="authenticationLink"> 210 <xsl:for-each select="serviceList/service[@type='authen']"> 211 <li> 212 <a href="{$library_name}?a=g&rt=r&sa=authen&s={@name}&s1.aup=Login&s1.un=&s1.asn="> 213 <xsl:value-of select="displayItem[@name='name']"/> 214 </a> 215 <xsl:value-of select="displayItem[@name='description']"/> 216 </li> 217 </xsl:for-each> 218 </xsl:template> 219 <xsl:template name="libraryInterfaceLink"> 220 <li> 221 <a href="{$library_name}?a=p&sa=gli4gs3"> 222 <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'home.librarian_interface')"/> 223 </a> 224 </li> 225 </xsl:template> 226 <xsl:template name="greenstoneLogoAlternateText"> 227 <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'gsdl')"/> 228 </xsl:template> 229 <!-- about page - collection home ....................................................................... --> 230 <xsl:variable name="collName" select="/page/pageRequest/paramList/param[@name='c']/@value"/> 231 <xsl:param name="collName" select="/page/pageRequest/paramList/param[@name='c']/@value"/> 232 <xsl:param name="pageType"/> 233 <xsl:variable name="this-element" select="/page/pageResponse/collection|/page/pageResponse/serviceCluster"/> 234 <xsl:variable name="this-service" select="/page/pageResponse/service/@name"/> 235 <xsl:template name="aboutCollectionPageTitle"> 236 <!-- put a space in the title in case the actual value is missing - mozilla will not display a page with no title--> 237 <xsl:value-of select="/page/pageResponse/collection/displayItem[@name='name']"/> 238 <xsl:text> </xsl:text> 239 </xsl:template> 240 <xsl:template name="collectionHomeLinkWithLogoIfAvailable"> 241 <a href="{$library_name}?a=p&sa=about&c={$collName}"> 242 <xsl:choose> 243 <xsl:when test="$this-element/displayItem[@name='icon']"> 244 <img border="0"> 245 <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> 246 <xsl:attribute name="alt"> 247 <xsl:value-of select="$this-element/displayItem[@name='name']"/> 248 </xsl:attribute> 249 <xsl:attribute name="title"> 250 <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'aboutpage')"/> 251 </xsl:attribute> 252 </img> 253 </xsl:when> 254 <xsl:otherwise> 255 <xsl:value-of select="$this-element/displayItem[@name='name']"/> 256 </xsl:otherwise> 257 </xsl:choose> 258 </a> 259 </xsl:template> 260 <xsl:template name="homeButtonTop"> 261 <a href="{$library_name}?a=p&sa=home"> 262 <xsl:attribute name="title"> 263 <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'home_tip')"/> 264 </xsl:attribute> 265 <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'home_b')"/> 266 </a> 267 </xsl:template> 268 <xsl:template name="helpButtonTop"> 269 <xsl:choose> 270 <xsl:when test="$pageType='help'"> 271 <li> 272 <a> 273 <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'help_b')"/> 274 </a> 275 </li> 276 </xsl:when> 277 <xsl:otherwise> 278 <li> 279 <a href="{$library_name}?a=p&sa=help&c={$collName}"> 280 <xsl:attribute name="title"> 281 <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'help_tip')"/> 282 </xsl:attribute> 283 <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'help_b')"/> 284 </a> 285 </li> 286 </xsl:otherwise> 287 </xsl:choose> 288 </xsl:template> 289 <xsl:template name="preferencesButtonTop"> 290 <xsl:choose> 291 <xsl:when test="$pageType='pref'"> 292 <li> 293 <a> 294 <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'pref_b')"/> 295 </a> 296 </li> 297 </xsl:when> 298 <xsl:otherwise> 299 <li> 300 <a href="{$library_name}?a=p&sa=pref&c={$collName}"> 301 <xsl:attribute name="title"> 302 <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'pref_tip')"/> 303 </xsl:attribute> 304 <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'pref_b')"/> 305 </a> 306 </li> 307 </xsl:otherwise> 308 </xsl:choose> 309 </xsl:template> 310 <xsl:template name="servicesNavigationBar"> 311 <xsl:for-each select="$this-element/serviceList/service"> 312 <xsl:variable name="action"> 313 <xsl:choose> 314 <xsl:when test="@name=$this-service">CURRENT</xsl:when> 315 <xsl:when test="@type='query'">q</xsl:when> 316 <xsl:when test="@type='browse'">b</xsl:when> 317 <xsl:when test="@type='process'">pr</xsl:when> 318 <xsl:when test="@type='applet'">a</xsl:when> 319 <xsl:otherwise>DO_NOT_DISPLAY</xsl:otherwise> 320 </xsl:choose> 321 </xsl:variable> 322 <xsl:choose> 323 <xsl:when test="$action='CURRENT'"> 324 <li> 325 <a> 326 <xsl:value-of select="displayItem[@name='name']"/> 327 </a> 328 </li> 329 </xsl:when> 330 <xsl:when test="$action !='DO_NOT_DISPLAY'"> 331 <li> 332 <a href="{$library_name}?a={$action}&rt=d&s={@name}&c={$collName}"> 333 <xsl:if test="displayItem[@name='description']"> 334 <xsl:attribute name="title"> 335 <xsl:value-of select="displayItem[@name='description']"/> 336 </xsl:attribute> 337 </xsl:if> 338 <xsl:value-of select="displayItem[@name='name']"/> 339 </a> 340 </li> 341 </xsl:when> 342 </xsl:choose> 343 </xsl:for-each> 344 </xsl:template> 345 <xsl:template name="collectionDescriptionTextAndServicesLinks"> 346 <xsl:apply-templates select="pageResponse/collection|serviceCluster"/> 347 </xsl:template> 348 <xsl:template match="collection|serviceCluster"> 349 <xsl:value-of select="displayItem[@name='description']" disable-output-escaping="yes"/> 350 <xsl:apply-templates select="serviceList"> 351 <xsl:with-param name="collName" select="$collName"/> 352 </xsl:apply-templates> 353 </xsl:template> 354 <xsl:template match="serviceList"> 355 <xsl:param name="collName"/> 356 <xsl:if test="service[not(@type = 'query' or @type = 'browse' or @type = 'retrieve')]"> 357 <h3> 358 <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'about.services')"/> 359 </h3> 360 <p> 361 <xsl:choose> 362 <xsl:when test="service"> 363 <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'about.servicehelp')"/> 181 364 </xsl:when> 182 365 <xsl:otherwise> 183 <a href="{$library_name}?a=p&sa=about&c={@name}"> 184 <div class="collectionLink"> 185 <xsl:value-of select="displayItem[@name='name']"/> 186 </div> 187 </a> 366 <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'about.noservices')"/> 188 367 </xsl:otherwise> 189 </xsl:choose> 190 </xsl:template> 191 192 193 <xsl:template name="serviceClusterList"> 194 <xsl:apply-templates select="serviceClusterList"/> 195 </xsl:template> 196 197 <xsl:template match="serviceClusterList"> 198 <xsl:for-each select="serviceCluster"> 199 <a href="{$library_name}?a=p&sa=about&c={@name}"><xsl:value-of select='@name'/><xsl:value-of select="displayItem[@name='name']"/></a> 200 </xsl:for-each> 201 </xsl:template> 202 203 204 <xsl:template name="serviceLink"> 205 <div class="paramLabel"><a href="{$library_name}?a=q&rt=d&s={@name}"><xsl:value-of select="displayItem[@name='name']"/></a></div> 206 <div class="paramValue"><xsl:value-of select="displayItem[@name='description']"/></div> 207 <br class="clear"/> 208 </xsl:template> 209 210 211 <xsl:template name="authenticationLink"> 212 <xsl:for-each select="serviceList/service[@type='authen']"> 213 <li><a href="{$library_name}?a=g&rt=r&sa=authen&s={@name}&s1.aup=Login&s1.un=&s1.asn="><xsl:value-of select="displayItem[@name='name']"/></a><xsl:value-of select="displayItem[@name='description']"/></li></xsl:for-each> 214 </xsl:template> 215 <xsl:template name="libraryInterfaceLink"> 216 <li><a href="{$library_name}?a=p&sa=gli4gs3"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'home.librarian_interface')"/></a></li> 217 </xsl:template> 218 <xsl:template name="greenstoneLogoAlternateText"> 219 <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'gsdl')"/> 220 </xsl:template> 221 222 <!-- about page - collection home ....................................................................... --> 223 <xsl:variable name="collName" select="/page/pageRequest/paramList/param[@name='c']/@value"/> 224 <xsl:param name="collName" select="/page/pageRequest/paramList/param[@name='c']/@value"/> 225 <xsl:param name="pageType"/> 226 <xsl:variable name="this-element" select="/page/pageResponse/collection|/page/pageResponse/serviceCluster"/> 227 <xsl:variable name="this-service" select="/page/pageResponse/service/@name"/> 228 229 230 <xsl:template name="aboutCollectionPageTitle"> 231 <!-- put a space in the title in case the actual value is missing - mozilla will not display a page with no title--> 232 <xsl:value-of select="/page/pageResponse/collection/displayItem[@name='name']"/><xsl:text> </xsl:text> 233 </xsl:template> 234 235 236 <xsl:template name="collectionHomeLinkWithLogoIfAvailable"> 237 <a href="{$library_name}?a=p&sa=about&c={$collName}"> 238 <xsl:choose> 239 <xsl:when test="$this-element/displayItem[@name='icon']"> 240 <img border="0"> 241 <xsl:attribute name="src"> 242 <xsl:value-of select="$this-element/metadataList/metadata[@name='httpPath']"/>/images/<xsl:value-of select="$this-element/displayItem[@name='icon']"/> 243 </xsl:attribute> 244 <xsl:attribute name="alt"> 245 <xsl:value-of select="$this-element/displayItem[@name='name']"/> 246 </xsl:attribute> 247 <xsl:attribute name="title"> 248 <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'aboutpage')"/> 249 </xsl:attribute> 250 </img> 251 </xsl:when> 252 <xsl:otherwise> 253 <xsl:value-of select="$this-element/displayItem[@name='name']"/> 254 </xsl:otherwise> 255 </xsl:choose> 256 </a> 257 </xsl:template> 258 259 260 <xsl:template name="homeButtonTop"> 261 <a href="{$library_name}?a=p&sa=home"><xsl:attribute name="title"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'home_tip')"/></xsl:attribute> 262 <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'home_b')"/></a> 263 </xsl:template> 264 265 266 <xsl:template name="helpButtonTop"> 368 </xsl:choose> 369 </p> 370 <xsl:if test="service"> 371 <div id="servicelist"> 372 <xsl:for-each select="service"> 373 <xsl:sort select="position()" order="descending" data-type="number"/> 374 <xsl:variable name="action"> 375 <xsl:choose> 376 <xsl:when test="@type='query'">q</xsl:when> 377 <xsl:when test="@type='browse'">b</xsl:when> 378 <xsl:when test="@type='process'">pr</xsl:when> 379 <xsl:when test="@type='applet'">a</xsl:when> 380 <xsl:otherwise>DO_NOT_DISPLAY</xsl:otherwise> 381 </xsl:choose> 382 </xsl:variable> 383 <xsl:if test="$action != 'DO_NOT_DISPLAY'"> 384 <div class="paramLabel"> 385 <a href="{$library_name}?a={$action}&rt=d&s={@name}&c={$collName}"> 386 <xsl:value-of select="displayItem[@name='name']"/> 387 </a> 388 </div> 389 <div class="paramLabel"> 390 <xsl:value-of select="displayItem[@name='description']"/> 391 </div> 392 <br class="clear"/> 393 </xsl:if> 394 </xsl:for-each> 395 </div> 396 </xsl:if> 397 </xsl:if> 398 </xsl:template> 399 <!-- classifier page ............................................................................ --> 400 <xsl:template name="collapsedNavigationTab"> 401 <xsl:param name="type"/> 402 <xsl:variable name="isCurrent" select="/page/pageResponse/service[@type=$type]"/> 403 <li> 404 <xsl:if test="$isCurrent"> 405 <xsl:attribute name="class">current</xsl:attribute> 406 </xsl:if> 407 <a> 408 <xsl:if test="service[@name=$type]/displayItem[@name='description']"> 409 <xsl:attribute name="title"> 410 <xsl:value-of select="service[@name=$type]/displayItem[@name='description']"/> 411 </xsl:attribute> 412 </xsl:if> 413 <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> 414 <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, $type)"/> 415 </a> 416 </li> 417 </xsl:template> 418 <xsl:template name="navigationTab"> 419 <xsl:variable name="isCurrent" select="@name=/page/pageResponse/service/@name"/> 420 <xsl:variable name="action"> 421 <xsl:choose> 422 <xsl:when test="@type='query'">q</xsl:when> 423 <xsl:when test="@type='browse'">b</xsl:when> 424 <xsl:when test="@type='process'">pr</xsl:when> 425 <xsl:when test="@type='applet'">a</xsl:when> 426 <xsl:otherwise>DO_NOT_DISPLAY</xsl:otherwise> 427 </xsl:choose> 428 </xsl:variable> 429 <xsl:if test="$action!='DO_NOT_DISPLAY'"> 430 <li> 431 <xsl:if test="$isCurrent"> 432 <xsl:attribute name="class">current</xsl:attribute> 433 </xsl:if> 434 <a> 435 <xsl:if test="displayItem[@name='description']"> 436 <xsl:attribute name="title"> 437 <xsl:value-of select="displayItem[@name='description']"/> 438 </xsl:attribute> 439 </xsl:if> 440 <xsl:choose> 441 <xsl:when test="classifierList/classifier/@name"> 442 <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> 443 </xsl:when> 444 <xsl:otherwise> 445 <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> 446 </xsl:otherwise> 447 </xsl:choose> 448 <xsl:value-of select="displayItem[@name='name']"/> 449 </a> 450 </li> 451 </xsl:if> 452 </xsl:template> 453 <xsl:template name="classifierLink"> 454 <xsl:if test="@name=/page/pageResponse/classifier/@name"> 455 <xsl:attribute name="class">current</xsl:attribute> 456 </xsl:if> 457 <a href="{$library_name}?a=b&rt=r&s={/page/pageResponse/service/@name}&c={/page/pageResponse/collection/@name}&cl={@name}"> 458 <xsl:value-of select="displayItem[@name='description']"/> 459 </a> 460 </xsl:template> 461 <!-- query page ............................................................................ --> 462 <xsl:template name="indexName"> 463 <xsl:value-of select="/page/pageResponse/service/displayItem[@name='name']"/> 464 </xsl:template> 465 <xsl:template name="queryPageCollectionName"> 267 466 <xsl:choose> 268 <xsl:when test=" $pageType='help'">269 <li><a><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'help_b')"/></a></li>467 <xsl:when test="/page/pageResponse/collection"> 468 <gslib:aboutCollectionPageTitle/> 270 469 </xsl:when> 271 <xsl:otherwise> 272 <li><a href="{$library_name}?a=p&sa=help&c={$collName}"><xsl:attribute name="title"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'help_tip')"/></xsl:attribute> 273 <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'help_b')"/> 274 </a></li> 275 </xsl:otherwise> 470 <xsl:otherwise>Cross-Collection</xsl:otherwise> 276 471 </xsl:choose> 277 </xsl:template> 278 279 280 <xsl:template name="preferencesButtonTop"> 281 <xsl:choose> 282 <xsl:when test="$pageType='pref'"> 283 <li><a><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'pref_b')"/></a></li> 284 </xsl:when> 285 <xsl:otherwise> 286 <li><a href="{$library_name}?a=p&sa=pref&c={$collName}"><xsl:attribute name="title"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'pref_tip')"/></xsl:attribute> 287 <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'pref_b')"/> 288 </a></li> 289 </xsl:otherwise> 290 </xsl:choose> 291 </xsl:template> 292 293 <xsl:template name="servicesNavigationBar"> 294 <xsl:for-each select="$this-element/serviceList/service"> 295 <xsl:variable name="action"><xsl:choose> 296 <xsl:when test="@name=$this-service">CURRENT</xsl:when> 297 <xsl:when test="@type='query'">q</xsl:when> 298 <xsl:when test="@type='browse'">b</xsl:when> 299 <xsl:when test="@type='process'">pr</xsl:when> 300 <xsl:when test="@type='applet'">a</xsl:when> 301 <xsl:otherwise>DO_NOT_DISPLAY</xsl:otherwise> 302 </xsl:choose></xsl:variable> 303 <xsl:choose> 304 <xsl:when test="$action='CURRENT'"> 305 <li><a><xsl:value-of select="displayItem[@name='name']"/></a></li> 306 </xsl:when> 307 <xsl:when test="$action !='DO_NOT_DISPLAY'"> 308 <li><a href="{$library_name}?a={$action}&rt=d&s={@name}&c={$collName}"><xsl:if test="displayItem[@name='description']"><xsl:attribute name='title'><xsl:value-of select="displayItem[@name='description']"/></xsl:attribute></xsl:if><xsl:value-of select="displayItem[@name='name']"/></a></li> 309 </xsl:when> 310 </xsl:choose> 311 </xsl:for-each> 312 </xsl:template> 313 314 315 <xsl:template name="collectionDescriptionTextAndServicesLinks"> 316 <xsl:apply-templates select="pageResponse/collection|serviceCluster"/> 317 </xsl:template> 318 319 <xsl:template match="collection|serviceCluster"> 320 <xsl:value-of select="displayItem[@name='description']" disable-output-escaping="yes"/> 321 <xsl:apply-templates select="serviceList"> 322 <xsl:with-param name="collName" select="$collName"/> 323 </xsl:apply-templates> 324 </xsl:template> 325 326 327 <xsl:template match="serviceList"> 328 <xsl:param name="collName"/> 329 <h3><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'about.services')"/></h3> 330 <p> 331 <xsl:choose> 332 <xsl:when test="service"> 333 <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'about.servicehelp')"/> 334 </xsl:when> 335 <xsl:otherwise> 336 <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'about.noservices')"/> 337 </xsl:otherwise> 338 </xsl:choose> 339 </p> 340 341 <xsl:if test="service"> 342 <div id="servicelist"> 343 <xsl:for-each select="service"> 344 <xsl:sort select="position()" order="descending" data-type="number"/> 345 346 <xsl:variable name="action"><xsl:choose> 347 <xsl:when test="@type='query'">q</xsl:when> 348 <xsl:when test="@type='browse'">b</xsl:when> 349 <xsl:when test="@type='process'">pr</xsl:when> 350 <xsl:when test="@type='applet'">a</xsl:when> 351 <xsl:otherwise>DO_NOT_DISPLAY</xsl:otherwise> 352 </xsl:choose></xsl:variable> 353 <xsl:if test="$action != 'DO_NOT_DISPLAY'"> 354 <div class="paramLabel"><a href="{$library_name}?a={$action}&rt=d&s={@name}&c={$collName}"><xsl:value-of select="displayItem[@name='name']"/></a></div> 355 <div class="paramLabel"><xsl:value-of select="displayItem[@name='description']"/></div> 356 <br class="clear"/> 357 </xsl:if> 358 </xsl:for-each> 359 </div> 360 </xsl:if> 361 </xsl:template> 362 363 364 365 <!-- classifier page ............................................................................ --> 366 367 <xsl:template name="collapsedNavigationTab"> 368 <xsl:param name="type"/> 369 <xsl:variable name="isCurrent" select="/page/pageResponse/service[@type=$type]"/> 370 <li> 371 <xsl:if test="$isCurrent"> 372 <xsl:attribute name="class">current</xsl:attribute> 373 </xsl:if> 374 <a> 375 <xsl:if test="service[@name=$type]/displayItem[@name='description']"><xsl:attribute name='title'><xsl:value-of select="service[@name=$type]/displayItem[@name='description']"/></xsl:attribute></xsl:if> 376 <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> 377 <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, $type)"/> 378 </a> 379 </li> 380 </xsl:template> 381 382 <xsl:template name="navigationTab"> 383 384 <xsl:variable name="isCurrent" select="@name=/page/pageResponse/service/@name"/> 385 386 <xsl:variable name="action"><xsl:choose> 387 <xsl:when test="@type='query'">q</xsl:when> 388 <xsl:when test="@type='browse'">b</xsl:when> 389 <xsl:when test="@type='process'">pr</xsl:when> 390 <xsl:when test="@type='applet'">a</xsl:when> 391 <xsl:otherwise>DO_NOT_DISPLAY</xsl:otherwise> 392 </xsl:choose></xsl:variable> 393 394 <xsl:if test="$action!='DO_NOT_DISPLAY'"> 395 <li> 396 <xsl:if test="$isCurrent"> 397 <xsl:attribute name="class">current</xsl:attribute> 398 </xsl:if> 399 <a> 400 <xsl:if test="displayItem[@name='description']"> 401 <xsl:attribute name='title'><xsl:value-of select="displayItem[@name='description']"/></xsl:attribute> 402 </xsl:if> 403 <xsl:choose> 404 <xsl:when test="classifierList/classifier/@name"> 405 <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> 406 </xsl:when> 407 <xsl:otherwise> 408 <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> 409 </xsl:otherwise> 410 </xsl:choose> 411 <xsl:value-of select="displayItem[@name='name']"/> 412 </a> 413 </li> 414 </xsl:if> 415 416 </xsl:template> 417 418 419 <xsl:template name="classifierLink"> 420 <xsl:if test="@name=/page/pageResponse/classifier/@name"><xsl:attribute name="class">current</xsl:attribute></xsl:if> 421 <a href="{$library_name}?a=b&rt=r&s={/page/pageResponse/service/@name}&c={/page/pageResponse/collection/@name}&cl={@name}"> 422 <xsl:value-of select="displayItem[@name='description']"/> 423 </a> 424 </xsl:template> 425 426 <!-- query page ............................................................................ --> 427 428 <xsl:template name="indexName"> 429 <xsl:value-of select="/page/pageResponse/service/displayItem[@name='name']"/> 430 </xsl:template> 431 432 <xsl:template name="queryPageCollectionName"> 433 <xsl:choose><xsl:when test="/page/pageResponse/collection"><gslib:aboutCollectionPageTitle/></xsl:when><xsl:otherwise>Cross-Collection</xsl:otherwise></xsl:choose> 434 </xsl:template> 435 436 437 438 439 440 <!-- 472 </xsl:template> 473 <!-- 441 474 BERRY BASKET TEMPLATES 442 475 These get used on many different pages to add the 443 476 berry basket function to the site 444 477 --> 445 446 <!-- put the drag&drop berry basket on the page --> 447 <xsl:template name="berryBasket"> 448 <xsl:if test="$berryBasketOn"> 449 <div id="berrybasket" class="hide"> 450 <span>Berry Basket</span> 451 <span id="berryBasketExpandCollapseLinks" style="display: none;"> 452 <a id="berryBasketExpandLink" href="javascript:showBasket()">Expand</a> 453 <a id="berryBasketCollapseLink" style="display: none;" href="javascript:hideBasket()">Collapse</a> 454 </span> 455 <div id="baskethandle"><span><xsl:text> </xsl:text></span></div> 456 <div id ="berries"><span><xsl:text> </xsl:text></span></div> 457 </div> 458 </xsl:if> 459 </xsl:template> 460 461 <!-- include the required javascript and css for berry baskets --> 462 <xsl:template name="berryBasketHeadTags"> 463 <script type="text/javascript" src="interfaces/{$interface_name}/js/YAHOO.js"><xsl:text> </xsl:text></script> 464 <script type="text/javascript" src="interfaces/{$interface_name}/js/event.js"><xsl:text> </xsl:text></script> 465 <script type="text/javascript" src="interfaces/{$interface_name}/js/connection.js"><xsl:text> </xsl:text></script> 466 <script type="text/javascript" src="interfaces/{$interface_name}/js/dom.js"><xsl:text> </xsl:text></script> 467 <script type="text/javascript" src="interfaces/{$interface_name}/js/dragdrop.js"><xsl:text> </xsl:text></script> 468 <script type="text/javascript" src="interfaces/{$interface_name}/js/ygDDPlayer.js"><xsl:text> </xsl:text></script> 469 <script type="text/javascript" src="interfaces/{$interface_name}/js/ygDDOnTop.js"><xsl:text> </xsl:text></script> 470 <script type="text/javascript" src="interfaces/{$interface_name}/js/berrybasket.js"><xsl:text> </xsl:text></script> 471 <link rel="stylesheet" href="interfaces/{$interface_name}/style/berry.css" type="text/css"/> 472 </xsl:template> 473 474 <!-- 478 <!-- put the drag&drop berry basket on the page --> 479 <xsl:template name="berryBasket"> 480 <xsl:if test="$berryBasketOn"> 481 <div id="berrybasket" class="hide"> 482 <span>Berry Basket</span> 483 <span id="berryBasketExpandCollapseLinks" style="display: none;"> 484 <a id="berryBasketExpandLink" href="javascript:showBasket()">Expand</a> 485 <a id="berryBasketCollapseLink" style="display: none;" href="javascript:hideBasket()">Collapse</a> 486 </span> 487 <div id="baskethandle"> 488 <span> 489 <xsl:text> </xsl:text> 490 </span> 491 </div> 492 <div id="berries"> 493 <span> 494 <xsl:text> </xsl:text> 495 </span> 496 </div> 497 </div> 498 </xsl:if> 499 </xsl:template> 500 <!-- include the required javascript and css for berry baskets --> 501 <xsl:template name="berryBasketHeadTags"> 502 <script type="text/javascript" src="interfaces/{$interface_name}/js/YAHOO.js"><xsl:text> </xsl:text></script> 503 <script type="text/javascript" src="interfaces/{$interface_name}/js/event.js"><xsl:text> </xsl:text></script> 504 <script type="text/javascript" src="interfaces/{$interface_name}/js/connection.js"><xsl:text> </xsl:text></script> 505 <script type="text/javascript" src="interfaces/{$interface_name}/js/dom.js"><xsl:text> </xsl:text></script> 506 <script type="text/javascript" src="interfaces/{$interface_name}/js/dragdrop.js"><xsl:text> </xsl:text></script> 507 <script type="text/javascript" src="interfaces/{$interface_name}/js/ygDDPlayer.js"><xsl:text> </xsl:text></script> 508 <script type="text/javascript" src="interfaces/{$interface_name}/js/ygDDOnTop.js"><xsl:text> </xsl:text></script> 509 <script type="text/javascript" src="interfaces/{$interface_name}/js/berrybasket.js"><xsl:text> </xsl:text></script> 510 <link rel="stylesheet" href="interfaces/{$interface_name}/style/berry.css" type="text/css"/> 511 </xsl:template> 512 <!-- 475 513 create a little berry which can be drag&dropped onto the berry basket 476 514 used on classifier and search result pages 477 515 --> 478 <xsl:template name="documentBerryForClassifierOrSearchPage"> 479 <xsl:if test="$berryBasketOn"> 480 <img class="pick" src="interfaces/{$interface_name}/images/berry.png" alt="in basket" width="15" height="15" border="0"> 481 <xsl:attribute name="id"><xsl:value-of select="/page/pageResponse/collection/@name"/>:<xsl:value-of select="@nodeID"/></xsl:attribute> 482 </img> 483 </xsl:if> 484 </xsl:template> 485 486 <!-- 516 <xsl:template name="documentBerryForClassifierOrSearchPage"> 517 <xsl:if test="$berryBasketOn"> 518 <img class="pick" src="interfaces/{$interface_name}/images/berry.png" alt="in basket" width="15" height="15" border="0"> 519 <xsl:attribute name="id"><xsl:value-of select="/page/pageResponse/collection/@name"/>:<xsl:value-of select="@nodeID"/></xsl:attribute> 520 </img> 521 </xsl:if> 522 </xsl:template> 523 <!-- 487 524 create little berrys which can be drag&dropped onto the berry basket 488 525 used on the document page 489 526 --> 490 <xsl:template name="documentBerryForDocumentPage"> 491 <xsl:variable name="selectedNode"><xsl:value-of select="/page/pageResponse/document/@selectedNode"/></xsl:variable> 492 <xsl:variable name="rootNode"><xsl:value-of select="/page/pageResponse/document/documentNode[@nodeType='root']/@nodeID"/></xsl:variable> 493 494 <xsl:if test="$berryBasketOn"> 495 <div id="documentberries"> 496 <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"/> 497 <span id="{/page/pageResponse/collection/@name}:{$rootNode}:root" class="documentberry">the whole document</span> 498 499 <xsl:if test="$selectedNode != $rootNode"> 500 <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"/> 501 <span id="{/page/pageResponse/collection/@name}:{$selectedNode}:section" class="documentberry">the current section</span> 502 </xsl:if> 503 </div> 504 </xsl:if> 505 </xsl:template> 506 507 508 <!-- document page --> 509 <xsl:template name="documentTitle"> 510 <xsl:value-of select="/page/pageResponse/document/documentNode/metadataList/metadata[@name='Title']"/> 511 </xsl:template> 512 513 514 <xsl:template name="coverImage"> 515 <img><xsl:attribute name='src'><xsl:value-of select="/page/pageResponse/collection/metadataList/metadata[@name='httpPath']"/>/index/assoc/<xsl:value-of select="metadataList/metadata[@name='archivedir']"/>/cover.jpg</xsl:attribute></img> 516 </xsl:template> 517 518 <xsl:template name="previousNextButtons"> 519 <!-- prev --> 520 <a> 521 <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> 522 <img class="lessarrow" src="interfaces/{$interface_name}/images/previous.png"/> 523 </a> 524 525 <!-- next --> 526 <a> 527 <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> 528 <img class="morearrow" src="interfaces/{$interface_name}/images/next.png"/> 529 </a> 530 531 </xsl:template> 532 533 527 <xsl:template name="documentBerryForDocumentPage"> 528 <xsl:variable name="selectedNode"> 529 <xsl:value-of select="/page/pageResponse/document/@selectedNode"/> 530 </xsl:variable> 531 <xsl:variable name="rootNode"> 532 <xsl:value-of select="/page/pageResponse/document/documentNode[@nodeType='root']/@nodeID"/> 533 </xsl:variable> 534 <xsl:if test="$berryBasketOn"> 535 <div id="documentberries"> 536 <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"/> 537 <span id="{/page/pageResponse/collection/@name}:{$rootNode}:root" class="documentberry">the whole document</span> 538 <xsl:if test="$selectedNode != $rootNode"> 539 <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"/> 540 <span id="{/page/pageResponse/collection/@name}:{$selectedNode}:section" class="documentberry">the current section</span> 541 </xsl:if> 542 </div> 543 </xsl:if> 544 </xsl:template> 545 <!-- document page --> 546 <xsl:template name="documentTitle"> 547 <xsl:value-of select="/page/pageResponse/document/documentNode/metadataList/metadata[@name='Title']"/> 548 </xsl:template> 549 <xsl:template name="coverImage"> 550 <img> 551 <xsl:attribute name="src"><xsl:value-of select="/page/pageResponse/collection/metadataList/metadata[@name='httpPath']"/>/index/assoc/<xsl:value-of select="metadataList/metadata[@name='archivedir']"/>/cover.jpg</xsl:attribute> 552 </img> 553 </xsl:template> 554 <xsl:template name="previousNextButtons"> 555 <!-- prev --> 556 <a> 557 <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> 558 <img class="lessarrow" src="interfaces/{$interface_name}/images/previous.png"/> 559 </a> 560 <!-- next --> 561 <a> 562 <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> 563 <img class="morearrow" src="interfaces/{$interface_name}/images/next.png"/> 564 </a> 565 </xsl:template> 534 566 </xsl:stylesheet>
Note:
See TracChangeset
for help on using the changeset viewer.