[23989] | 1 | <xsl:stylesheet version="1.0"
|
---|
| 2 | xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
|
---|
| 3 | xmlns:java="http://xml.apache.org/xslt/java"
|
---|
| 4 | xmlns:util="xalan://org.greenstone.gsdl3.util.XSLTUtil"
|
---|
| 5 | xmlns:gslib="http://www.greenstone.org/skinning"
|
---|
[25001] | 6 | xmlns:gsf="http://www.greenstone.org/greenstone3/schema/ConfigFormat"
|
---|
[23989] | 7 | extension-element-prefixes="java util"
|
---|
[25001] | 8 | exclude-result-prefixes="java util gsf">
|
---|
[23989] | 9 |
|
---|
| 10 | <xsl:include href="../query-common.xsl"/>
|
---|
[24458] | 11 | <xsl:include href="../javascript-global-setup.xsl"/>
|
---|
[23989] | 12 |
|
---|
| 13 | <!-- If the c parameter is empty then use the p.c parameter for the collection name-->
|
---|
| 14 | <xsl:variable name="collNameChecked">
|
---|
| 15 | <xsl:choose>
|
---|
| 16 | <xsl:when test="$collName = '' and /page/pageRequest/paramList/param[@name='p.c']/@value">
|
---|
| 17 | <xsl:value-of select="/page/pageRequest/paramList/param[@name='p.c']/@value"/>
|
---|
| 18 | </xsl:when>
|
---|
| 19 | <xsl:otherwise>
|
---|
| 20 | <xsl:value-of select="$collName"/>
|
---|
| 21 | </xsl:otherwise>
|
---|
| 22 | </xsl:choose>
|
---|
| 23 | </xsl:variable>
|
---|
| 24 |
|
---|
[24149] | 25 | <!-- Creates a header for the html page -->
|
---|
[23989] | 26 | <xsl:template name="create-html-header">
|
---|
[25436] | 27 | <base>
|
---|
| 28 | <xsl:attribute name="href">
|
---|
| 29 | <xsl:choose>
|
---|
| 30 | <xsl:when test="/page/pageResponse/metadataList/metadata[@name = 'baseURL']">
|
---|
| 31 | <xsl:value-of select="/page/pageResponse/metadataList/metadata[@name = 'baseURL']"/>
|
---|
| 32 | </xsl:when>
|
---|
| 33 | <xsl:when test="/page/pageRequest/@baseURL">
|
---|
| 34 | <xsl:value-of select="/page/pageRequest/@baseURL"/>
|
---|
| 35 | </xsl:when>
|
---|
| 36 | </xsl:choose>
|
---|
| 37 | </xsl:attribute>
|
---|
| 38 | </base>
|
---|
[25360] | 39 | <xsl:comment>[if lte IE 6]></base><![endif]</xsl:comment>
|
---|
[25278] | 40 |
|
---|
[23989] | 41 | <title><xsl:call-template name="pageTitle"/> :: <xsl:call-template name="siteName"/></title>
|
---|
[25123] | 42 |
|
---|
| 43 | <xsl:choose>
|
---|
| 44 | <xsl:when test="/page/pageResponse/interfaceOptions/option[@name = 'cssTheme']/@value">
|
---|
[25142] | 45 | <!-- Get the theme from the interfaceConfig.xml file -->
|
---|
[25123] | 46 | <link rel="stylesheet" href="{/page/pageResponse/interfaceOptions/option[@name = 'cssTheme']/@value}" type="text/css"/>
|
---|
| 47 | </xsl:when>
|
---|
| 48 | <xsl:otherwise>
|
---|
| 49 | <link rel="stylesheet" href="interfaces/{$interface_name}/style/themes/main/jquery-ui-1.8.16.custom.css" type="text/css"/>
|
---|
| 50 | </xsl:otherwise>
|
---|
| 51 | </xsl:choose>
|
---|
[23989] | 52 | <link rel="stylesheet" href="interfaces/{$interface_name}/style/core.css" type="text/css"/>
|
---|
[26145] | 53 | <link rel="shortcut icon" href="interfaces/{$interface_name}/images/favicon.ico"/>
|
---|
[24458] | 54 |
|
---|
[25759] | 55 | <script type="text/javascript" src="interfaces/{$interface_name}/js/jquery.min.js"><xsl:text> </xsl:text></script>
|
---|
| 56 | <script type="text/javascript" src="interfaces/{$interface_name}/js/jquery-ui.min.js"><xsl:text> </xsl:text></script>
|
---|
[25001] | 57 | <script type="text/javascript" src="interfaces/{$interface_name}/js/jquery.themeswitcher.min.js"><xsl:text> </xsl:text></script>
|
---|
| 58 |
|
---|
| 59 | <script type="text/javascript" src="interfaces/{$interface_name}/js/direct-edit.js"><xsl:text> </xsl:text></script>
|
---|
[25177] | 60 | <script type="text/javascript" src="interfaces/{$interface_name}/js/zoomer.js"><xsl:text> </xsl:text></script>
|
---|
[25686] | 61 |
|
---|
[25001] | 62 | <xsl:if test="/page/pageResponse/format[@type='display' or @type='browse' or @type='search']/gsf:option[@name='mapEnabled']/@value = 'true'">
|
---|
| 63 | <xsl:call-template name="map-scripts"/>
|
---|
| 64 | </xsl:if>
|
---|
[25142] | 65 |
|
---|
[25177] | 66 | <xsl:if test="/page/pageRequest/userInformation 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))">
|
---|
| 67 | <xsl:call-template name="init-direct-edit"/>
|
---|
| 68 | </xsl:if>
|
---|
[24458] | 69 | <xsl:call-template name="setup-gs-variable"/>
|
---|
[24781] | 70 | <xsl:call-template name="additionalHeaderContent"/>
|
---|
[23989] | 71 | </xsl:template>
|
---|
[24781] | 72 |
|
---|
| 73 | <xsl:template name="additionalHeaderContent">
|
---|
| 74 | <!-- This template should be overridden in the collectionConfig.xml file if you want to add extra header content -->
|
---|
| 75 | </xsl:template>
|
---|
[25001] | 76 |
|
---|
[25142] | 77 | <xsl:template name="init-direct-edit">
|
---|
[24653] | 78 | <script type="text/javascript">
|
---|
| 79 | <xsl:text disable-output-escaping="yes">
|
---|
[25142] | 80 | de.onready(function()
|
---|
| 81 | {
|
---|
| 82 | try
|
---|
| 83 | {
|
---|
[24653] | 84 | de.init();
|
---|
| 85 | }
|
---|
[25142] | 86 | catch (err)
|
---|
| 87 | {
|
---|
[25001] | 88 | alert("Seaweed failed to initialise: " + err.message);
|
---|
[24653] | 89 | }
|
---|
| 90 | });
|
---|
| 91 | </xsl:text>
|
---|
| 92 | </script>
|
---|
| 93 | </xsl:template>
|
---|
| 94 |
|
---|
[23989] | 95 | <!-- ***** HEADER LAYOUT TEMPLATE ***** -->
|
---|
[25001] | 96 | <xsl:template name="create-banner">
|
---|
| 97 | <div id="gs_banner" class="ui-widget-header ui-corner-bottom">
|
---|
[26028] | 98 | <div id="titlesearchcontainer">
|
---|
| 99 | <xsl:call-template name="page-title-area"/>
|
---|
| 100 | <xsl:call-template name="quick-search-area"/>
|
---|
| 101 | <div style="clear:both;"><xsl:text> </xsl:text></div>
|
---|
| 102 | </div>
|
---|
[25001] | 103 | <xsl:call-template name="browsing-tabs"/>
|
---|
| 104 | </div>
|
---|
[23989] | 105 | </xsl:template>
|
---|
| 106 |
|
---|
| 107 | <!-- ***** BROWSING TABS ***** -->
|
---|
| 108 | <xsl:template name="browsing-tabs">
|
---|
| 109 | <xsl:if test="/page/pageResponse/collection[@name=$collNameChecked]/serviceList/service">
|
---|
[25935] | 110 | <ul id="gs-nav">
|
---|
[23989] | 111 | <!-- If this collection has a ClassifierBrowse service then add a tab for each classifier-->
|
---|
| 112 | <xsl:if test="/page/pageResponse/collection[@name=$collNameChecked]/serviceList/service[@type='browse' and @name='ClassifierBrowse']">
|
---|
| 113 | <!-- Loop through each classifier -->
|
---|
| 114 | <xsl:for-each select="/page/pageResponse/collection[@name=$collNameChecked]/serviceList/service[@name='ClassifierBrowse']/classifierList/classifier">
|
---|
[25001] | 115 | <li>
|
---|
| 116 | <xsl:choose>
|
---|
| 117 | <!-- If this tab is selected then colour it differently -->
|
---|
[25686] | 118 | <xsl:when test="util:contains(/page/pageRequest/paramList/param[@name = 'cl' and /page/pageRequest/@action = 'b']/@value, @name)">
|
---|
[25001] | 119 | <xsl:attribute name='class'>ui-state-default ui-corner-top ui-tabs-selected ui-state-active</xsl:attribute>
|
---|
| 120 | </xsl:when>
|
---|
| 121 | <xsl:otherwise>
|
---|
| 122 | <xsl:attribute name='class'>ui-state-default ui-corner-top</xsl:attribute>
|
---|
| 123 | </xsl:otherwise>
|
---|
| 124 | </xsl:choose>
|
---|
[23989] | 125 |
|
---|
[25001] | 126 | <a>
|
---|
[23989] | 127 | <!-- Add a title element to the <a> tag if a description exists for this classifier -->
|
---|
| 128 | <xsl:if test="displayItem[@name='description']">
|
---|
| 129 | <xsl:attribute name='title'><xsl:value-of select="displayItem[@name='description']"/></xsl:attribute>
|
---|
| 130 | </xsl:if>
|
---|
| 131 |
|
---|
| 132 | <!-- Add the href element to the <a> tag -->
|
---|
| 133 | <xsl:choose>
|
---|
| 134 | <xsl:when test="@name">
|
---|
[25436] | 135 | <xsl:attribute name="href"><xsl:value-of select="$library_name"/>/collection/<xsl:value-of select="/page/pageResponse/collection[@name=$collNameChecked]/@name"/>/browse/<xsl:value-of select="@name"/></xsl:attribute>
|
---|
[23989] | 136 | </xsl:when>
|
---|
| 137 | <xsl:otherwise>
|
---|
[25436] | 138 | <xsl:attribute name="href"><xsl:value-of select="$library_name"/>/collection/<xsl:value-of select="/page/pageResponse/collection[@name=$collNameChecked]/@name"/>/browse/1</xsl:attribute>
|
---|
[23989] | 139 | </xsl:otherwise>
|
---|
| 140 | </xsl:choose>
|
---|
| 141 |
|
---|
| 142 | <!-- Add the actual text of the <a> tag -->
|
---|
| 143 | <xsl:value-of select="displayItem[@name='name']"/>
|
---|
[25001] | 144 | </a>
|
---|
| 145 | </li>
|
---|
[23989] | 146 | </xsl:for-each>
|
---|
| 147 | </xsl:if>
|
---|
| 148 |
|
---|
[26133] | 149 | <!-- PhindApplet. Need something similar for the Collage applet too, probably -->
|
---|
| 150 | <xsl:for-each select="/page/pageResponse/collection[@name=$collNameChecked]/serviceList/service[@name='PhindApplet']">
|
---|
| 151 | <li>
|
---|
| 152 | <xsl:choose>
|
---|
| 153 | <!-- If this tab is selected then colour it differently -->
|
---|
| 154 | <xsl:when test="/page/pageRequest[@action='a']">
|
---|
| 155 | <xsl:attribute name='class'>ui-state-default ui-corner-top ui-tabs-selected ui-state-active</xsl:attribute>
|
---|
| 156 | </xsl:when>
|
---|
| 157 | <xsl:otherwise>
|
---|
| 158 | <xsl:attribute name='class'>ui-state-default ui-corner-top</xsl:attribute>
|
---|
| 159 | </xsl:otherwise>
|
---|
| 160 | </xsl:choose>
|
---|
| 161 |
|
---|
| 162 | <a>
|
---|
| 163 | <xsl:if test="displayItem[@name='description']">
|
---|
| 164 | <xsl:attribute name="title">
|
---|
| 165 | <xsl:value-of select="displayItem[@name='description']"/>
|
---|
| 166 | </xsl:attribute>
|
---|
| 167 | </xsl:if>
|
---|
| 168 | <xsl:attribute name="href"><xsl:value-of select="$library_name"/>?a=a&rt=d&s=<xsl:value-of select="@name"/>&c=<xsl:value-of select="/page/pageResponse/collection/@name"/></xsl:attribute>
|
---|
| 169 | <xsl:value-of select="displayItem[@name='name']"/>
|
---|
| 170 | </a>
|
---|
| 171 | </li>
|
---|
| 172 | </xsl:for-each>
|
---|
| 173 |
|
---|
[23989] | 174 | <!-- all other services -->
|
---|
[26133] | 175 | <xsl:for-each select="/page/pageResponse/collection[@name=$collNameChecked]/serviceList/service[not(@type='query') and not(@type='browse') and not (@name='PhindApplet')]">
|
---|
[23989] | 176 | <xsl:call-template name="navigationTab"/>
|
---|
| 177 | </xsl:for-each>
|
---|
| 178 | </ul>
|
---|
| 179 | </xsl:if>
|
---|
| 180 | </xsl:template>
|
---|
| 181 |
|
---|
[25001] | 182 | <!-- ***** HOME HELP PREFERENCES LOGIN ***** -->
|
---|
[23989] | 183 | <xsl:template name="home-help-preferences">
|
---|
[25278] | 184 | <ul id="bannerLinks">
|
---|
| 185 | <!-- preferences -->
|
---|
| 186 | <li class="ui-state-default ui-corner-all">
|
---|
[25436] | 187 | <a href="{$library_name}/collection/{$collNameChecked}/page/pref">
|
---|
[25278] | 188 | <xsl:attribute name="title"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'pref_tip')"/></xsl:attribute>
|
---|
| 189 | <ul>
|
---|
| 190 | <li><span><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'pref_b')"/></span></li>
|
---|
| 191 | <li><span class="ui-icon ui-icon-wrench"><xsl:text> </xsl:text></span></li>
|
---|
| 192 | </ul>
|
---|
| 193 | </a>
|
---|
| 194 | </li>
|
---|
[23989] | 195 |
|
---|
[25278] | 196 | <!-- help -->
|
---|
| 197 | <li class="ui-state-default ui-corner-all">
|
---|
[25436] | 198 | <a href="{$library_name}/collection/{$collNameChecked}/page/help">
|
---|
[25278] | 199 | <xsl:attribute name="title"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'help_tip')"/></xsl:attribute>
|
---|
| 200 | <ul>
|
---|
| 201 | <li><span><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'help_b')"/></span></li>
|
---|
| 202 | <li><span class="ui-icon ui-icon-help"><xsl:text> </xsl:text></span></li>
|
---|
| 203 | </ul>
|
---|
| 204 | </a>
|
---|
| 205 | </li>
|
---|
| 206 |
|
---|
| 207 | <!-- login/logout -->
|
---|
| 208 | <li class="ui-state-default ui-corner-all" id="userMenuButton">
|
---|
| 209 | <xsl:choose>
|
---|
| 210 | <xsl:when test="/page/pageRequest/userInformation/@username">
|
---|
| 211 | <a>
|
---|
| 212 | <xsl:attribute name="href">javascript:toggleUserMenu();</xsl:attribute>
|
---|
| 213 | <script type="text/javascript">
|
---|
| 214 | <xsl:text disable-output-escaping="yes">
|
---|
| 215 | function toggleUserMenu()
|
---|
| 216 | {
|
---|
| 217 | var button = $("#userMenuButton");
|
---|
| 218 | var menu;
|
---|
[23989] | 219 |
|
---|
[25278] | 220 | if(button.data("userMenu"))
|
---|
| 221 | {
|
---|
| 222 | menu = button.data("userMenu");
|
---|
| 223 | if(menu.css("display") == "block")
|
---|
| 224 | {
|
---|
| 225 | menu.hide();
|
---|
| 226 | }
|
---|
| 227 | else
|
---|
| 228 | {
|
---|
| 229 | menu.show();
|
---|
| 230 | }
|
---|
| 231 | }
|
---|
| 232 | else
|
---|
| 233 | {
|
---|
| 234 | menu = $("<UL>")
|
---|
| 235 | .css("position", "absolute")
|
---|
| 236 | .css("display", "block")
|
---|
| 237 | .css("z-index", "100")
|
---|
| 238 | .css("list-style", "none outside none")
|
---|
| 239 | .css("margin-left", "0px")
|
---|
| 240 | .css("padding", "0px")
|
---|
| 241 | .css("font-size", "90%");
|
---|
[26120] | 242 |
|
---|
| 243 | menu.attr("id", "userMenu");
|
---|
[25278] | 244 |
|
---|
| 245 | button.data("userMenu", menu);
|
---|
| 246 |
|
---|
| 247 | var settingsLink = $("<a>")
|
---|
| 248 | .attr("href", gs.xsltParams.library_name + "/admin/AccountSettings?s1.username=</xsl:text><xsl:value-of select="/page/pageRequest/userInformation/@username"/><xsl:text disable-output-escaping="yes">");
|
---|
| 249 | var settingsButton = $("<LI>")
|
---|
| 250 | .css("padding", "3px")
|
---|
| 251 | .html("Account settings")
|
---|
| 252 | .addClass("ui-state-default");
|
---|
| 253 | settingsLink.append(settingsButton);
|
---|
| 254 |
|
---|
| 255 | var url = document.URL;
|
---|
| 256 | var hasQueryString = (url.indexOf("?") != -1);
|
---|
| 257 | var hashIndex = url.indexOf("#");
|
---|
| 258 |
|
---|
| 259 | var hashPart;
|
---|
| 260 | if(hashIndex != -1)
|
---|
| 261 | {
|
---|
| 262 | hashPart = url.substring(hashIndex);
|
---|
| 263 | url = url.substring(0, hashIndex);
|
---|
| 264 | }
|
---|
| 265 |
|
---|
| 266 | var logoutLink = $("<a>")
|
---|
| 267 | .attr("href", url + (hasQueryString ? "&" : "?") + "logout=" + (hashPart ? hashPart : ""));
|
---|
| 268 | var logoutButton = $("<LI>")
|
---|
| 269 | .css("padding", "3px")
|
---|
| 270 | .html("Logout")
|
---|
| 271 | .addClass("ui-state-default");
|
---|
| 272 | logoutLink.append(logoutButton);
|
---|
| 273 |
|
---|
| 274 | menu.append(settingsLink);
|
---|
| 275 | menu.append(logoutLink);
|
---|
| 276 |
|
---|
| 277 | var buttonLeft = button.offset().left;
|
---|
| 278 | var buttonTop = button.offset().top;
|
---|
| 279 | var buttonHeight = button.height();
|
---|
| 280 |
|
---|
| 281 | menu.offset({top: buttonTop + buttonHeight + 4, left: buttonLeft});
|
---|
| 282 | $("#topArea").append(menu);
|
---|
| 283 | }
|
---|
| 284 | }
|
---|
| 285 | </xsl:text>
|
---|
| 286 | </script>
|
---|
| 287 | <ul>
|
---|
| 288 | <li><span><xsl:value-of select="/page/pageRequest/userInformation/@username"/></span></li>
|
---|
| 289 | <li><span class="ui-icon ui-icon-unlocked"><xsl:text> </xsl:text></span></li>
|
---|
| 290 | </ul>
|
---|
| 291 | </a>
|
---|
| 292 | </xsl:when>
|
---|
| 293 | <xsl:otherwise>
|
---|
| 294 | <a>
|
---|
| 295 | <xsl:attribute name="href">
|
---|
| 296 | <xsl:value-of select="$library_name"/>
|
---|
| 297 | <xsl:text>?a=p&sa=login&redirectURL=</xsl:text>
|
---|
| 298 | <xsl:value-of select="$library_name"/>
|
---|
| 299 | <xsl:text>%3F</xsl:text>
|
---|
| 300 | <xsl:if test="/page/pageRequest/@action">
|
---|
| 301 | <xsl:text>a=</xsl:text>
|
---|
| 302 | <xsl:value-of select="/page/pageRequest/@action"/>
|
---|
| 303 | </xsl:if>
|
---|
| 304 | <xsl:if test="/page/pageRequest/@subaction">
|
---|
| 305 | <xsl:text>%26sa=</xsl:text>
|
---|
| 306 | <xsl:value-of select="/page/pageRequest/@subaction"/>
|
---|
| 307 | </xsl:if>
|
---|
| 308 | <xsl:for-each select="/page/pageRequest/paramList/param">
|
---|
| 309 | <xsl:if test="@name != 'password' and @name != 's1.password' and @name != 's1.newPassword' and @name != 's1.oldPassword'">
|
---|
[25123] | 310 | <xsl:text>%26</xsl:text>
|
---|
| 311 | <xsl:value-of select="@name"/>
|
---|
| 312 | <xsl:text>=</xsl:text>
|
---|
| 313 | <xsl:value-of select="@value"/>
|
---|
[25278] | 314 | </xsl:if>
|
---|
| 315 | </xsl:for-each>
|
---|
| 316 | </xsl:attribute>
|
---|
| 317 | <xsl:attribute name="title"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'login_tip')"/></xsl:attribute>
|
---|
| 318 | <ul>
|
---|
| 319 | <li><span><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'login_b')"/></span></li>
|
---|
| 320 | <li><span class="ui-icon ui-icon-locked"><xsl:text> </xsl:text></span></li>
|
---|
| 321 | </ul>
|
---|
| 322 | </a>
|
---|
| 323 | </xsl:otherwise>
|
---|
| 324 | </xsl:choose>
|
---|
| 325 | </li>
|
---|
[25469] | 326 | <!-- debuginfo (doesn't use class="ui-state-error" since the text is not legible due to inherited text-colour) -->
|
---|
| 327 | <xsl:if test="/page/pageRequest/paramList/param[(@name='debug') and (@value='on' or @value='true' or @value='1')]">
|
---|
[25457] | 328 | <li class="ui-state-default ui-corner-all">
|
---|
[25950] | 329 | <a href="{$library_name}/collection/{$collNameChecked}/page/debug">
|
---|
[25457] | 330 | <xsl:attribute name="title"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'debuginfo_tip')"/></xsl:attribute>
|
---|
| 331 | <ul>
|
---|
| 332 | <li><span><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'debuginfo_b')"/></span></li>
|
---|
| 333 | <li><span class="ui-icon ui-icon-info"><xsl:text> </xsl:text></span></li>
|
---|
| 334 | </ul>
|
---|
| 335 | </a>
|
---|
| 336 | </li>
|
---|
| 337 | </xsl:if>
|
---|
[25278] | 338 | </ul>
|
---|
[23989] | 339 | </xsl:template>
|
---|
| 340 |
|
---|
| 341 | <!-- ***** PAGE TITLE ***** -->
|
---|
| 342 | <xsl:template name="page-title-area">
|
---|
| 343 | <xsl:variable name="pageTitleVar"><xsl:call-template name="pageTitle"/></xsl:variable>
|
---|
[26028] | 344 | <div id="titlearea">
|
---|
[23989] | 345 | <h2>
|
---|
[24420] | 346 | <!-- Resize the title based on how long it is (There's probably a better way to do this) -->
|
---|
[23989] | 347 | <xsl:attribute name="style">
|
---|
| 348 | <xsl:choose>
|
---|
| 349 | <xsl:when test="string-length($pageTitleVar) < 20">
|
---|
[25001] | 350 | <xsl:text>font-size: 1.5em;</xsl:text>
|
---|
[23989] | 351 | </xsl:when>
|
---|
| 352 | <xsl:when test="string-length($pageTitleVar) < 30">
|
---|
[25001] | 353 | <xsl:text>font-size: 1.4em;</xsl:text>
|
---|
[23989] | 354 | </xsl:when>
|
---|
| 355 | <xsl:when test="string-length($pageTitleVar) < 40">
|
---|
[25001] | 356 | <xsl:text>font-size: 1.3em;</xsl:text>
|
---|
[23989] | 357 | </xsl:when>
|
---|
| 358 | <xsl:when test="string-length($pageTitleVar) < 50">
|
---|
[25001] | 359 | <xsl:text>font-size: 1.2em;</xsl:text>
|
---|
[23989] | 360 | </xsl:when>
|
---|
| 361 | <xsl:when test="string-length($pageTitleVar) < 60">
|
---|
[25001] | 362 | <xsl:text>font-size: 1.1em;</xsl:text>
|
---|
[23989] | 363 | </xsl:when>
|
---|
| 364 | <xsl:when test="string-length($pageTitleVar) < 70">
|
---|
[25001] | 365 | <xsl:text>font-size: 1em;</xsl:text>
|
---|
[23989] | 366 | </xsl:when>
|
---|
| 367 | <xsl:when test="string-length($pageTitleVar) < 80">
|
---|
[25001] | 368 | <xsl:text>font-size: 0.9em;</xsl:text>
|
---|
[23989] | 369 | </xsl:when>
|
---|
| 370 | <xsl:when test="string-length($pageTitleVar) < 90">
|
---|
[25001] | 371 | <xsl:text>font-size: 0.8em;</xsl:text>
|
---|
[23989] | 372 | </xsl:when>
|
---|
| 373 | <xsl:otherwise>
|
---|
[25001] | 374 | <xsl:text>font-size: 0.7em;</xsl:text>
|
---|
[23989] | 375 | </xsl:otherwise>
|
---|
| 376 | </xsl:choose>
|
---|
| 377 | </xsl:attribute>
|
---|
| 378 | <!--<xsl:value-of select="string-length($pageTitleVar)" />-->
|
---|
| 379 | <xsl:value-of select="$pageTitleVar" />
|
---|
[26028] | 380 | </h2><xsl:text> </xsl:text>
|
---|
| 381 | </div>
|
---|
[23989] | 382 | </xsl:template>
|
---|
| 383 |
|
---|
| 384 | <!-- ***** QUICK SEARCH AREA ***** -->
|
---|
[25774] | 385 | <!-- Search form should only appear if there's a search (query) service AND it has an index.
|
---|
| 386 | By default, all collections end up with some query service (default is MGPP) even when they have
|
---|
[26057] | 387 | no search indexes, which is why the extra test for the presence of an index/fq-something is necessary. -->
|
---|
[23989] | 388 | <xsl:template name="quick-search-area">
|
---|
[26094] | 389 | <xsl:if test="/page/pageResponse/collection[@name=$collNameChecked]/serviceList/service[@type='query']">
|
---|
[23989] | 390 | <xsl:variable name="subaction" select="/page/pageRequest/@subaction"/>
|
---|
[26028] | 391 | <div id="quicksearcharea">
|
---|
[26094] | 392 | <xsl:if test="/page/pageResponse/collection[@name=$collNameChecked]/serviceList/service[@name='TextQuery']">
|
---|
[26120] | 393 | <form action="{$library_name}/collection/{$collNameChecked}/search/TextQuery">
|
---|
| 394 | <!-- This parameter says that we have come from the quick search area -->
|
---|
| 395 | <input type="hidden" name="qs" value="1"/>
|
---|
| 396 | <input type="hidden" name="rt" value="rd"/>
|
---|
| 397 | <input type="hidden" name="s1.level">
|
---|
| 398 | <xsl:attribute name="value">
|
---|
| 399 | <xsl:choose>
|
---|
| 400 | <xsl:when test="/page/pageRequest/paramList/param[@name = 's1.level']">
|
---|
| 401 | <xsl:value-of select="/page/pageRequest/paramList/param[@name = 's1.level']/@value"/>
|
---|
| 402 | </xsl:when>
|
---|
| 403 | <xsl:otherwise>
|
---|
| 404 | <xsl:text>Sec</xsl:text>
|
---|
| 405 | </xsl:otherwise>
|
---|
| 406 | </xsl:choose>
|
---|
| 407 | </xsl:attribute>
|
---|
| 408 | </input>
|
---|
| 409 | <xsl:choose>
|
---|
| 410 | <xsl:when test="/page/pageResponse/service[@name = 'TextQuery']/paramList/param[@name = 'startPage']">
|
---|
| 411 | <input type="hidden" name="s1.startPage" value="1"/>
|
---|
| 412 | </xsl:when>
|
---|
| 413 | <xsl:otherwise>
|
---|
| 414 | <input type="hidden" name="startPage" value="1"/>
|
---|
| 415 | </xsl:otherwise>
|
---|
| 416 | </xsl:choose>
|
---|
| 417 | <xsl:if test="not(/page/pageRequest/paramList/param[@name = 's1.hitsPerPage'])">
|
---|
| 418 | <input type="hidden" name="s1.hitsPerPage" value="20"/>
|
---|
| 419 | </xsl:if>
|
---|
| 420 | <xsl:if test="not(/page/pageRequest/paramList/param[@name = 's1.maxDocs'])">
|
---|
| 421 | <input type="hidden" name="s1.maxDocs" value="100"/>
|
---|
| 422 | </xsl:if>
|
---|
| 423 | <!-- The query text box -->
|
---|
| 424 | <span class="querybox">
|
---|
| 425 | <xsl:variable name="qs">
|
---|
| 426 | <xsl:apply-templates select="/page/pageResponse/collection[@name=$collNameChecked]/serviceList/service[@name='TextQuery']/paramList/param[@name='query']" mode="calculate-default"/>
|
---|
| 427 | </xsl:variable>
|
---|
| 428 | <nobr>
|
---|
| 429 | <xsl:apply-templates select="/page/pageResponse/collection[@name=$collNameChecked]/serviceList/service[@name='TextQuery']/paramList/param[@name='query']">
|
---|
| 430 | <xsl:with-param name="default" select="java:org.greenstone.gsdl3.util.XSLTUtil.tidyWhitespace($qs, /page/@lang)"/>
|
---|
| 431 | </xsl:apply-templates>
|
---|
| 432 | </nobr>
|
---|
[23989] | 433 | </span>
|
---|
[26120] | 434 | <!-- The index selection list -->
|
---|
| 435 | <xsl:if test="/page/pageResponse/collection[@name=$collNameChecked]/serviceList/service[@name='TextQuery']/paramList/param[@name='index']/@type = 'enum_single'">
|
---|
| 436 | <span class="textselect">
|
---|
| 437 | <xsl:apply-templates select="/page/pageResponse/collection[@name=$collNameChecked]/serviceList/service[@name='TextQuery']/paramList/param[@name='index']">
|
---|
| 438 | <xsl:with-param name="default">
|
---|
| 439 | <xsl:apply-templates select="/page/pageResponse/collection[@name=$collNameChecked]/serviceList/service[@name='TextQuery']/paramList/param[@name='index']" mode="calculate-default"/>
|
---|
| 440 | </xsl:with-param>
|
---|
| 441 | </xsl:apply-templates>
|
---|
| 442 | </span>
|
---|
| 443 | </xsl:if>
|
---|
| 444 | <!-- The submit button (for TextQuery) -->
|
---|
| 445 | <xsl:if test="/page/pageResponse/collection[@name=$collNameChecked]/serviceList/service[@name='TextQuery']">
|
---|
| 446 | <input type="submit" id="quickSearchSubmitButton">
|
---|
| 447 | <xsl:attribute name="value">
|
---|
| 448 | <xsl:value-of select="/page/pageResponse/collection[@name=$collNameChecked]/serviceList/service[@name='TextQuery']/displayItem[@name='submit']"/>
|
---|
| 449 | </xsl:attribute>
|
---|
| 450 | </input>
|
---|
| 451 | <br/>
|
---|
| 452 | </xsl:if>
|
---|
| 453 | </form>
|
---|
[26094] | 454 | </xsl:if>
|
---|
[26120] | 455 | <!-- The list of other search types -->
|
---|
| 456 | <ul>
|
---|
| 457 | <xsl:for-each select="/page/pageResponse/collection[@name=$collNameChecked]/serviceList/service[@type='query']">
|
---|
| 458 | <li class="ui-state-default ui-corner-all">
|
---|
| 459 | <a>
|
---|
| 460 | <xsl:attribute name="href">
|
---|
| 461 | <xsl:value-of select="$library_name"/>/collection/<xsl:value-of select="$collNameChecked"/>/search/<xsl:value-of select="@name"/>
|
---|
| 462 | </xsl:attribute>
|
---|
| 463 | <xsl:value-of select="displayItem[@name='name']"/>
|
---|
| 464 | </a>
|
---|
| 465 | </li>
|
---|
| 466 | </xsl:for-each>
|
---|
| 467 | </ul>
|
---|
[26028] | 468 | </div>
|
---|
[23989] | 469 | </xsl:if>
|
---|
| 470 | </xsl:template>
|
---|
[25294] | 471 |
|
---|
[25001] | 472 | <xsl:template name="map-scripts">
|
---|
| 473 | <meta content="initial-scale=1.0, user-scalable=no" name="viewport"/>
|
---|
| 474 | <script src="http://maps.googleapis.com/maps/api/js?sensor=false" type="text/javascript"><xsl:text> </xsl:text></script>
|
---|
[25024] | 475 | <script src="interfaces/{$interface_name}/js/map-scripts.js" type="text/javascript"><xsl:text> </xsl:text></script>
|
---|
[25001] | 476 | <script type="text/javascript">$(window).load(initializeMapScripts);</script>
|
---|
| 477 | </xsl:template>
|
---|
[24137] | 478 | </xsl:stylesheet>
|
---|