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