Changeset 31240 for main/trunk/greenstone3/web/interfaces/default/transform
- Timestamp:
- 2016-12-15T10:28:39+13:00 (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/trunk/greenstone3/web/interfaces/default/transform/layouts/header.xsl
r31239 r31240 1 1 <?xml version="1.0" encoding="UTF-8"?> 2 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" 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"/> 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"/> 13 49 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"/> 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 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> 77 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> 85 86 87 <xsl:if test="/page/pageResponse/format/gsf:option[@name='panoramaViewerEnabled']/@value = 'true'"> 88 <xsl:call-template name="panoramaViewer-scripts"/> 89 </xsl:if> 90 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> 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 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> 77 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> 85 86 87 <xsl:if test="/page/pageResponse/format/gsf:option[@name='panoramaViewerEnabled']/@value = 'true'"> 88 <xsl:call-template name="panoramaViewer-scripts"/> 89 </xsl:if> 90 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> 94 94 <!-- <xsl:call-template name="init-direct-edit"/> --> 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"/> 108 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> 127 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> 149 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"> 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"/> 108 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> 127 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> 149 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"> 165 208 <li> 166 209 <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">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)"> 169 212 <xsl:attribute name='class'>ui-state-default ui-corner-top ui-tabs-selected ui-state-active</xsl:attribute> 170 213 </xsl:when> 171 214 <xsl:otherwise> 172 <xsl:attribute name="class">ui-state-default ui-corner-top</xsl:attribute> 215 <xsl:attribute name='class'>ui-state-default ui-corner-top</xsl:attribute> 216 </xsl:otherwise> 217 </xsl:choose> 218 219 <a> 220 <!-- Add a title element to the <a> tag if a description exists for this classifier --> 221 <xsl:if test="displayItem[@name='description']"> 222 <xsl:attribute name='title'><xsl:value-of select="displayItem[@name='description']"/></xsl:attribute> 223 </xsl:if> 224 225 <!-- Add the href element to the <a> tag --> 226 <xsl:choose> 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> 229 </xsl:when> 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> 233 </xsl:choose> 234 235 <!-- Add the actual text of the <a> tag --> 236 <xsl:value-of select="displayItem[@name='name']"/> 237 </a> 238 </li> 239 </xsl:for-each> 240 </xsl:if> 241 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> 266 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"> 279 <li><xsl:call-template name="RSSLink"/></li> 280 <li><xsl:call-template name="PrefsLink"/></li> 281 <li><xsl:call-template name="HelpLink"/></li> 282 <li id="userMenuButton"><xsl:call-template name="LoginoutLink"/></li> 283 <li><xsl:call-template name="DebugLink"/></li> 284 <xsl:call-template name="buttonStyling"/> 285 </ul> 286 </xsl:template> 287 288 <xsl:template name="RSSLink"> 289 <!-- RSS feed link can appear in a global format statement (where it has no type attribute) 290 or in section specific format statements, such as browse, search, display. 291 If it's present in any format statement, display the RSS link in the bannerlinks section. --> 292 <xsl:if test="/page/pageResponse/format[@type='display' or @type='browse' or @type='search' or not(@type)]/gsf:option[@name='RSS']/@value = 'true'"> 293 <gsf:link type="rss"><gsf:icon file="rssicon.png"/></gsf:link> 294 </xsl:if> 295 </xsl:template> 296 297 <xsl:template name="PrefsLink"> 298 <a href="{$library_name}/collection/{$collNameChecked}/page/pref"> 299 <xsl:attribute name="title"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'pref_tip')"/></xsl:attribute> 300 <span id="preferencesButton"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'pref_b')"/></span> 301 </a> 302 </xsl:template> 303 304 <xsl:template name="HelpLink"> 305 <a href="{$library_name}/collection/{$collNameChecked}/page/help"> 306 <xsl:attribute name="title"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'help_tip')"/></xsl:attribute> 307 <span id="helpButton"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'help_b')"/></span> 308 </a> 309 </xsl:template> 310 311 <xsl:template name="toggleUserMenuScript"> 312 <script type="text/javascript"> 313 <xsl:text disable-output-escaping="yes"> 314 function toggleUserMenu() 315 { 316 var button = $("#userMenuButton"); 317 var menu; 318 319 if(button.data("userMenu")) 320 { 321 menu = button.data("userMenu"); 322 if(menu.css("display") == "block") 323 { 324 menu.hide(); 325 } 326 else 327 { 328 menu.show(); 329 } 330 } 331 else 332 { 333 menu = $("<UL>") 334 .css("position", "absolute") 335 .css("display", "block") 336 .css("z-index", "100") 337 .css("list-style", "none outside none") 338 .css("margin", "0px") 339 .css("padding", "0px") 340 .css("font-size", "90%"); 341 342 menu.attr("id", "userMenu"); 343 344 button.data("userMenu", menu); 345 346 var settingsLink = $("<a>") 347 .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">"); 348 var settingsButton = $("<LI>") 349 .css("padding", "3px") 350 .html("</xsl:text><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'menu.account_settings')"/><xsl:text disable-output-escaping="yes">") 351 .addClass("ui-state-default"); 352 settingsLink.append(settingsButton); 353 354 var editingLink = $("<a>") 355 .attr("href", "javascript:;"); 356 var editingButton = $("<LI>") 357 .css("padding", "3px") 358 .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">") 359 .addClass("ui-state-default") 360 .click(function() 361 { 362 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"); 363 $.ajax(url) 364 .success(function(response) 365 { 366 location.reload(); 367 }); 368 }); 369 editingLink.append(editingButton); 370 371 var url = document.URL; 372 var hasQueryString = (url.indexOf("?") != -1); 373 var hashIndex = url.indexOf("#"); 374 375 var hashPart; 376 if(hashIndex != -1) 377 { 378 hashPart = url.substring(hashIndex); 379 url = url.substring(0, hashIndex); 380 } 381 382 var logoutLink = $("<a>") 383 .attr("href", url + (hasQueryString ? "&" : "?") + "logout=" + (hashPart ? hashPart : "")); 384 var logoutButton = $("<LI>") 385 .css("padding", "3px") 386 .html("</xsl:text><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'menu.logout')"/><xsl:text disable-output-escaping="yes">") 387 .addClass("ui-state-default"); 388 logoutLink.append(logoutButton); 389 390 menu.append(settingsLink); 391 menu.append(editingLink); 392 menu.append(logoutLink); 393 394 var buttonLeft = button.offset().left; 395 var buttonTop = button.offset().top; 396 397 var buttonHeight = button.height(); 398 399 menu.offset({top: buttonTop + buttonHeight + 4, left: buttonLeft}); 400 $("#topArea").append(menu); 401 } 402 } 403 </xsl:text> 404 </script> 405 406 </xsl:template> 407 <xsl:template name="generateLoginURL"> 408 <xsl:value-of select="$library_name"/> 409 <xsl:text>?a=p&sa=login&redirectURL=</xsl:text> 410 <xsl:value-of select="$library_name"/> 411 <xsl:text>%3F</xsl:text> 412 <xsl:if test="/page/pageRequest/@action"> 413 <xsl:text>a=</xsl:text> 414 <xsl:value-of select="/page/pageRequest/@action"/> 415 </xsl:if> 416 <xsl:if test="/page/pageRequest/@subaction"> 417 <xsl:text>%26sa=</xsl:text> 418 <xsl:value-of select="/page/pageRequest/@subaction"/> 419 </xsl:if> 420 <xsl:for-each select="/page/pageRequest/paramList/param"> 421 <xsl:if test="@name != 'password' and @name != 's1.password' and @name != 's1.newPassword' and @name != 's1.oldPassword'"> 422 <xsl:text>%26</xsl:text> 423 <xsl:value-of select="@name"/> 424 <xsl:text>=</xsl:text> 425 <xsl:value-of select="@value"/> 426 </xsl:if> 427 </xsl:for-each> 428 429 </xsl:template> 430 431 <xsl:template name="LoginoutLink"> 432 <!-- login/logout --> 433 <xsl:choose> 434 <xsl:when test="/page/pageRequest/userInformation/@username"> 435 <a> 436 <xsl:attribute name="href">javascript:toggleUserMenu();</xsl:attribute> 437 <xsl:call-template name="toggleUserMenuScript"/> 438 <span id="loginButton"><xsl:value-of select="/page/pageRequest/userInformation/@username"/></span> 439 </a> 440 </xsl:when> 441 <xsl:otherwise> 442 <a> 443 <xsl:attribute name="href"><xsl:call-template name="generateLoginURL"/> 444 </xsl:attribute> 445 <xsl:attribute name="title"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'login_tip')"/></xsl:attribute> 446 <span id="loginButton"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'login_b')"/></span> 447 </a> 448 </xsl:otherwise> 449 </xsl:choose> 450 </xsl:template> 451 452 <xsl:template name="DebugLink"> 453 <!-- debuginfo (doesn't use class="ui-state-error" since the text is not legible due to inherited text-colour) --> 454 <xsl:if test="/page/pageRequest/paramList/param[(@name='debug') and (@value='on' or @value='true' or @value='1' or @value='yes')]"> 455 <a href="{$library_name}/collection/{$collNameChecked}/page/debug"> 456 <xsl:attribute name="title"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'debuginfo_tip')"/></xsl:attribute> 457 <span id="debugButton"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'debuginfo_b')"/></span> 458 </a> 459 </xsl:if> 460 </xsl:template> 461 462 <xsl:template name="buttonStyling"> 463 <script type="text/javascript"> 464 <xsl:text disable-output-escaping="yes"> 465 $("#preferencesButton").button({icons:{primary:"ui-icon-wrench"}}); 466 $("#preferencesButton .ui-button-text").css({"padding-top":"0px", "padding-bottom":"3px"}); 467 $("#helpButton").button({icons:{primary:"ui-icon-help"}}); 468 $("#helpButton .ui-button-text").css({"padding-top":"0px", "padding-bottom":"3px"}); 469 $("#debugButton").button({icons:{primary:"ui-icon-info"}}); 470 $("#debugButton .ui-button-text").css({"padding-top":"0px", "padding-bottom":"3px"}); 471 </xsl:text> 472 <xsl:choose> 473 <xsl:when test="/page/pageRequest/userInformation/@username"> 474 <xsl:text disable-output-escaping="yes">$("#loginButton").button({icons:{primary:"ui-icon-unlocked"}});</xsl:text> 475 </xsl:when> 476 <xsl:otherwise> 477 <xsl:text disable-output-escaping="yes">$("#loginButton").button({icons:{primary:"ui-icon-locked"}});</xsl:text> 478 </xsl:otherwise> 479 </xsl:choose> 480 <xsl:text disable-output-escaping="yes"> 481 $("#loginButton .ui-button-text").css({"padding-top":"0px", "padding-bottom":"3px"}); 482 </xsl:text> 483 </script> 484 485 </xsl:template> 486 <!-- ***** PAGE TITLE ***** --> 487 <xsl:template name="page-title-area"> 488 <xsl:variable name="pageTitleVar"><xsl:call-template name="pageTitle"/></xsl:variable> 489 <div id="titlearea"> 490 <h2> 491 <!-- Resize the title based on how long it is (There's probably a better way to do this) --> 492 <xsl:attribute name="style"> 493 <xsl:choose> 494 <xsl:when test="string-length($pageTitleVar) < 20"> 495 <xsl:text>font-size: 1.5em;</xsl:text> 496 </xsl:when> 497 <xsl:when test="string-length($pageTitleVar) < 30"> 498 <xsl:text>font-size: 1.4em;</xsl:text> 499 </xsl:when> 500 <xsl:when test="string-length($pageTitleVar) < 40"> 501 <xsl:text>font-size: 1.3em;</xsl:text> 502 </xsl:when> 503 <xsl:when test="string-length($pageTitleVar) < 50"> 504 <xsl:text>font-size: 1.2em;</xsl:text> 505 </xsl:when> 506 <xsl:when test="string-length($pageTitleVar) < 60"> 507 <xsl:text>font-size: 1.1em;</xsl:text> 508 </xsl:when> 509 <xsl:when test="string-length($pageTitleVar) < 70"> 510 <xsl:text>font-size: 1em;</xsl:text> 511 </xsl:when> 512 <xsl:when test="string-length($pageTitleVar) < 80"> 513 <xsl:text>font-size: 0.9em;</xsl:text> 514 </xsl:when> 515 <xsl:when test="string-length($pageTitleVar) < 90"> 516 <xsl:text>font-size: 0.8em;</xsl:text> 517 </xsl:when> 518 <xsl:otherwise> 519 <xsl:text>font-size: 0.7em;</xsl:text> 520 </xsl:otherwise> 521 </xsl:choose> 522 </xsl:attribute> 523 <!--<xsl:value-of select="string-length($pageTitleVar)" />--> 524 <xsl:value-of select="$pageTitleVar" /> 525 </h2><xsl:text> </xsl:text> 526 </div> 527 </xsl:template> 528 529 <!-- ***** QUICK SEARCH AREA ***** --> 530 <!-- Search form should only appear if there's a search (query) service AND it has an index. 531 By default, all collections end up with some query service (default is MGPP) even when they have 532 no search indexes, which is why the extra test for the presence of an index/fq-something is necessary. --> 533 <xsl:template name="quick-search-area"> 534 <xsl:if test="/page/pageResponse/collection[@name=$collNameChecked]/serviceList/service[@type='query']"> 535 <xsl:variable name="subaction" select="/page/pageRequest/@subaction"/> 536 <div id="quicksearcharea"> 537 <xsl:if test="/page/pageResponse/collection[@name=$collNameChecked]/serviceList/service[@name='TextQuery']"> 538 <xsl:choose> 539 <xsl:when test="not(page/pageRequest[@action='q']) or /page/pageRequest/paramList/param[@name='qs']/@value = '1'"> 540 <form action="{$library_name}/collection/{$collNameChecked}/search/TextQuery"> 541 <!-- This parameter says that we have come from the quick search area --> 542 <input type="hidden" name="qs" value="1"/> 543 <input type="hidden" name="rt" value="rd"/> 544 <input type="hidden" name="s1.level"> 545 <xsl:attribute name="value"> 546 <xsl:value-of select="/page/pageResponse/collection/serviceList/service[@name='TextQuery']/paramList/param[@name = 'level']/@default"/> 547 </xsl:attribute> 548 </input> 549 <xsl:choose> 550 <xsl:when test="/page/pageResponse/service[@name = 'TextQuery']/paramList/param[@name = 'startPage']"> 551 <input type="hidden" name="s1.startPage" value="1"/> 552 </xsl:when> 553 <xsl:otherwise> 554 <input type="hidden" name="startPage" value="1"/> 555 </xsl:otherwise> 556 </xsl:choose> 557 558 <!-- The query text box --> 559 <span class="querybox"> 560 <xsl:variable name="qs"> 561 <xsl:apply-templates select="/page/pageResponse/collection[@name=$collNameChecked]/serviceList/service[@name='TextQuery']/paramList/param[@name='query']" mode="calculate-default"/> 562 </xsl:variable> 563 <nobr> 564 <xsl:apply-templates select="/page/pageResponse/collection[@name=$collNameChecked]/serviceList/service[@name='TextQuery']/paramList/param[@name='query']"> 565 <!-- 566 <xsl:with-param name="default" select="java:org.greenstone.gsdl3.util.XSLTUtil.tidyWhitespace($qs, /page/@lang)"/> 567 --> 568 <xsl:with-param name="default" select="normalize-space($qs)"/> 569 570 </xsl:apply-templates> 571 </nobr> 572 </span> 573 <!-- The index selection list --> 574 <xsl:if test="/page/pageResponse/collection[@name=$collNameChecked]/serviceList/service[@name='TextQuery']/paramList/param[@name='index']/@type = 'enum_single'"> 575 <span class="textselect"> 576 <xsl:apply-templates select="/page/pageResponse/collection[@name=$collNameChecked]/serviceList/service[@name='TextQuery']/paramList/param[@name='index']"> 577 <xsl:with-param name="default"> 578 <xsl:apply-templates select="/page/pageResponse/collection[@name=$collNameChecked]/serviceList/service[@name='TextQuery']/paramList/param[@name='index']" mode="calculate-default"/> 579 </xsl:with-param> 580 <xsl:with-param name="hideSingle">false</xsl:with-param> 581 <xsl:with-param name="quickSearch">true</xsl:with-param> 582 </xsl:apply-templates> 583 </span> 584 </xsl:if> 585 <!-- The partition selection list --> 586 <xsl:if test="/page/pageResponse/collection[@name=$collNameChecked]/serviceList/service[@name='TextQuery']/paramList/param[@name='indexSubcollection']/@type = 'enum_single'"> 587 <span class="textselect"> 588 <xsl:apply-templates select="/page/pageResponse/collection[@name=$collNameChecked]/serviceList/service[@name='TextQuery']/paramList/param[@name='indexSubcollection']"> 589 <xsl:with-param name="default"> 590 <xsl:apply-templates select="/page/pageResponse/collection[@name=$collNameChecked]/serviceList/service[@name='TextQuery']/paramList/param[@name='indexSubcollection']" mode="calculate-default"/> 591 </xsl:with-param> 592 <xsl:with-param name="hideSingle">true</xsl:with-param> 593 <xsl:with-param name="quickSearch">true</xsl:with-param> 594 </xsl:apply-templates> 595 </span> 596 </xsl:if> 597 <!-- The language selection list --> 598 <xsl:if test="/page/pageResponse/collection[@name=$collNameChecked]/serviceList/service[@name='TextQuery']/paramList/param[@name='indexLanguage']/@type = 'enum_single'"> 599 <span class="textselect"> 600 <xsl:apply-templates select="/page/pageResponse/collection[@name=$collNameChecked]/serviceList/service[@name='TextQuery']/paramList/param[@name='indexLanguage']"> 601 <xsl:with-param name="default"> 602 <xsl:apply-templates select="/page/pageResponse/collection[@name=$collNameChecked]/serviceList/service[@name='TextQuery']/paramList/param[@name='indexLanguage']" mode="calculate-default"/> 603 </xsl:with-param> 604 <xsl:with-param name="hideSingle">true</xsl:with-param> 605 <xsl:with-param name="quickSearch">true</xsl:with-param> 606 </xsl:apply-templates> 607 </span> 608 </xsl:if> 609 <!-- The submit button (for TextQuery) --> 610 <xsl:if test="/page/pageResponse/collection[@name=$collNameChecked]/serviceList/service[@name='TextQuery']"> 611 <input type="submit" id="quickSearchSubmitButton"> 612 <xsl:attribute name="value"> 613 <xsl:value-of select="/page/pageResponse/collection[@name=$collNameChecked]/serviceList/service[@name='TextQuery']/displayItem[@name='submit']"/> 614 </xsl:attribute> 615 </input> 616 <br/> 617 </xsl:if> 618 </form> 619 </xsl:when> 620 <xsl:otherwise><br/></xsl:otherwise> 621 </xsl:choose> 622 </xsl:if> 623 <!-- The list of other search types --> 624 <ul> 625 <xsl:for-each select="/page/pageResponse/collection[@name=$collNameChecked]/serviceList/service[@type='query']"> 626 <li> 627 <xsl:choose> 628 <xsl:when test="@name = /page/pageRequest/paramList/param[@name='s']/@value and not(/page/pageRequest/paramList/param[@name='qs']/@value = 1)"> 629 <xsl:attribute name="class">ui-state-default ui-corner-all ui-state-active</xsl:attribute> 630 </xsl:when> 631 <xsl:otherwise> 632 <xsl:attribute name="class">ui-state-default ui-corner-all</xsl:attribute> 173 633 </xsl:otherwise> 174 634 </xsl:choose> 175 635 <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> 636 <xsl:attribute name="href"> 637 <xsl:value-of select="$library_name"/>/collection/<xsl:value-of select="$collNameChecked"/>/search/<xsl:value-of select="@name"/> 638 </xsl:attribute> 639 <xsl:value-of select="displayItem[@name='name']"/> 193 640 </a> 194 641 </li> 195 642 </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"> 208 <li> 209 <xsl:choose> 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)"> 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> 215 <xsl:attribute name='class'>ui-state-default ui-corner-top</xsl:attribute> 216 </xsl:otherwise> 217 </xsl:choose> 218 219 <a> 220 <!-- Add a title element to the <a> tag if a description exists for this classifier --> 221 <xsl:if test="displayItem[@name='description']"> 222 <xsl:attribute name='title'><xsl:value-of select="displayItem[@name='description']"/></xsl:attribute> 223 </xsl:if> 224 225 <!-- Add the href element to the <a> tag --> 226 <xsl:choose> 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> 229 </xsl:when> 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> 233 </xsl:choose> 234 235 <!-- Add the actual text of the <a> tag --> 236 <xsl:value-of select="displayItem[@name='name']"/> 237 </a> 238 </li> 239 </xsl:for-each> 240 </xsl:if> 241 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> 266 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"> 279 <li><xsl:call-template name="RSSLink"/></li> 280 <li><xsl:call-template name="PrefsLink"/></li> 281 <li><xsl:call-template name="HelpLink"/></li> 282 <li id="userMenuButton"><xsl:call-template name="LoginoutLink"/></li> 283 <li><xsl:call-template name="DebugLink"/></li> 284 <xsl:call-template name="buttonStyling"/> 285 </ul> 286 </xsl:template> 287 288 <xsl:template name="RSSLink"> 289 <!-- RSS feed link can appear in a global format statement (where it has no type attribute) 290 or in section specific format statements, such as browse, search, display. 291 If it's present in any format statement, display the RSS link in the bannerlinks section. --> 292 <xsl:if test="/page/pageResponse/format[@type='display' or @type='browse' or @type='search' or not(@type)]/gsf:option[@name='RSS']/@value = 'true'"> 293 <gsf:link type="rss"><gsf:icon file="rssicon.png"/></gsf:link> 294 </xsl:if> 295 </xsl:template> 296 297 <xsl:template name="PrefsLink"> 298 <a href="{$library_name}/collection/{$collNameChecked}/page/pref"> 299 <xsl:attribute name="title"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'pref_tip')"/></xsl:attribute> 300 <span id="preferencesButton"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'pref_b')"/></span> 301 <script type="text/javascript"> 302 <xsl:text disable-output-escaping="yes"> 303 //$("#preferencesButton").button({icons:{primary:"ui-icon-wrench"}}); 304 //$("#preferencesButton .ui-button-text").css({"padding-top":"0px", "padding-bottom":"3px"}); 305 </xsl:text> 306 </script> 307 </a> 308 </xsl:template> 309 310 <xsl:template name="HelpLink"> 311 <a href="{$library_name}/collection/{$collNameChecked}/page/help"> 312 <xsl:attribute name="title"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'help_tip')"/></xsl:attribute> 313 <span id="helpButton"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'help_b')"/></span> 314 <script type="text/javascript"> 315 <xsl:text disable-output-escaping="yes"> 316 //$("#helpButton").button({icons:{primary:"ui-icon-help"}}); 317 //$("#helpButton .ui-button-text").css({"padding-top":"0px", "padding-bottom":"3px"}); 318 </xsl:text> 319 </script> 320 </a> 321 </xsl:template> 322 323 <xsl:template name="toggleUserMenuScript"> 324 <script type="text/javascript"> 325 <xsl:text disable-output-escaping="yes"> 326 function toggleUserMenu() 327 { 328 var button = $("#userMenuButton"); 329 var menu; 330 331 if(button.data("userMenu")) 332 { 333 menu = button.data("userMenu"); 334 if(menu.css("display") == "block") 335 { 336 menu.hide(); 337 } 338 else 339 { 340 menu.show(); 341 } 342 } 343 else 344 { 345 menu = $("<UL>") 346 .css("position", "absolute") 347 .css("display", "block") 348 .css("z-index", "100") 349 .css("list-style", "none outside none") 350 .css("margin", "0px") 351 .css("padding", "0px") 352 .css("font-size", "90%"); 353 354 menu.attr("id", "userMenu"); 355 356 button.data("userMenu", menu); 357 358 var settingsLink = $("<a>") 359 .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">"); 360 var settingsButton = $("<LI>") 361 .css("padding", "3px") 362 .html("</xsl:text><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'menu.account_settings')"/><xsl:text disable-output-escaping="yes">") 363 .addClass("ui-state-default"); 364 settingsLink.append(settingsButton); 365 366 var editingLink = $("<a>") 367 .attr("href", "javascript:;"); 368 var editingButton = $("<LI>") 369 .css("padding", "3px") 370 .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">") 371 .addClass("ui-state-default") 372 .click(function() 373 { 374 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"); 375 $.ajax(url) 376 .success(function(response) 377 { 378 location.reload(); 379 }); 380 }); 381 editingLink.append(editingButton); 382 383 var url = document.URL; 384 var hasQueryString = (url.indexOf("?") != -1); 385 var hashIndex = url.indexOf("#"); 386 387 var hashPart; 388 if(hashIndex != -1) 389 { 390 hashPart = url.substring(hashIndex); 391 url = url.substring(0, hashIndex); 392 } 393 394 var logoutLink = $("<a>") 395 .attr("href", url + (hasQueryString ? "&" : "?") + "logout=" + (hashPart ? hashPart : "")); 396 var logoutButton = $("<LI>") 397 .css("padding", "3px") 398 .html("</xsl:text><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'menu.logout')"/><xsl:text disable-output-escaping="yes">") 399 .addClass("ui-state-default"); 400 logoutLink.append(logoutButton); 401 402 menu.append(settingsLink); 403 menu.append(editingLink); 404 menu.append(logoutLink); 405 406 var buttonLeft = button.offset().left; 407 var buttonTop = button.offset().top; 408 409 var buttonHeight = button.height(); 410 411 menu.offset({top: buttonTop + buttonHeight + 4, left: buttonLeft}); 412 $("#topArea").append(menu); 413 } 414 } 415 </xsl:text> 416 </script> 417 418 </xsl:template> 419 <xsl:template name="generateLoginURL"> 420 <xsl:value-of select="$library_name"/> 421 <xsl:text>?a=p&sa=login&redirectURL=</xsl:text> 422 <xsl:value-of select="$library_name"/> 423 <xsl:text>%3F</xsl:text> 424 <xsl:if test="/page/pageRequest/@action"> 425 <xsl:text>a=</xsl:text> 426 <xsl:value-of select="/page/pageRequest/@action"/> 427 </xsl:if> 428 <xsl:if test="/page/pageRequest/@subaction"> 429 <xsl:text>%26sa=</xsl:text> 430 <xsl:value-of select="/page/pageRequest/@subaction"/> 431 </xsl:if> 432 <xsl:for-each select="/page/pageRequest/paramList/param"> 433 <xsl:if test="@name != 'password' and @name != 's1.password' and @name != 's1.newPassword' and @name != 's1.oldPassword'"> 434 <xsl:text>%26</xsl:text> 435 <xsl:value-of select="@name"/> 436 <xsl:text>=</xsl:text> 437 <xsl:value-of select="@value"/> 438 </xsl:if> 439 </xsl:for-each> 440 441 </xsl:template> 442 443 <xsl:template name="LoginoutLink"> 444 <!-- login/logout --> 445 <xsl:choose> 446 <xsl:when test="/page/pageRequest/userInformation/@username"> 447 <a> 448 <xsl:attribute name="href">javascript:toggleUserMenu();</xsl:attribute> 449 <xsl:call-template name="toggleUserMenuScript"/> 450 <span id="loginButton"><xsl:value-of select="/page/pageRequest/userInformation/@username"/></span> 451 <script type="text/javascript"> 452 <xsl:text disable-output-escaping="yes"> 453 //$("#loginButton").button({icons:{primary:"ui-icon-unlocked"}}); 454 //$("#loginButton .ui-button-text").css({"padding-top":"0px", "padding-bottom":"3px"}); 455 </xsl:text> 456 </script> 457 </a> 458 </xsl:when> 459 <xsl:otherwise> 460 <a> 461 <xsl:attribute name="href"><xsl:call-template name="generateLoginURL"/> 462 </xsl:attribute> 463 <xsl:attribute name="title"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'login_tip')"/></xsl:attribute> 464 <span id="loginButton"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'login_b')"/></span> 465 <script type="text/javascript"> 466 <xsl:text disable-output-escaping="yes"> 467 //$("#loginButton").button({icons:{primary:"ui-icon-locked"}}); 468 //$("#loginButton .ui-button-text").css({"padding-top":"0px", "padding-bottom":"3px"}); 469 </xsl:text> 470 </script> 471 </a> 472 </xsl:otherwise> 473 </xsl:choose> 474 </xsl:template> 475 476 <xsl:template name="DebugLink"> 477 <!-- debuginfo (doesn't use class="ui-state-error" since the text is not legible due to inherited text-colour) --> 478 <xsl:if test="/page/pageRequest/paramList/param[(@name='debug') and (@value='on' or @value='true' or @value='1' or @value='yes')]"> 479 <a href="{$library_name}/collection/{$collNameChecked}/page/debug"> 480 <xsl:attribute name="title"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'debuginfo_tip')"/></xsl:attribute> 481 <span id="debugButton"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'debuginfo_b')"/></span> 482 <script type="text/javascript"> 483 <xsl:text disable-output-escaping="yes"> 484 //$("#debugButton").button({icons:{primary:"ui-icon-info"}}); 485 //$("#debugButton .ui-button-text").css({"padding-top":"0px", "padding-bottom":"3px"}); 486 </xsl:text> 487 </script> 488 </a> 489 </xsl:if> 490 </xsl:template> 491 492 <xsl:template name="buttonStyling"> 493 <script type="text/javascript"> 494 <xsl:text disable-output-escaping="yes"> 495 $("#preferencesButton").button({icons:{primary:"ui-icon-wrench"}}); 496 $("#preferencesButton .ui-button-text").css({"padding-top":"0px", "padding-bottom":"3px"}); 497 $("#helpButton").button({icons:{primary:"ui-icon-help"}}); 498 $("#helpButton .ui-button-text").css({"padding-top":"0px", "padding-bottom":"3px"}); 499 $("#debugButton").button({icons:{primary:"ui-icon-info"}}); 500 $("#debugButton .ui-button-text").css({"padding-top":"0px", "padding-bottom":"3px"}); 501 </xsl:text> 502 <xsl:choose> 503 <xsl:when test="/page/pageRequest/userInformation/@username"> 504 <xsl:text disable-output-escaping="yes">$("#loginButton").button({icons:{primary:"ui-icon-unlocked"}});</xsl:text> 505 </xsl:when> 506 <xsl:otherwise> 507 <xsl:text disable-output-escaping="yes">$("#loginButton").button({icons:{primary:"ui-icon-locked"}});</xsl:text> 508 </xsl:otherwise> 509 </xsl:choose> 510 <xsl:text disable-output-escaping="yes"> 511 $("#loginButton .ui-button-text").css({"padding-top":"0px", "padding-bottom":"3px"}); 512 </xsl:text> 513 </script> 514 515 </xsl:template> 516 <!-- ***** PAGE TITLE ***** --> 517 <xsl:template name="page-title-area"> 518 <xsl:variable name="pageTitleVar"><xsl:call-template name="pageTitle"/></xsl:variable> 519 <div id="titlearea"> 520 <h2> 521 <!-- Resize the title based on how long it is (There's probably a better way to do this) --> 522 <xsl:attribute name="style"> 523 <xsl:choose> 524 <xsl:when test="string-length($pageTitleVar) < 20"> 525 <xsl:text>font-size: 1.5em;</xsl:text> 526 </xsl:when> 527 <xsl:when test="string-length($pageTitleVar) < 30"> 528 <xsl:text>font-size: 1.4em;</xsl:text> 529 </xsl:when> 530 <xsl:when test="string-length($pageTitleVar) < 40"> 531 <xsl:text>font-size: 1.3em;</xsl:text> 532 </xsl:when> 533 <xsl:when test="string-length($pageTitleVar) < 50"> 534 <xsl:text>font-size: 1.2em;</xsl:text> 535 </xsl:when> 536 <xsl:when test="string-length($pageTitleVar) < 60"> 537 <xsl:text>font-size: 1.1em;</xsl:text> 538 </xsl:when> 539 <xsl:when test="string-length($pageTitleVar) < 70"> 540 <xsl:text>font-size: 1em;</xsl:text> 541 </xsl:when> 542 <xsl:when test="string-length($pageTitleVar) < 80"> 543 <xsl:text>font-size: 0.9em;</xsl:text> 544 </xsl:when> 545 <xsl:when test="string-length($pageTitleVar) < 90"> 546 <xsl:text>font-size: 0.8em;</xsl:text> 547 </xsl:when> 548 <xsl:otherwise> 549 <xsl:text>font-size: 0.7em;</xsl:text> 550 </xsl:otherwise> 551 </xsl:choose> 552 </xsl:attribute> 553 <!--<xsl:value-of select="string-length($pageTitleVar)" />--> 554 <xsl:value-of select="$pageTitleVar" /> 555 </h2><xsl:text> </xsl:text> 556 </div> 557 </xsl:template> 558 559 <!-- ***** QUICK SEARCH AREA ***** --> 560 <!-- Search form should only appear if there's a search (query) service AND it has an index. 561 By default, all collections end up with some query service (default is MGPP) even when they have 562 no search indexes, which is why the extra test for the presence of an index/fq-something is necessary. --> 563 <xsl:template name="quick-search-area"> 564 <xsl:if test="/page/pageResponse/collection[@name=$collNameChecked]/serviceList/service[@type='query']"> 565 <xsl:variable name="subaction" select="/page/pageRequest/@subaction"/> 566 <div id="quicksearcharea"> 567 <xsl:if test="/page/pageResponse/collection[@name=$collNameChecked]/serviceList/service[@name='TextQuery']"> 568 <xsl:choose> 569 <xsl:when test="not(page/pageRequest[@action='q']) or /page/pageRequest/paramList/param[@name='qs']/@value = '1'"> 570 <form action="{$library_name}/collection/{$collNameChecked}/search/TextQuery"> 571 <!-- This parameter says that we have come from the quick search area --> 572 <input type="hidden" name="qs" value="1"/> 573 <input type="hidden" name="rt" value="rd"/> 574 <input type="hidden" name="s1.level"> 575 <xsl:attribute name="value"> 576 <xsl:value-of select="/page/pageResponse/collection/serviceList/service[@name='TextQuery']/paramList/param[@name = 'level']/@default"/> 577 </xsl:attribute> 578 </input> 579 <xsl:choose> 580 <xsl:when test="/page/pageResponse/service[@name = 'TextQuery']/paramList/param[@name = 'startPage']"> 581 <input type="hidden" name="s1.startPage" value="1"/> 582 </xsl:when> 583 <xsl:otherwise> 584 <input type="hidden" name="startPage" value="1"/> 585 </xsl:otherwise> 586 </xsl:choose> 587 588 <!-- The query text box --> 589 <span class="querybox"> 590 <xsl:variable name="qs"> 591 <xsl:apply-templates select="/page/pageResponse/collection[@name=$collNameChecked]/serviceList/service[@name='TextQuery']/paramList/param[@name='query']" mode="calculate-default"/> 592 </xsl:variable> 593 <nobr> 594 <xsl:apply-templates select="/page/pageResponse/collection[@name=$collNameChecked]/serviceList/service[@name='TextQuery']/paramList/param[@name='query']"> 595 <!-- 596 <xsl:with-param name="default" select="java:org.greenstone.gsdl3.util.XSLTUtil.tidyWhitespace($qs, /page/@lang)"/> 597 --> 598 <xsl:with-param name="default" select="normalize-space($qs)"/> 599 600 </xsl:apply-templates> 601 </nobr> 602 </span> 603 <!-- The index selection list --> 604 <xsl:if test="/page/pageResponse/collection[@name=$collNameChecked]/serviceList/service[@name='TextQuery']/paramList/param[@name='index']/@type = 'enum_single'"> 605 <span class="textselect"> 606 <xsl:apply-templates select="/page/pageResponse/collection[@name=$collNameChecked]/serviceList/service[@name='TextQuery']/paramList/param[@name='index']"> 607 <xsl:with-param name="default"> 608 <xsl:apply-templates select="/page/pageResponse/collection[@name=$collNameChecked]/serviceList/service[@name='TextQuery']/paramList/param[@name='index']" mode="calculate-default"/> 609 </xsl:with-param> 610 <xsl:with-param name="hideSingle">false</xsl:with-param> 611 <xsl:with-param name="quickSearch">true</xsl:with-param> 612 </xsl:apply-templates> 613 </span> 614 </xsl:if> 615 <!-- The partition selection list --> 616 <xsl:if test="/page/pageResponse/collection[@name=$collNameChecked]/serviceList/service[@name='TextQuery']/paramList/param[@name='indexSubcollection']/@type = 'enum_single'"> 617 <span class="textselect"> 618 <xsl:apply-templates select="/page/pageResponse/collection[@name=$collNameChecked]/serviceList/service[@name='TextQuery']/paramList/param[@name='indexSubcollection']"> 619 <xsl:with-param name="default"> 620 <xsl:apply-templates select="/page/pageResponse/collection[@name=$collNameChecked]/serviceList/service[@name='TextQuery']/paramList/param[@name='indexSubcollection']" mode="calculate-default"/> 621 </xsl:with-param> 622 <xsl:with-param name="hideSingle">true</xsl:with-param> 623 <xsl:with-param name="quickSearch">true</xsl:with-param> 624 </xsl:apply-templates> 625 </span> 626 </xsl:if> 627 <!-- The language selection list --> 628 <xsl:if test="/page/pageResponse/collection[@name=$collNameChecked]/serviceList/service[@name='TextQuery']/paramList/param[@name='indexLanguage']/@type = 'enum_single'"> 629 <span class="textselect"> 630 <xsl:apply-templates select="/page/pageResponse/collection[@name=$collNameChecked]/serviceList/service[@name='TextQuery']/paramList/param[@name='indexLanguage']"> 631 <xsl:with-param name="default"> 632 <xsl:apply-templates select="/page/pageResponse/collection[@name=$collNameChecked]/serviceList/service[@name='TextQuery']/paramList/param[@name='indexLanguage']" 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 submit button (for TextQuery) --> 640 <xsl:if test="/page/pageResponse/collection[@name=$collNameChecked]/serviceList/service[@name='TextQuery']"> 641 <input type="submit" id="quickSearchSubmitButton"> 642 <xsl:attribute name="value"> 643 <xsl:value-of select="/page/pageResponse/collection[@name=$collNameChecked]/serviceList/service[@name='TextQuery']/displayItem[@name='submit']"/> 644 </xsl:attribute> 645 </input> 646 <br/> 647 </xsl:if> 648 </form> 649 </xsl:when> 650 <xsl:otherwise><br/></xsl:otherwise> 651 </xsl:choose> 652 </xsl:if> 653 <!-- The list of other search types --> 654 <ul> 655 <xsl:for-each select="/page/pageResponse/collection[@name=$collNameChecked]/serviceList/service[@type='query']"> 656 <li> 657 <xsl:choose> 658 <xsl:when test="@name = /page/pageRequest/paramList/param[@name='s']/@value and not(/page/pageRequest/paramList/param[@name='qs']/@value = 1)"> 659 <xsl:attribute name="class">ui-state-default ui-corner-all ui-state-active</xsl:attribute> 660 </xsl:when> 661 <xsl:otherwise> 662 <xsl:attribute name="class">ui-state-default ui-corner-all</xsl:attribute> 663 </xsl:otherwise> 664 </xsl:choose> 665 <a> 666 <xsl:attribute name="href"> 667 <xsl:value-of select="$library_name"/>/collection/<xsl:value-of select="$collNameChecked"/>/search/<xsl:value-of select="@name"/> 668 </xsl:attribute> 669 <xsl:value-of select="displayItem[@name='name']"/> 670 </a> 671 </li> 672 </xsl:for-each> 673 </ul> 674 </div> 675 </xsl:if> 676 </xsl:template> 677 678 <xsl:template name="map-scripts"> 679 <meta content="initial-scale=1.0, user-scalable=no" name="viewport"/> 680 <script src="http://maps.googleapis.com/maps/api/js?key=AIzaSyCofVTps3xHfMvIcTMHqYMMxe3xXfkAxnI" type="text/javascript"><xsl:text> </xsl:text></script> 681 <script src="interfaces/{$interface_name}/js/map-scripts.js" type="text/javascript"><xsl:text> </xsl:text></script> 682 <script type="text/javascript">$(window).load(initializeMapScripts);</script> 683 </xsl:template> 684 685 <xsl:template name="openlayers-map-scripts"> 686 <script src="interfaces/{interface_name}/js/OpenLayers.js" type="text/javascript"><xsl:text> </xsl:text></script> 687 </xsl:template> 688 689 <xsl:template name="panoramaViewer-scripts"> 690 <script src="interfaces/{$interface_name}/js/three45.min.js" type="text/javascript"><xsl:text> </xsl:text></script> 691 <script src="interfaces/{$interface_name}/js/Tween.js" type="text/javascript"><xsl:text> </xsl:text></script> 692 <script src="interfaces/{$interface_name}/js/Detector.js" type="text/javascript"><xsl:text> </xsl:text></script> 693 <script src="interfaces/{$interface_name}/js/RequestAnimationFrame.js" type="text/javascript"><xsl:text> </xsl:text></script> 694 <script src="interfaces/{$interface_name}/js/panoramaMarker.js" type="text/javascript"><xsl:text> </xsl:text></script> 695 <script src="interfaces/{$interface_name}/js/panoramaViewer.js" type="text/javascript"><xsl:text> </xsl:text></script> 696 <script type="text/javascript">$(window).load(initPanoramaViewer);$(window).load(_animate);</script> 697 </xsl:template> 698 699 <xsl:template name="choose-title"> 700 <gsf:choose-metadata> 701 <gsf:metadata name="dc.Title"/> 702 <gsf:metadata name="exp.Title"/> 703 <gsf:metadata name="ex.dc.Title"/> 704 <gsf:metadata name="Title"/> 705 <gsf:default>Untitled</gsf:default> 706 </gsf:choose-metadata> 707 </xsl:template> 643 </ul> 644 </div> 645 </xsl:if> 646 </xsl:template> 647 648 <xsl:template name="map-scripts"> 649 <meta content="initial-scale=1.0, user-scalable=no" name="viewport"/> 650 <script src="http://maps.googleapis.com/maps/api/js?key=AIzaSyCofVTps3xHfMvIcTMHqYMMxe3xXfkAxnI" type="text/javascript"><xsl:text> </xsl:text></script> 651 <script src="interfaces/{$interface_name}/js/map-scripts.js" type="text/javascript"><xsl:text> </xsl:text></script> 652 <script type="text/javascript">$(window).load(initializeMapScripts);</script> 653 </xsl:template> 654 655 <xsl:template name="openlayers-map-scripts"> 656 <script src="interfaces/{interface_name}/js/OpenLayers.js" type="text/javascript"><xsl:text> </xsl:text></script> 657 </xsl:template> 658 659 <xsl:template name="panoramaViewer-scripts"> 660 <script src="interfaces/{$interface_name}/js/three45.min.js" type="text/javascript"><xsl:text> </xsl:text></script> 661 <script src="interfaces/{$interface_name}/js/Tween.js" type="text/javascript"><xsl:text> </xsl:text></script> 662 <script src="interfaces/{$interface_name}/js/Detector.js" type="text/javascript"><xsl:text> </xsl:text></script> 663 <script src="interfaces/{$interface_name}/js/RequestAnimationFrame.js" type="text/javascript"><xsl:text> </xsl:text></script> 664 <script src="interfaces/{$interface_name}/js/panoramaMarker.js" type="text/javascript"><xsl:text> </xsl:text></script> 665 <script src="interfaces/{$interface_name}/js/panoramaViewer.js" type="text/javascript"><xsl:text> </xsl:text></script> 666 <script type="text/javascript">$(window).load(initPanoramaViewer);$(window).load(_animate);</script> 667 </xsl:template> 668 669 <xsl:template name="choose-title"> 670 <gsf:choose-metadata> 671 <gsf:metadata name="dc.Title"/> 672 <gsf:metadata name="exp.Title"/> 673 <gsf:metadata name="ex.dc.Title"/> 674 <gsf:metadata name="Title"/> 675 <gsf:default>Untitled</gsf:default> 676 </gsf:choose-metadata> 677 </xsl:template> 708 678 </xsl:stylesheet>
Note:
See TracChangeset
for help on using the changeset viewer.