[26461] | 1 | <?xml version="1.0" encoding="UTF-8"?>
|
---|
[23989] | 2 | <xsl:stylesheet version="1.0"
|
---|
[31240] | 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"
|
---|
| 7 | xmlns:gsf="http://www.greenstone.org/greenstone3/schema/ConfigFormat"
|
---|
| 8 | extension-element-prefixes="java util"
|
---|
| 9 | exclude-result-prefixes="java util gsf">
|
---|
| 10 |
|
---|
[31654] | 11 | <xsl:include href="../shared-templates.xsl"/>
|
---|
[31240] | 12 | <xsl:include href="../javascript-global-setup.xsl"/>
|
---|
| 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 |
|
---|
| 26 | <!-- Creates a header for the html page -->
|
---|
| 27 | <xsl:template name="create-html-header">
|
---|
| 28 | <base>
|
---|
| 29 | <xsl:attribute name="href">
|
---|
| 30 | <xsl:choose>
|
---|
| 31 | <xsl:when test="/page/pageResponse/metadataList/metadata[@name = 'siteURL']">
|
---|
| 32 | <xsl:value-of select="/page/pageResponse/metadataList/metadata[@name = 'siteURL']"/>
|
---|
| 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>
|
---|
| 40 | <xsl:comment>[if lte IE 6]></base><![endif]</xsl:comment>
|
---|
[32046] | 41 |
|
---|
| 42 | <xsl:variable name="page"><xsl:call-template name="pageTitle"/></xsl:variable>
|
---|
| 43 | <xsl:variable name="collection"><xsl:call-template name="collectionName"/></xsl:variable>
|
---|
| 44 | <xsl:variable name="site"><xsl:call-template name="siteName"/></xsl:variable>
|
---|
| 45 | <title><xsl:value-of select="$page"/><xsl:if test="$collection != '' and $page != $collection"> :: <xsl:value-of select="$collection"/></xsl:if><xsl:if test="$page != $site"> :: <xsl:value-of select="$site"/></xsl:if></title>
|
---|
[31240] | 46 |
|
---|
| 47 | <xsl:if test="/page/pageRequest/@action ='d'">
|
---|
| 48 |
|
---|
| 49 | <xsl:variable name="myMetadataHeader" select="/page/pageResponse/format/gsf:headMetaTags/gsf:metadata"/>
|
---|
| 50 | <xsl:for-each select="$myMetadataHeader">
|
---|
| 51 | <xsl:variable name="metaname" select="@name"/>
|
---|
[23989] | 52 |
|
---|
[31240] | 53 | <xsl:variable name="metavals"
|
---|
| 54 | select="/page/pageResponse/document/metadataList/metadata[@name = $metaname]|/page/pageResponse/document/documentNode/metadataList/metadata[@name = $metaname]"/>
|
---|
| 55 | <xsl:for-each select="$metavals">
|
---|
| 56 | <META NAME="{$metaname}" CONTENT="{.}"/>
|
---|
| 57 | </xsl:for-each>
|
---|
| 58 | </xsl:for-each>
|
---|
| 59 |
|
---|
| 60 | </xsl:if>
|
---|
[26502] | 61 |
|
---|
[31240] | 62 | <xsl:choose>
|
---|
| 63 | <xsl:when test="/page/pageResponse/interfaceOptions/option[@name = 'cssTheme']/@value">
|
---|
| 64 | <!-- Get the theme from the interfaceConfig.xml file -->
|
---|
| 65 | <link rel="stylesheet" href="{/page/pageResponse/interfaceOptions/option[@name = 'cssTheme']/@value}" type="text/css"/>
|
---|
| 66 | </xsl:when>
|
---|
| 67 | <xsl:otherwise>
|
---|
| 68 | <link rel="stylesheet" href="interfaces/{$interface_name}/style/themes/main/jquery-ui-1.8.16.custom.css" type="text/css"/>
|
---|
| 69 | </xsl:otherwise>
|
---|
| 70 | </xsl:choose>
|
---|
| 71 | <link rel="stylesheet" href="interfaces/{$interface_name}/style/core.css" type="text/css"/>
|
---|
| 72 | <link rel="shortcut icon" href="interfaces/{$interface_name}/images/favicon.ico"/>
|
---|
| 73 |
|
---|
| 74 | <script type="text/javascript" src="interfaces/{$interface_name}/js/jquery.min.js"><xsl:text> </xsl:text></script>
|
---|
| 75 | <script type="text/javascript" src="interfaces/{$interface_name}/js/jquery-ui-1.10.2.custom/js/jquery-ui-1.10.2.custom.min.js"><xsl:text> </xsl:text></script>
|
---|
| 76 | <script type="text/javascript" src="interfaces/{$interface_name}/js/jquery.blockUI.js"><xsl:text> </xsl:text></script>
|
---|
| 77 | <script type="text/javascript" src="interfaces/{$interface_name}/js/ace/ace.js"><xsl:text> </xsl:text></script>
|
---|
| 78 |
|
---|
| 79 | <script type="text/javascript" src="interfaces/{$interface_name}/js/zoomer.js"><xsl:text> </xsl:text></script>
|
---|
[25686] | 80 |
|
---|
[31240] | 81 | <xsl:if test="/page/pageResponse/format[@type='display' or @type='browse' or @type='search']/gsf:option[@name='mapEnabled']/@value = 'true'">
|
---|
| 82 | <xsl:call-template name="map-scripts"/>
|
---|
| 83 | </xsl:if>
|
---|
| 84 |
|
---|
| 85 | <xsl:if test="/page/pageResponse/format/gsf:option[@name='mapEnabledOpenLayers']/@value = 'true'">
|
---|
| 86 | <xsl:call-template name="openlayers-map-scripts"/>
|
---|
| 87 | </xsl:if>
|
---|
[26871] | 88 |
|
---|
| 89 |
|
---|
[31240] | 90 | <xsl:if test="/page/pageResponse/format/gsf:option[@name='panoramaViewerEnabled']/@value = 'true'">
|
---|
| 91 | <xsl:call-template name="panoramaViewer-scripts"/>
|
---|
| 92 | </xsl:if>
|
---|
[26871] | 93 |
|
---|
[31240] | 94 | <xsl:if test="/page/pageRequest/userInformation and /page/pageRequest/userInformation/@editEnabled = 'true' and (util:contains(/page/pageRequest/userInformation/@groups, 'administrator') or util:contains(/page/pageRequest/userInformation/@groups, 'all-collections-editor') or util:contains(/page/pageRequest/userInformation/@groups, $thisCollectionEditor))">
|
---|
| 95 | <xsl:if test="/page/pageRequest/paramList/param[(@name='docEdit') and (@value='on' or @value='true' or @value='1')]">
|
---|
| 96 | <script type="text/javascript" src="interfaces/{$interface_name}/js/ckeditor/ckeditor.js" defer="true"><xsl:text> </xsl:text></script>
|
---|
[29861] | 97 | <!-- <xsl:call-template name="init-direct-edit"/> -->
|
---|
[31240] | 98 | </xsl:if>
|
---|
| 99 | <script type="text/javascript" src="interfaces/{$interface_name}/js/debug_scripts.js"><xsl:text> </xsl:text></script>
|
---|
| 100 | <script type="text/javascript" src="interfaces/{$interface_name}/js/visual-xml-editor.js"><xsl:text> </xsl:text></script>
|
---|
| 101 | </xsl:if>
|
---|
| 102 |
|
---|
| 103 | <xsl:call-template name="setup-gs-variable"/>
|
---|
| 104 | <xsl:if test="/page/pageRequest/@action ='p' and /page/pageRequest/@subaction='pref'">
|
---|
| 105 | <script type="text/javascript">
|
---|
| 106 | <xsl:value-of disable-output-escaping="yes" select="util:getInterfaceStringsAsJavascript($interface_name, /page/@lang, 'pref')"/>
|
---|
| 107 | </script>
|
---|
| 108 | <script type="text/javascript" src="interfaces/{$interface_name}/js/jquery.themeswitcher.min.js"><xsl:text> </xsl:text></script>
|
---|
| 109 | </xsl:if>
|
---|
| 110 | <xsl:call-template name="define-js-macro-variables"/>
|
---|
[26502] | 111 |
|
---|
[31240] | 112 | <xsl:call-template name="additionalHeaderContent"/>
|
---|
| 113 | </xsl:template>
|
---|
| 114 |
|
---|
| 115 | <!-- This template allows for extra header content to be added by interface, site and collection. -->
|
---|
| 116 | <xsl:template name="additionalHeaderContent">
|
---|
| 117 | <xsl:call-template name="additionalHeaderContent-interface"/>
|
---|
| 118 | <xsl:call-template name="additionalHeaderContent-site"/>
|
---|
| 119 | <xsl:call-template name="additionalHeaderContent-collection"/>
|
---|
| 120 | </xsl:template>
|
---|
| 121 | <!-- This template should be overridden in header.xsl of a new interface file if you want to add extra header content -->
|
---|
| 122 | <xsl:template name="additionalHeaderContent-interface">
|
---|
| 123 | </xsl:template>
|
---|
| 124 | <!-- This template should be overridden in the header.xsl file in a site's transform directory if you want to add site specific headers -->
|
---|
| 125 | <xsl:template name="additionalHeaderContent-site">
|
---|
| 126 | </xsl:template>
|
---|
| 127 | <!-- This template should be overridden in the collectionConfig.xml file if you want to add extra header content -->
|
---|
| 128 | <xsl:template name="additionalHeaderContent-collection">
|
---|
| 129 | </xsl:template>
|
---|
[30428] | 130 |
|
---|
[31240] | 131 | <xsl:template name="init-direct-edit">
|
---|
| 132 | <!-- might be worth moving loading the JS file to earlier, to give time to load -->
|
---|
| 133 | <script type="text/javascript" src="interfaces/{$interface_name}/js/direct-edit.js"><xsl:text> </xsl:text></script>
|
---|
| 134 | <script type="text/javascript">
|
---|
| 135 | <xsl:text disable-output-escaping="yes">
|
---|
| 136 | $(document).ready(function() {
|
---|
| 137 | de.onready(function()
|
---|
| 138 | {
|
---|
| 139 | try
|
---|
| 140 | {
|
---|
| 141 | de.init();
|
---|
| 142 | }
|
---|
| 143 | catch (err)
|
---|
| 144 | {
|
---|
| 145 | alert("Seaweed failed to initialise: " + err.message);
|
---|
| 146 | }
|
---|
| 147 | });
|
---|
| 148 | });
|
---|
| 149 | </xsl:text>
|
---|
| 150 | </script>
|
---|
| 151 | </xsl:template>
|
---|
[30428] | 152 |
|
---|
[31240] | 153 |
|
---|
| 154 | <!-- ***** HEADER LAYOUT TEMPLATE ***** -->
|
---|
| 155 | <xsl:template name="create-banner">
|
---|
| 156 | <div id="gs_banner" class="ui-widget-header ui-corner-bottom">
|
---|
| 157 | <div id="titlesearchcontainer">
|
---|
| 158 | <xsl:call-template name="page-title-area"/>
|
---|
| 159 | <xsl:call-template name="quick-search-area"/>
|
---|
| 160 | <div style="clear:both;"><xsl:text> </xsl:text></div>
|
---|
| 161 | </div>
|
---|
| 162 | <xsl:call-template name="browsing-tabs"/>
|
---|
| 163 | </div>
|
---|
| 164 | </xsl:template>
|
---|
| 165 |
|
---|
| 166 | <xsl:template name="additionalNavTabs">
|
---|
| 167 | <xsl:for-each select="/page/pageResponse/collection[@name=$collNameChecked]/extraInfo/navigationTab">
|
---|
| 168 | <li>
|
---|
| 169 | <xsl:choose>
|
---|
| 170 | <!-- if we are in frame type and this is the current page, colour it differently-->
|
---|
| 171 | <xsl:when test="@type='frame' and /page/pageRequest[@subaction='html'] and /page/pageRequest/paramList/param[@name='url']/@value = @url">
|
---|
| 172 | <xsl:attribute name='class'>ui-state-default ui-corner-top ui-tabs-selected ui-state-active</xsl:attribute>
|
---|
| 173 | </xsl:when>
|
---|
| 174 | <xsl:otherwise>
|
---|
| 175 | <xsl:attribute name="class">ui-state-default ui-corner-top</xsl:attribute>
|
---|
| 176 | </xsl:otherwise>
|
---|
| 177 | </xsl:choose>
|
---|
| 178 | <a>
|
---|
| 179 | <xsl:if test="displayItem[@name='description']">
|
---|
| 180 | <xsl:attribute name='title'><xsl:value-of select="displayItem[@name='description']"/></xsl:attribute>
|
---|
| 181 | </xsl:if>
|
---|
| 182 | <xsl:choose>
|
---|
| 183 | <xsl:when test="@type='external-link'">
|
---|
| 184 | <xsl:attribute name="href"><xsl:value-of select="@url"/></xsl:attribute>
|
---|
| 185 | </xsl:when>
|
---|
| 186 | <xsl:when test="@type='frame'">
|
---|
| 187 | <xsl:attribute name="href"><xsl:value-of select="$library_name"/>/collection/<xsl:value-of select="/page/pageResponse/collection[@name=$collNameChecked]/@name"/>/page/html?url=<xsl:value-of select="@url"/></xsl:attribute>
|
---|
| 188 | </xsl:when>
|
---|
| 189 | </xsl:choose>
|
---|
| 190 | <xsl:choose>
|
---|
| 191 | <xsl:when test="displayItem[@name='name']">
|
---|
| 192 | <xsl:value-of select="displayItem[@name='name']"/>
|
---|
| 193 | </xsl:when>
|
---|
| 194 | <xsl:otherwise>link</xsl:otherwise>
|
---|
| 195 | </xsl:choose>
|
---|
| 196 | </a>
|
---|
| 197 | </li>
|
---|
| 198 | </xsl:for-each>
|
---|
| 199 |
|
---|
| 200 | </xsl:template>
|
---|
| 201 | <!-- ***** BROWSING TABS ***** -->
|
---|
| 202 | <xsl:template name="browsing-tabs">
|
---|
| 203 | <xsl:if test="/page/pageResponse/collection[@name=$collNameChecked]/serviceList/service or /page/pageResponse/collection[@name=$collNameChecked]/extraInfo/navigationTab">
|
---|
| 204 | <ul id="gs-nav">
|
---|
| 205 | <!-- if this collection has additional tabs, add them here -->
|
---|
| 206 | <xsl:call-template name="additionalNavTabs"/>
|
---|
| 207 | <!-- If this collection has a ClassifierBrowse service then add a tab for each classifier-->
|
---|
| 208 | <xsl:if test="/page/pageResponse/collection[@name=$collNameChecked]/serviceList/service[@type='browse' and @name='ClassifierBrowse']">
|
---|
| 209 | <!-- Loop through each classifier -->
|
---|
| 210 | <xsl:for-each select="/page/pageResponse/collection[@name=$collNameChecked]/serviceList/service[@name='ClassifierBrowse']/classifierList/classifier">
|
---|
[30559] | 211 | <li>
|
---|
| 212 | <xsl:choose>
|
---|
[31240] | 213 | <!-- If this tab is selected then colour it differently -->
|
---|
| 214 | <xsl:when test="util:contains(/page/pageRequest/paramList/param[@name = 'cl' and /page/pageRequest/@action = 'b']/@value, @name)">
|
---|
[30559] | 215 | <xsl:attribute name='class'>ui-state-default ui-corner-top ui-tabs-selected ui-state-active</xsl:attribute>
|
---|
| 216 | </xsl:when>
|
---|
| 217 | <xsl:otherwise>
|
---|
[31240] | 218 | <xsl:attribute name='class'>ui-state-default ui-corner-top</xsl:attribute>
|
---|
[30559] | 219 | </xsl:otherwise>
|
---|
| 220 | </xsl:choose>
|
---|
[31240] | 221 |
|
---|
[30559] | 222 | <a>
|
---|
[31240] | 223 | <!-- Add a title element to the <a> tag if a description exists for this classifier -->
|
---|
[30559] | 224 | <xsl:if test="displayItem[@name='description']">
|
---|
| 225 | <xsl:attribute name='title'><xsl:value-of select="displayItem[@name='description']"/></xsl:attribute>
|
---|
| 226 | </xsl:if>
|
---|
[31240] | 227 |
|
---|
| 228 | <!-- Add the href element to the <a> tag -->
|
---|
[30559] | 229 | <xsl:choose>
|
---|
[31240] | 230 | <xsl:when test="@name">
|
---|
| 231 | <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>
|
---|
[30559] | 232 | </xsl:when>
|
---|
[31240] | 233 | <xsl:otherwise>
|
---|
| 234 | <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>
|
---|
| 235 | </xsl:otherwise>
|
---|
[30559] | 236 | </xsl:choose>
|
---|
[31240] | 237 |
|
---|
| 238 | <!-- Add the actual text of the <a> tag -->
|
---|
| 239 | <xsl:value-of select="displayItem[@name='name']"/>
|
---|
[30559] | 240 | </a>
|
---|
| 241 | </li>
|
---|
| 242 | </xsl:for-each>
|
---|
[31240] | 243 | </xsl:if>
|
---|
[23989] | 244 |
|
---|
[31240] | 245 | <!-- PhindApplet. Need something similar for the Collage applet too, probably -->
|
---|
| 246 | <xsl:for-each select="/page/pageResponse/collection[@name=$collNameChecked]/serviceList/service[@name='PhindApplet']">
|
---|
| 247 | <li>
|
---|
| 248 | <xsl:choose>
|
---|
| 249 | <!-- If this tab is selected then colour it differently -->
|
---|
| 250 | <xsl:when test="/page/pageRequest[@action='a']">
|
---|
| 251 | <xsl:attribute name='class'>ui-state-default ui-corner-top ui-tabs-selected ui-state-active</xsl:attribute>
|
---|
| 252 | </xsl:when>
|
---|
| 253 | <xsl:otherwise>
|
---|
| 254 | <xsl:attribute name='class'>ui-state-default ui-corner-top</xsl:attribute>
|
---|
| 255 | </xsl:otherwise>
|
---|
| 256 | </xsl:choose>
|
---|
| 257 |
|
---|
| 258 | <a>
|
---|
| 259 | <xsl:if test="displayItem[@name='description']">
|
---|
| 260 | <xsl:attribute name="title">
|
---|
| 261 | <xsl:value-of select="displayItem[@name='description']"/>
|
---|
| 262 | </xsl:attribute>
|
---|
| 263 | </xsl:if>
|
---|
| 264 | <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>
|
---|
| 265 | <xsl:value-of select="displayItem[@name='name']"/>
|
---|
| 266 | </a>
|
---|
| 267 | </li>
|
---|
| 268 | </xsl:for-each>
|
---|
[23989] | 269 |
|
---|
[31240] | 270 | <!-- all other services -->
|
---|
| 271 | <xsl:for-each select="/page/pageResponse/collection[@name=$collNameChecked]/serviceList/service[not(@type='query') and not(@type='browse') and not (@name='PhindApplet')]">
|
---|
| 272 | <xsl:call-template name="navigationTab"/>
|
---|
| 273 | </xsl:for-each>
|
---|
| 274 | </ul>
|
---|
| 275 | <div style="clear:both;"><xsl:text> </xsl:text></div>
|
---|
| 276 | </xsl:if>
|
---|
| 277 | </xsl:template>
|
---|
| 278 |
|
---|
| 279 | <!-- ***** HOME HELP PREFERENCES LOGIN ***** -->
|
---|
| 280 | <xsl:template name="home-help-preferences">
|
---|
| 281 | <ul id="bannerLinks">
|
---|
[31399] | 282 | <xsl:if test="/page/pageResponse/format[@type='display' or @type='browse' or @type='search' or not(@type)]/gsf:option[@name='RSS']/@value = 'true'">
|
---|
| 283 | <li><xsl:call-template name="RSSLink"/></li>
|
---|
| 284 | </xsl:if>
|
---|
[31398] | 285 | <li><xsl:call-template name="PrefsLink"/></li>
|
---|
| 286 | <li><xsl:call-template name="HelpLink"/></li>
|
---|
| 287 | <li id="userMenuButton"><xsl:call-template name="LoginoutLink"/></li>
|
---|
[31399] | 288 | <xsl:if test="/page/pageRequest/paramList/param[(@name='debug') and (@value='on' or @value='true' or @value='1' or @value='yes')]">
|
---|
| 289 | <li><xsl:call-template name="DebugLink"/></li>
|
---|
| 290 | </xsl:if>
|
---|
[31240] | 291 | <xsl:call-template name="buttonStyling"/>
|
---|
| 292 | </ul>
|
---|
| 293 | </xsl:template>
|
---|
| 294 |
|
---|
| 295 | <xsl:template name="RSSLink">
|
---|
| 296 | <!-- RSS feed link can appear in a global format statement (where it has no type attribute)
|
---|
| 297 | or in section specific format statements, such as browse, search, display.
|
---|
| 298 | If it's present in any format statement, display the RSS link in the bannerlinks section. -->
|
---|
| 299 | <xsl:if test="/page/pageResponse/format[@type='display' or @type='browse' or @type='search' or not(@type)]/gsf:option[@name='RSS']/@value = 'true'">
|
---|
| 300 | <gsf:link type="rss"><gsf:icon file="rssicon.png"/></gsf:link>
|
---|
| 301 | </xsl:if>
|
---|
| 302 | </xsl:template>
|
---|
| 303 |
|
---|
| 304 | <xsl:template name="PrefsLink">
|
---|
| 305 | <a href="{$library_name}/collection/{$collNameChecked}/page/pref">
|
---|
| 306 | <xsl:attribute name="title"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'pref_tip')"/></xsl:attribute>
|
---|
| 307 | <span id="preferencesButton"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'pref_b')"/></span>
|
---|
| 308 | </a>
|
---|
| 309 | </xsl:template>
|
---|
| 310 |
|
---|
| 311 | <xsl:template name="HelpLink">
|
---|
| 312 | <a href="{$library_name}/collection/{$collNameChecked}/page/help">
|
---|
| 313 | <xsl:attribute name="title"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'help_tip')"/></xsl:attribute>
|
---|
| 314 | <span id="helpButton"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'help_b')"/></span>
|
---|
| 315 | </a>
|
---|
| 316 | </xsl:template>
|
---|
| 317 |
|
---|
| 318 | <xsl:template name="toggleUserMenuScript">
|
---|
| 319 | <script type="text/javascript">
|
---|
| 320 | <xsl:text disable-output-escaping="yes">
|
---|
| 321 | function toggleUserMenu()
|
---|
| 322 | {
|
---|
| 323 | var button = $("#userMenuButton");
|
---|
| 324 | var menu;
|
---|
| 325 |
|
---|
| 326 | if(button.data("userMenu"))
|
---|
| 327 | {
|
---|
| 328 | menu = button.data("userMenu");
|
---|
| 329 | if(menu.css("display") == "block")
|
---|
| 330 | {
|
---|
| 331 | menu.hide();
|
---|
| 332 | }
|
---|
| 333 | else
|
---|
| 334 | {
|
---|
| 335 | menu.show();
|
---|
| 336 | }
|
---|
| 337 | }
|
---|
| 338 | else
|
---|
| 339 | {
|
---|
| 340 | menu = $("<UL>")
|
---|
| 341 | .css("position", "absolute")
|
---|
| 342 | .css("display", "block")
|
---|
| 343 | .css("z-index", "100")
|
---|
| 344 | .css("list-style", "none outside none")
|
---|
| 345 | .css("margin", "0px")
|
---|
| 346 | .css("padding", "0px")
|
---|
| 347 | .css("font-size", "90%");
|
---|
[31239] | 348 |
|
---|
[31240] | 349 | menu.attr("id", "userMenu");
|
---|
| 350 |
|
---|
| 351 | button.data("userMenu", menu);
|
---|
| 352 |
|
---|
| 353 | var settingsLink = $("<a>")
|
---|
| 354 | .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">");
|
---|
| 355 | var settingsButton = $("<LI>")
|
---|
| 356 | .css("padding", "3px")
|
---|
| 357 | .html("</xsl:text><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'menu.account_settings')"/><xsl:text disable-output-escaping="yes">")
|
---|
| 358 | .addClass("ui-state-default");
|
---|
| 359 | settingsLink.append(settingsButton);
|
---|
[31239] | 360 |
|
---|
[31240] | 361 | var editingLink = $("<a>")
|
---|
| 362 | .attr("href", "javascript:;");
|
---|
| 363 | var editingButton = $("<LI>")
|
---|
| 364 | .css("padding", "3px")
|
---|
| 365 | .html((gs.userInformation.editEnabled == "true") ? "</xsl:text><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'menu.disable_edit_mode')"/><xsl:text disable-output-escaping="yes">" : "</xsl:text><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'menu.enable_edit_mode')"/><xsl:text disable-output-escaping="yes">")
|
---|
| 366 | .addClass("ui-state-default")
|
---|
| 367 | .click(function()
|
---|
| 368 | {
|
---|
| 369 | var url = gs.xsltParams.library_name + "?a=g&rt=ro&s=ChangeUserEditMode&s1.username=" + gs.userInformation.username + "&s1.enabled=" + ((gs.userInformation.editEnabled == "true") ? "false" : "true");
|
---|
| 370 | $.ajax(url)
|
---|
| 371 | .success(function(response)
|
---|
| 372 | {
|
---|
| 373 | location.reload();
|
---|
| 374 | });
|
---|
| 375 | });
|
---|
| 376 | editingLink.append(editingButton);
|
---|
| 377 |
|
---|
| 378 | var url = document.URL;
|
---|
| 379 | var hasQueryString = (url.indexOf("?") != -1);
|
---|
| 380 | var hashIndex = url.indexOf("#");
|
---|
[31239] | 381 |
|
---|
[31240] | 382 | var hashPart;
|
---|
| 383 | if(hashIndex != -1)
|
---|
| 384 | {
|
---|
| 385 | hashPart = url.substring(hashIndex);
|
---|
| 386 | url = url.substring(0, hashIndex);
|
---|
| 387 | }
|
---|
[31239] | 388 |
|
---|
[31240] | 389 | var logoutLink = $("<a>")
|
---|
| 390 | .attr("href", url + (hasQueryString ? "&" : "?") + "logout=" + (hashPart ? hashPart : ""));
|
---|
| 391 | var logoutButton = $("<LI>")
|
---|
| 392 | .css("padding", "3px")
|
---|
| 393 | .html("</xsl:text><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'menu.logout')"/><xsl:text disable-output-escaping="yes">")
|
---|
| 394 | .addClass("ui-state-default");
|
---|
| 395 | logoutLink.append(logoutButton);
|
---|
[23989] | 396 |
|
---|
[31240] | 397 | menu.append(settingsLink);
|
---|
| 398 | menu.append(editingLink);
|
---|
| 399 | menu.append(logoutLink);
|
---|
[25278] | 400 |
|
---|
[31240] | 401 | var buttonLeft = button.offset().left;
|
---|
| 402 | var buttonTop = button.offset().top;
|
---|
[25278] | 403 |
|
---|
[31240] | 404 | var buttonHeight = button.height();
|
---|
[25278] | 405 |
|
---|
[31240] | 406 | menu.offset({top: buttonTop + buttonHeight + 4, left: buttonLeft});
|
---|
| 407 | $("#topArea").append(menu);
|
---|
| 408 | }
|
---|
| 409 | }
|
---|
| 410 | </xsl:text>
|
---|
| 411 | </script>
|
---|
| 412 |
|
---|
| 413 | </xsl:template>
|
---|
[31537] | 414 |
|
---|
[31240] | 415 | <xsl:template name="generateLoginURL">
|
---|
| 416 | <xsl:value-of select="$library_name"/>
|
---|
| 417 | <xsl:text>?a=p&sa=login&redirectURL=</xsl:text>
|
---|
| 418 | <xsl:value-of select="$library_name"/>
|
---|
| 419 | <xsl:text>%3F</xsl:text>
|
---|
| 420 | <xsl:if test="/page/pageRequest/@action">
|
---|
| 421 | <xsl:text>a=</xsl:text>
|
---|
| 422 | <xsl:value-of select="/page/pageRequest/@action"/>
|
---|
| 423 | </xsl:if>
|
---|
| 424 | <xsl:if test="/page/pageRequest/@subaction">
|
---|
| 425 | <xsl:text>%26sa=</xsl:text>
|
---|
| 426 | <xsl:value-of select="/page/pageRequest/@subaction"/>
|
---|
| 427 | </xsl:if>
|
---|
| 428 | <xsl:for-each select="/page/pageRequest/paramList/param">
|
---|
| 429 | <xsl:if test="@name != 'password' and @name != 's1.password' and @name != 's1.newPassword' and @name != 's1.oldPassword'">
|
---|
| 430 | <xsl:text>%26</xsl:text>
|
---|
| 431 | <xsl:value-of select="@name"/>
|
---|
| 432 | <xsl:text>=</xsl:text>
|
---|
| 433 | <xsl:value-of select="@value"/>
|
---|
| 434 | </xsl:if>
|
---|
| 435 | </xsl:for-each>
|
---|
| 436 |
|
---|
| 437 | </xsl:template>
|
---|
[31537] | 438 |
|
---|
| 439 | <!-- Writing the reverse of generateLoginURL since the toggleUserMenuScript does a lot more than I want. -->
|
---|
| 440 | <!-- https://www.w3schools.com/xml/xsl_functions.asp#string -->
|
---|
| 441 | <xsl:template name="generateLogoutURL">
|
---|
| 442 |
|
---|
| 443 | <xsl:variable name="url" select="/page/pageRequest/@fullURL"/>
|
---|
[31674] | 444 | <xsl:variable name="beforeLogout" select="substring-before($url, '&amp;logout=')"/>
|
---|
| 445 | <xsl:variable name="tmpAfter" select="substring-after($url, '&amp;logout=')"/>
|
---|
| 446 | <xsl:variable name="afterLogout" select="substring-after($tmpAfter, '&amp;')"/>
|
---|
[31537] | 447 | <xsl:variable name="beforeHash" select="substring-before($url, '#')"/>
|
---|
| 448 | <xsl:variable name="afterHash" select="substring-after($url, '#')"/>
|
---|
| 449 | <!-- Get rid of any lingering &logout= already in the URL.
|
---|
[31674] | 450 | But retain anything before and after it (the after portion would start with &).
|
---|
| 451 | Can't use fn:replace() as it's only been defined since XSLT 2.0. We use XSLT 1.x -->
|
---|
[31537] | 452 | <xsl:variable name="fullURL">
|
---|
| 453 | <xsl:choose>
|
---|
[31674] | 454 | <xsl:when test="$beforeLogout != ''"><xsl:value-of select="$beforeLogout" /></xsl:when>
|
---|
| 455 | <xsl:otherwise><xsl:value-of select="$url" /></xsl:otherwise>
|
---|
| 456 | </xsl:choose>
|
---|
| 457 | <xsl:if test="$afterLogout != ''">&<xsl:value-of select="$afterLogout" /></xsl:if>
|
---|
[31537] | 458 | </xsl:variable>
|
---|
| 459 |
|
---|
| 460 | <!-- Output the logout link: the current page's URL (with any lingering logout suffix removed)
|
---|
| 461 | followed by ?logout= or &logout= followed by any # portion of the current page's URL -->
|
---|
| 462 | <xsl:choose>
|
---|
| 463 | <xsl:when test="$beforeHash != ''"><xsl:value-of select="$beforeHash" /></xsl:when>
|
---|
| 464 | <xsl:otherwise><xsl:value-of select="$fullURL" /></xsl:otherwise>
|
---|
| 465 | </xsl:choose>
|
---|
| 466 | <xsl:choose>
|
---|
| 467 | <xsl:when test="contains($fullURL, '?')"><xsl:text>&logout=</xsl:text></xsl:when>
|
---|
| 468 | <xsl:otherwise>?logout=</xsl:otherwise>
|
---|
| 469 | </xsl:choose>
|
---|
| 470 | <xsl:if test="$afterHash != ''">#<xsl:value-of select="$afterHash" /></xsl:if>
|
---|
| 471 | </xsl:template>
|
---|
[31240] | 472 |
|
---|
| 473 | <xsl:template name="LoginoutLink">
|
---|
| 474 | <!-- login/logout -->
|
---|
| 475 | <xsl:choose>
|
---|
| 476 | <xsl:when test="/page/pageRequest/userInformation/@username">
|
---|
| 477 | <a>
|
---|
| 478 | <xsl:attribute name="href">javascript:toggleUserMenu();</xsl:attribute>
|
---|
| 479 | <xsl:call-template name="toggleUserMenuScript"/>
|
---|
| 480 | <span id="loginButton"><xsl:value-of select="/page/pageRequest/userInformation/@username"/></span>
|
---|
| 481 | </a>
|
---|
| 482 | </xsl:when>
|
---|
| 483 | <xsl:otherwise>
|
---|
| 484 | <a>
|
---|
| 485 | <xsl:attribute name="href"><xsl:call-template name="generateLoginURL"/>
|
---|
| 486 | </xsl:attribute>
|
---|
| 487 | <xsl:attribute name="title"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'login_tip')"/></xsl:attribute>
|
---|
| 488 | <span id="loginButton"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'login_b')"/></span>
|
---|
| 489 | </a>
|
---|
| 490 | </xsl:otherwise>
|
---|
| 491 | </xsl:choose>
|
---|
| 492 | </xsl:template>
|
---|
| 493 |
|
---|
| 494 | <xsl:template name="DebugLink">
|
---|
| 495 | <!-- debuginfo (doesn't use class="ui-state-error" since the text is not legible due to inherited text-colour) -->
|
---|
| 496 | <xsl:if test="/page/pageRequest/paramList/param[(@name='debug') and (@value='on' or @value='true' or @value='1' or @value='yes')]">
|
---|
| 497 | <a href="{$library_name}/collection/{$collNameChecked}/page/debug">
|
---|
| 498 | <xsl:attribute name="title"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'debuginfo_tip')"/></xsl:attribute>
|
---|
| 499 | <span id="debugButton"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'debuginfo_b')"/></span>
|
---|
| 500 | </a>
|
---|
| 501 | </xsl:if>
|
---|
| 502 | </xsl:template>
|
---|
| 503 |
|
---|
| 504 | <xsl:template name="buttonStyling">
|
---|
| 505 | <script type="text/javascript">
|
---|
| 506 | <xsl:text disable-output-escaping="yes">
|
---|
| 507 | $("#preferencesButton").button({icons:{primary:"ui-icon-wrench"}});
|
---|
| 508 | $("#preferencesButton .ui-button-text").css({"padding-top":"0px", "padding-bottom":"3px"});
|
---|
| 509 | $("#helpButton").button({icons:{primary:"ui-icon-help"}});
|
---|
| 510 | $("#helpButton .ui-button-text").css({"padding-top":"0px", "padding-bottom":"3px"});
|
---|
| 511 | $("#debugButton").button({icons:{primary:"ui-icon-info"}});
|
---|
| 512 | $("#debugButton .ui-button-text").css({"padding-top":"0px", "padding-bottom":"3px"});
|
---|
| 513 | </xsl:text>
|
---|
| 514 | <xsl:choose>
|
---|
| 515 | <xsl:when test="/page/pageRequest/userInformation/@username">
|
---|
| 516 | <xsl:text disable-output-escaping="yes">$("#loginButton").button({icons:{primary:"ui-icon-unlocked"}});</xsl:text>
|
---|
| 517 | </xsl:when>
|
---|
| 518 | <xsl:otherwise>
|
---|
| 519 | <xsl:text disable-output-escaping="yes">$("#loginButton").button({icons:{primary:"ui-icon-locked"}});</xsl:text>
|
---|
| 520 | </xsl:otherwise>
|
---|
| 521 | </xsl:choose>
|
---|
| 522 | <xsl:text disable-output-escaping="yes">
|
---|
| 523 | $("#loginButton .ui-button-text").css({"padding-top":"0px", "padding-bottom":"3px"});
|
---|
| 524 | </xsl:text>
|
---|
| 525 | </script>
|
---|
[25278] | 526 |
|
---|
[31240] | 527 | </xsl:template>
|
---|
| 528 | <!-- ***** PAGE TITLE ***** -->
|
---|
| 529 | <xsl:template name="page-title-area">
|
---|
| 530 | <xsl:variable name="pageTitleVar"><xsl:call-template name="pageTitle"/></xsl:variable>
|
---|
| 531 | <div id="titlearea">
|
---|
| 532 | <h2>
|
---|
| 533 | <!-- Resize the title based on how long it is (There's probably a better way to do this) -->
|
---|
| 534 | <xsl:attribute name="style">
|
---|
[31239] | 535 | <xsl:choose>
|
---|
[31240] | 536 | <xsl:when test="string-length($pageTitleVar) < 20">
|
---|
| 537 | <xsl:text>font-size: 1.5em;</xsl:text>
|
---|
[31239] | 538 | </xsl:when>
|
---|
[31240] | 539 | <xsl:when test="string-length($pageTitleVar) < 30">
|
---|
| 540 | <xsl:text>font-size: 1.4em;</xsl:text>
|
---|
| 541 | </xsl:when>
|
---|
| 542 | <xsl:when test="string-length($pageTitleVar) < 40">
|
---|
| 543 | <xsl:text>font-size: 1.3em;</xsl:text>
|
---|
| 544 | </xsl:when>
|
---|
| 545 | <xsl:when test="string-length($pageTitleVar) < 50">
|
---|
| 546 | <xsl:text>font-size: 1.2em;</xsl:text>
|
---|
| 547 | </xsl:when>
|
---|
| 548 | <xsl:when test="string-length($pageTitleVar) < 60">
|
---|
| 549 | <xsl:text>font-size: 1.1em;</xsl:text>
|
---|
| 550 | </xsl:when>
|
---|
| 551 | <xsl:when test="string-length($pageTitleVar) < 70">
|
---|
| 552 | <xsl:text>font-size: 1em;</xsl:text>
|
---|
| 553 | </xsl:when>
|
---|
| 554 | <xsl:when test="string-length($pageTitleVar) < 80">
|
---|
| 555 | <xsl:text>font-size: 0.9em;</xsl:text>
|
---|
| 556 | </xsl:when>
|
---|
| 557 | <xsl:when test="string-length($pageTitleVar) < 90">
|
---|
| 558 | <xsl:text>font-size: 0.8em;</xsl:text>
|
---|
| 559 | </xsl:when>
|
---|
[31239] | 560 | <xsl:otherwise>
|
---|
[31240] | 561 | <xsl:text>font-size: 0.7em;</xsl:text>
|
---|
[31239] | 562 | </xsl:otherwise>
|
---|
| 563 | </xsl:choose>
|
---|
[31240] | 564 | </xsl:attribute>
|
---|
| 565 | <!--<xsl:value-of select="string-length($pageTitleVar)" />-->
|
---|
| 566 | <xsl:value-of select="$pageTitleVar" />
|
---|
| 567 | </h2><xsl:text> </xsl:text>
|
---|
| 568 | </div>
|
---|
| 569 | </xsl:template>
|
---|
| 570 |
|
---|
| 571 | <!-- ***** QUICK SEARCH AREA ***** -->
|
---|
| 572 | <!-- Search form should only appear if there's a search (query) service AND it has an index.
|
---|
| 573 | By default, all collections end up with some query service (default is MGPP) even when they have
|
---|
| 574 | no search indexes, which is why the extra test for the presence of an index/fq-something is necessary. -->
|
---|
| 575 | <xsl:template name="quick-search-area">
|
---|
| 576 | <xsl:if test="/page/pageResponse/collection[@name=$collNameChecked]/serviceList/service[@type='query']">
|
---|
| 577 | <xsl:variable name="subaction" select="/page/pageRequest/@subaction"/>
|
---|
| 578 | <div id="quicksearcharea">
|
---|
| 579 | <xsl:if test="/page/pageResponse/collection[@name=$collNameChecked]/serviceList/service[@name='TextQuery']">
|
---|
| 580 | <xsl:choose>
|
---|
| 581 | <xsl:when test="not(page/pageRequest[@action='q']) or /page/pageRequest/paramList/param[@name='qs']/@value = '1'">
|
---|
| 582 | <form action="{$library_name}/collection/{$collNameChecked}/search/TextQuery">
|
---|
| 583 | <!-- This parameter says that we have come from the quick search area -->
|
---|
| 584 | <input type="hidden" name="qs" value="1"/>
|
---|
| 585 | <input type="hidden" name="rt" value="rd"/>
|
---|
| 586 | <input type="hidden" name="s1.level">
|
---|
| 587 | <xsl:attribute name="value">
|
---|
| 588 | <xsl:value-of select="/page/pageResponse/collection/serviceList/service[@name='TextQuery']/paramList/param[@name = 'level']/@default"/>
|
---|
| 589 | </xsl:attribute>
|
---|
| 590 | </input>
|
---|
[31239] | 591 | <xsl:choose>
|
---|
[31240] | 592 | <xsl:when test="/page/pageResponse/service[@name = 'TextQuery']/paramList/param[@name = 'startPage']">
|
---|
| 593 | <input type="hidden" name="s1.startPage" value="1"/>
|
---|
| 594 | </xsl:when>
|
---|
| 595 | <xsl:otherwise>
|
---|
| 596 | <input type="hidden" name="startPage" value="1"/>
|
---|
| 597 | </xsl:otherwise>
|
---|
| 598 | </xsl:choose>
|
---|
| 599 |
|
---|
| 600 | <!-- The query text box -->
|
---|
| 601 | <span class="querybox">
|
---|
| 602 | <xsl:variable name="qs">
|
---|
| 603 | <xsl:apply-templates select="/page/pageResponse/collection[@name=$collNameChecked]/serviceList/service[@name='TextQuery']/paramList/param[@name='query']" mode="calculate-default"/>
|
---|
| 604 | </xsl:variable>
|
---|
| 605 | <nobr>
|
---|
| 606 | <xsl:apply-templates select="/page/pageResponse/collection[@name=$collNameChecked]/serviceList/service[@name='TextQuery']/paramList/param[@name='query']">
|
---|
| 607 | <!--
|
---|
| 608 | <xsl:with-param name="default" select="java:org.greenstone.gsdl3.util.XSLTUtil.tidyWhitespace($qs, /page/@lang)"/>
|
---|
| 609 | -->
|
---|
| 610 | <xsl:with-param name="default" select="normalize-space($qs)"/>
|
---|
| 611 |
|
---|
| 612 | </xsl:apply-templates>
|
---|
| 613 | </nobr>
|
---|
| 614 | </span>
|
---|
| 615 | <!-- The index selection list -->
|
---|
| 616 | <xsl:if test="/page/pageResponse/collection[@name=$collNameChecked]/serviceList/service[@name='TextQuery']/paramList/param[@name='index']/@type = 'enum_single'">
|
---|
| 617 | <span class="textselect">
|
---|
| 618 | <xsl:apply-templates select="/page/pageResponse/collection[@name=$collNameChecked]/serviceList/service[@name='TextQuery']/paramList/param[@name='index']">
|
---|
| 619 | <xsl:with-param name="default">
|
---|
| 620 | <xsl:apply-templates select="/page/pageResponse/collection[@name=$collNameChecked]/serviceList/service[@name='TextQuery']/paramList/param[@name='index']" mode="calculate-default"/>
|
---|
| 621 | </xsl:with-param>
|
---|
| 622 | <xsl:with-param name="hideSingle">false</xsl:with-param>
|
---|
| 623 | <xsl:with-param name="quickSearch">true</xsl:with-param>
|
---|
| 624 | </xsl:apply-templates>
|
---|
| 625 | </span>
|
---|
| 626 | </xsl:if>
|
---|
| 627 | <!-- The partition selection list -->
|
---|
| 628 | <xsl:if test="/page/pageResponse/collection[@name=$collNameChecked]/serviceList/service[@name='TextQuery']/paramList/param[@name='indexSubcollection']/@type = 'enum_single'">
|
---|
| 629 | <span class="textselect">
|
---|
| 630 | <xsl:apply-templates select="/page/pageResponse/collection[@name=$collNameChecked]/serviceList/service[@name='TextQuery']/paramList/param[@name='indexSubcollection']">
|
---|
| 631 | <xsl:with-param name="default">
|
---|
| 632 | <xsl:apply-templates select="/page/pageResponse/collection[@name=$collNameChecked]/serviceList/service[@name='TextQuery']/paramList/param[@name='indexSubcollection']" mode="calculate-default"/>
|
---|
| 633 | </xsl:with-param>
|
---|
| 634 | <xsl:with-param name="hideSingle">true</xsl:with-param>
|
---|
| 635 | <xsl:with-param name="quickSearch">true</xsl:with-param>
|
---|
| 636 | </xsl:apply-templates>
|
---|
| 637 | </span>
|
---|
| 638 | </xsl:if>
|
---|
| 639 | <!-- The language selection list -->
|
---|
| 640 | <xsl:if test="/page/pageResponse/collection[@name=$collNameChecked]/serviceList/service[@name='TextQuery']/paramList/param[@name='indexLanguage']/@type = 'enum_single'">
|
---|
| 641 | <span class="textselect">
|
---|
| 642 | <xsl:apply-templates select="/page/pageResponse/collection[@name=$collNameChecked]/serviceList/service[@name='TextQuery']/paramList/param[@name='indexLanguage']">
|
---|
| 643 | <xsl:with-param name="default">
|
---|
| 644 | <xsl:apply-templates select="/page/pageResponse/collection[@name=$collNameChecked]/serviceList/service[@name='TextQuery']/paramList/param[@name='indexLanguage']" mode="calculate-default"/>
|
---|
| 645 | </xsl:with-param>
|
---|
| 646 | <xsl:with-param name="hideSingle">true</xsl:with-param>
|
---|
| 647 | <xsl:with-param name="quickSearch">true</xsl:with-param>
|
---|
| 648 | </xsl:apply-templates>
|
---|
| 649 | </span>
|
---|
| 650 | </xsl:if>
|
---|
| 651 | <!-- The submit button (for TextQuery) -->
|
---|
| 652 | <xsl:if test="/page/pageResponse/collection[@name=$collNameChecked]/serviceList/service[@name='TextQuery']">
|
---|
| 653 | <input type="submit" id="quickSearchSubmitButton">
|
---|
| 654 | <xsl:attribute name="value">
|
---|
| 655 | <xsl:value-of select="/page/pageResponse/collection[@name=$collNameChecked]/serviceList/service[@name='TextQuery']/displayItem[@name='submit']"/>
|
---|
| 656 | </xsl:attribute>
|
---|
| 657 | </input>
|
---|
| 658 | <br/>
|
---|
| 659 | </xsl:if>
|
---|
| 660 | </form>
|
---|
| 661 | </xsl:when>
|
---|
| 662 | <xsl:otherwise><br/></xsl:otherwise>
|
---|
| 663 | </xsl:choose>
|
---|
| 664 | </xsl:if>
|
---|
| 665 | <!-- The list of other search types -->
|
---|
| 666 | <ul>
|
---|
| 667 | <xsl:for-each select="/page/pageResponse/collection[@name=$collNameChecked]/serviceList/service[@type='query']">
|
---|
[31538] | 668 | <xsl:if test="/page/pageRequest/paramList/param[@name='qs']/@value = 1 or not(@name = /page/pageRequest/paramList/param[@name='s']/@value)">
|
---|
| 669 | <li class="ui-state-default ui-corner-all">
|
---|
| 670 | <a>
|
---|
| 671 | <xsl:attribute name="href">
|
---|
| 672 | <xsl:value-of select="$library_name"/>/collection/<xsl:value-of select="$collNameChecked"/>/search/<xsl:value-of select="@name"/>
|
---|
| 673 | </xsl:attribute>
|
---|
| 674 | <xsl:value-of select="displayItem[@name='name']"/>
|
---|
| 675 | </a>
|
---|
| 676 | </li>
|
---|
| 677 | </xsl:if>
|
---|
[31240] | 678 | </xsl:for-each>
|
---|
| 679 | </ul>
|
---|
| 680 | </div>
|
---|
| 681 | </xsl:if>
|
---|
| 682 | </xsl:template>
|
---|
| 683 |
|
---|
| 684 | <xsl:template name="map-scripts">
|
---|
| 685 | <meta content="initial-scale=1.0, user-scalable=no" name="viewport"/>
|
---|
| 686 | <script src="http://maps.googleapis.com/maps/api/js?key=AIzaSyCofVTps3xHfMvIcTMHqYMMxe3xXfkAxnI" type="text/javascript"><xsl:text> </xsl:text></script>
|
---|
| 687 | <script src="interfaces/{$interface_name}/js/map-scripts.js" type="text/javascript"><xsl:text> </xsl:text></script>
|
---|
| 688 | <script type="text/javascript">$(window).load(initializeMapScripts);</script>
|
---|
| 689 | </xsl:template>
|
---|
[31239] | 690 |
|
---|
[31240] | 691 | <xsl:template name="openlayers-map-scripts">
|
---|
| 692 | <script src="interfaces/{interface_name}/js/OpenLayers.js" type="text/javascript"><xsl:text> </xsl:text></script>
|
---|
| 693 | </xsl:template>
|
---|
[29554] | 694 |
|
---|
[31240] | 695 | <xsl:template name="panoramaViewer-scripts">
|
---|
| 696 | <script src="interfaces/{$interface_name}/js/three45.min.js" type="text/javascript"><xsl:text> </xsl:text></script>
|
---|
| 697 | <script src="interfaces/{$interface_name}/js/Tween.js" type="text/javascript"><xsl:text> </xsl:text></script>
|
---|
| 698 | <script src="interfaces/{$interface_name}/js/Detector.js" type="text/javascript"><xsl:text> </xsl:text></script>
|
---|
| 699 | <script src="interfaces/{$interface_name}/js/RequestAnimationFrame.js" type="text/javascript"><xsl:text> </xsl:text></script>
|
---|
| 700 | <script src="interfaces/{$interface_name}/js/panoramaMarker.js" type="text/javascript"><xsl:text> </xsl:text></script>
|
---|
| 701 | <script src="interfaces/{$interface_name}/js/panoramaViewer.js" type="text/javascript"><xsl:text> </xsl:text></script>
|
---|
| 702 | <script type="text/javascript">$(window).load(initPanoramaViewer);$(window).load(_animate);</script>
|
---|
| 703 | </xsl:template>
|
---|
[26871] | 704 |
|
---|
[31240] | 705 | <xsl:template name="choose-title">
|
---|
| 706 | <gsf:choose-metadata>
|
---|
| 707 | <gsf:metadata name="dc.Title"/>
|
---|
| 708 | <gsf:metadata name="exp.Title"/>
|
---|
| 709 | <gsf:metadata name="ex.dc.Title"/>
|
---|
| 710 | <gsf:metadata name="Title"/>
|
---|
| 711 | <gsf:default>Untitled</gsf:default>
|
---|
| 712 | </gsf:choose-metadata>
|
---|
| 713 | </xsl:template>
|
---|
[24137] | 714 | </xsl:stylesheet>
|
---|