root/documentation/trunk/tutorial_sample_files/libraries/althor/transform/layouts/header.xsl @ 30047

Revision 30047, 4.6 KB (checked in by ak19, 4 years ago)

No more direct-edit.js and no init-direct-edit.js defined in default/transform/layout/header.xsl any more.

Line 
1<?xml version="1.0" encoding="UTF-8"?>
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    <!-- Creates a header for the html page -->
12    <xsl:template name="create-html-header">
13        <base>
14            <xsl:attribute name="href">
15                <xsl:choose>
16                    <xsl:when test="/page/pageResponse/metadataList/metadata[@name = 'siteURL']">
17                        <xsl:value-of select="/page/pageResponse/metadataList/metadata[@name = 'siteURL']"/>
18                    </xsl:when>
19                    <xsl:when test="/page/pageRequest/@baseURL">
20                        <xsl:value-of select="/page/pageRequest/@baseURL"/>
21                    </xsl:when>
22                </xsl:choose>
23            </xsl:attribute>
24        </base>
25        <xsl:comment>[if lte IE 6]&gt;&lt;/base&gt;&lt;![endif]</xsl:comment>
26   
27        <title><xsl:call-template name="pageTitle"/> :: <xsl:call-template name="siteName"/></title>
28       
29        <xsl:if test="/page/pageRequest/@action ='d'">
30         
31          <xsl:variable name="myMetadataHeader" select="/page/pageResponse/format/gsf:headMetaTags/gsf:metadata"/>
32          <xsl:for-each select="$myMetadataHeader">
33            <xsl:variable name="metaname" select="@name"/>
34           
35            <xsl:variable name="metavals"
36                  select="/page/pageResponse/document/metadataList/metadata[@name = $metaname]|/page/pageResponse/document/documentNode/metadataList/metadata[@name = $metaname]"/>
37            <xsl:for-each select="$metavals">
38              <META NAME="{$metaname}" CONTENT="{.}"/>
39            </xsl:for-each>
40          </xsl:for-each>
41         
42        </xsl:if>
43
44            <link rel="stylesheet" media="screen" href="interfaces/{$interface_name}/css/superfish.css" />
45    <link rel="stylesheet" href="interfaces/{$interface_name}/css/nivo-slider.css" media="all"  />
46    <link rel="stylesheet" href="interfaces/{$interface_name}/css/tweet.css" media="all"  />
47    <link rel="stylesheet" href="interfaces/{$interface_name}/css/style.css"/>
48    <link rel="stylesheet" media="all" href="interfaces/{$interface_name}/css/lessframework.css"/>
49        <link rel="stylesheet" href="interfaces/{$interface_name}/css/gs3-core-min.css"/>   
50        <link rel="shortcut icon" href="interfaces/{$interface_name}/images/favicon.ico"/>
51       
52        <script type="text/javascript" src="interfaces/{$interface_name}/js/jquery.min.js"><xsl:text> </xsl:text></script>
53        <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>
54        <script type="text/javascript" src="interfaces/{$interface_name}/js/jquery.themeswitcher.min.js"><xsl:text> </xsl:text></script>
55        <script type="text/javascript" src="interfaces/{$interface_name}/js/jquery.blockUI.js"><xsl:text> </xsl:text></script>
56        <script type="text/javascript" src="interfaces/{$interface_name}/js/ace/ace.js"><xsl:text> </xsl:text></script>
57       
58        <script type="text/javascript" src="interfaces/{$interface_name}/js/zoomer.js"><xsl:text> </xsl:text></script>
59
60        <xsl:if test="/page/pageResponse/format[@type='display' or @type='browse' or @type='search']/gsf:option[@name='mapEnabled']/@value = 'true'">
61          <xsl:call-template name="map-scripts"/>
62        </xsl:if>
63       
64        <xsl:if test="/page/pageResponse/format/gsf:option[@name='mapEnabledOpenLayers']/@value = 'true'">
65          <xsl:call-template name="openlayers-map-scripts"/>
66        </xsl:if>
67
68
69        <xsl:if test="/page/pageResponse/format/gsf:option[@name='panoramaViewerEnabled']/@value = 'true'">
70          <xsl:call-template name="panoramaViewer-scripts"/>
71        </xsl:if>
72
73        <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))">
74            <xsl:if test="/page/pageRequest/paramList/param[(@name='docEdit') and (@value='on' or @value='true' or @value='1')]">
75            </xsl:if>
76            <script type="text/javascript" src="interfaces/{$interface_name}/js/debug_scripts.js"><xsl:text> </xsl:text></script>
77            <script type="text/javascript" src="interfaces/{$interface_name}/js/visual-xml-editor.js"><xsl:text> </xsl:text></script>
78        </xsl:if>
79       
80        <xsl:call-template name="setup-gs-variable"/>
81        <xsl:call-template name="define-js-macro-variables"/>
82
83        <xsl:call-template name="additionalHeaderContent"/>
84    </xsl:template>
85   
86</xsl:stylesheet>
Note: See TracBrowser for help on using the browser.