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