source: main/trunk/greenstone3/web/interfaces/therin/transform/layouts/header.xsl@ 30153

Last change on this file since 30153 was 30153, checked in by kjdon, 7 years ago

changed to use ckeditor instead of direct-edit, to keep in line with new default interface

File size: 6.2 KB
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
45
46
47 <link rel="stylesheet" media="screen" href="interfaces/{$interface_name}/css/superfish.css"> </link>
48 <link rel="stylesheet" href="interfaces/{$interface_name}/css/nivo-slider.css" media="all"> </link>
49 <link rel="stylesheet" href="interfaces/{$interface_name}/css/tweet.css" media="all"> </link>
50 <link rel="stylesheet" href="interfaces/{$interface_name}/css/style.css"> </link>
51 <link rel="stylesheet" media="all" href="interfaces/{$interface_name}/css/lessframework.css"> </link>
52 <link rel="stylesheet" media="all" href="interfaces/{$interface_name}/css/gs3-core-min.css"> </link>
53
54 <!-- All JavaScript at the bottom, except this Modernizr build.
55 Modernizr enables HTML5 elements & feature detects for optimal performance.
56 Create your own custom Modernizr build: www.modernizr.com/download/ -->
57 <script src="interfaces/{$interface_name}/js/modernizr-2.5.3.min.js"><xsl:text> </xsl:text></script>
58
59
60 <link rel="shortcut icon" href="interfaces/{$interface_name}/images/favicon.ico"/>
61
62 <script type="text/javascript" src="interfaces/{$interface_name}/js/jquery.min.js"><xsl:text> </xsl:text></script>
63 <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>
64 <script src="http://code.jquery.com/jquery-migrate-1.2.1.js"><xsl:text> </xsl:text></script>
65
66 <script type="text/javascript" src="interfaces/{$interface_name}/js/jquery.themeswitcher.min.js"><xsl:text> </xsl:text></script>
67 <script type="text/javascript" src="interfaces/{$interface_name}/js/jquery.blockUI.js"><xsl:text> </xsl:text></script>
68
69
70
71 <!-- superfish -->
72 <script src="interfaces/{$interface_name}/js/superfish-1.4.8/js/hoverIntent.js"><xsl:text> </xsl:text></script>
73 <script src="interfaces/{$interface_name}/js/superfish-1.4.8/js/superfish.js"><xsl:text> </xsl:text></script>
74 <script src="interfaces/{$interface_name}/js/superfish-1.4.8/js/supersubs.js"><xsl:text> </xsl:text></script>
75 <!-- ENDS superfish -->
76
77 <script src="interfaces/{$interface_name}/js/jquery.nivo.slider.js" ><xsl:text> </xsl:text></script>
78 <script src="interfaces/{$interface_name}/js/css3-mediaqueries.js"><xsl:text> </xsl:text></script>
79 <script src="interfaces/{$interface_name}/js/tabs.js"><xsl:text> </xsl:text></script>
80
81
82 <script type="text/javascript" src="interfaces/{$interface_name}/js/poshytip-1.1/src/jquery.poshytip.js"><xsl:text> </xsl:text></script>
83
84 <script type="text/javascript" src="interfaces/{$interface_name}/js/ace/ace.js"><xsl:text> </xsl:text></script>
85
86 <script type="text/javascript" src="interfaces/{$interface_name}/js/zoomer.js"><xsl:text> </xsl:text></script>
87
88 <xsl:if test="/page/pageResponse/format[@type='display' or @type='browse' or @type='search']/gsf:option[@name='mapEnabled']/@value = 'true'">
89 <xsl:call-template name="map-scripts"/>
90 </xsl:if>
91
92 <xsl:if test="/page/pageResponse/format/gsf:option[@name='mapEnabledOpenLayers']/@value = 'true'">
93 <xsl:call-template name="openlayers-map-scripts"/>
94 </xsl:if>
95
96
97 <xsl:if test="/page/pageResponse/format/gsf:option[@name='panoramaViewerEnabled']/@value = 'true'">
98 <xsl:call-template name="panoramaViewer-scripts"/>
99 </xsl:if>
100
101 <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))">
102 <xsl:if test="/page/pageRequest/paramList/param[(@name='docEdit') and (@value='on' or @value='true' or @value='1')]">
103 <script type="text/javascript" src="interfaces/{$interface_name}/js/ckeditor/ckeditor.js" defer="true"><xsl:text> </xsl:text></script>
104 <!--<script type="text/javascript" src="interfaces/{$interface_name}/js/direct-edit.js"><xsl:text> </xsl:text></script>-->
105 <!--<xsl:call-template name="init-direct-edit"/>-->
106 </xsl:if>
107 <script type="text/javascript" src="interfaces/{$interface_name}/js/debug_scripts.js"><xsl:text> </xsl:text></script>
108 <script type="text/javascript" src="interfaces/{$interface_name}/js/visual-xml-editor.js"><xsl:text> </xsl:text></script>
109 </xsl:if>
110
111 <xsl:call-template name="setup-gs-variable"/>
112 <xsl:call-template name="define-js-macro-variables"/>
113
114 <xsl:call-template name="additionalHeaderContent"/>
115 </xsl:template>
116
117</xsl:stylesheet>
Note: See TracBrowser for help on using the repository browser.