source: main/trunk/model-sites-dev/pei-jones/transform/layouts/header.xsl@ 31793

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

committing core files for pei jones project

File size: 10.9 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
12 <xsl:template name="additionalHeaderContent-site">
13 <!-- override the cssTheme from interfaceConfig -->
14 <link rel="stylesheet" href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.10/themes/humanity/jquery-ui.css" type="text/css"/>
15 <xsl:call-template name="berryBasketHeadTags"/>
16 <xsl:call-template name="PeiJonesBackgroundWrapperSite"/>
17
18 <xsl:variable name="url">
19 <xsl:text>sites/</xsl:text>
20 <xsl:value-of select="$siteName"/>
21 </xsl:variable>
22 <link href="sites/pei-jones/style/custom.css" rel="stylesheet" type="text/css"/>
23 <link href="{$url}/script/image-annotator/css/annotation.css" rel="stylesheet" type="text/css"/>
24 <!--
25 <link href="{$url}/style/pei-jones-background.css" rel="stylesheet" type="text/css"/>
26 -->
27 <link href="{$url}/script/text-annotator/annotator.min.css" rel="stylesheet" type="text/css"/>
28 <gsf:script src="{$url}/script/image-annotator/js/jquery.annotate2.js"/>
29 <gsf:script src="{$url}/script/gsajax-min.js"/>
30 <gsf:script src="{$url}/script/setup-features.js"/>
31 <!--
32 gsf:script src="{$url}/script/text-annotator/annotator-full.min.js"/>
33 -->
34 <script text="text/javascript">
35 <xsl:text disable-output-escaping="yes">$(document).ready(function(){
36 /* hide cover image div */
37 var found = $(document).find("#coverImage");
38
39 if(found.length != 0){
40 var coverImageDiv = found[0];
41 $(coverImageDiv).hide();
42 }
43 });</xsl:text>
44 </script>
45 <!-- <script type="text/javascript">
46 dynamic_metadata_list = false;
47 </script>-->
48
49 </xsl:template>
50
51 <xsl:template name="PeiJonesBackground">
52 <style>
53
54
55 body {
56 background-image: url(sites/<xsl:value-of select="$site_name"/>/images/background.jpg);
57 background-repeat: no-repeat;
58 background-position: center top;
59 background-color: #2d2d2d;
60 }
61
62
63 #containerXXX {
64 max-width: 980px;
65 }
66
67 .ui-widget-header {
68 background: url(sites/<xsl:value-of select="$site_name"/>/images/pei-jones-banner-bg.png);
69 repeat-x scroll left top #f1ce28;
70 }
71
72 .ui-widget-content {
73 color: #888888;
74 }
75
76 .ui-state-default, .ui-widget-content .ui-state-default, .ui-widget-header .ui-state-default {
77/* background: url("images/ui-bg_highlight-hard_15_459e00_1x100.png") repeat-x scroll 50% 50% #459E00; */
78/* background: url(interfaces/<xsl:value-of select="$interface_name"/>/xxstyle/themes/main/images/ui-bg_highlight-hard_15_459e00_1x100.png) repeat-x scroll 50% 50% #a0a0a0; */
79
80 background: none repeat-x scroll 50% 50% #a0a0a0;
81/* border: 1px solid #327E04; */
82 border: 1px solid #808080;
83 color: #FFFFFF;
84 font-weight: bold;
85 }
86
87 .ui-widget-header {
88 border: 1px solid #808080;
89 }
90
91 .ui-state-active a, .ui-state-active a:link, .ui-state-active a:visited {
92 color: #000000;
93 /* text-decoration: none; */
94 }
95
96
97
98 </style>
99 </xsl:template>
100
101
102
103 <xsl:template name="PeiJonesBackgroundWrapperSite">
104
105 <xsl:variable name="url">
106 <xsl:text>sites/</xsl:text>
107 <xsl:value-of select="$siteName"/>
108 </xsl:variable>
109
110 <link type="text/css" rel="stylesheet" href="{$url}/wrapper-style/default.css" media="all" />
111 <!--[if IE]><link type="text/css" rel="stylesheet" href="{$url}/wrapper-style/large.css" media="all" /><![endif]-->
112 <link type="text/css" rel="stylesheet" href="{$url}/wrapper-style/print.css" media="print" />
113 <link rel="shortcut icon" type="image/ico" href="{$url}/wrapper-style/favicon.ico" />
114
115
116
117 <style>
118 .ui-widget-header {
119 background: #231814 url(<xsl:value-of select="$url"/>/wrapper-style/images/peijones-background-topline.png) no-repeat top left;
120
121 }
122
123
124 input, textarea {
125 padding: 0px;
126 }
127
128
129 table#classifiernodelist {
130 text-transform: inherit;
131 }
132
133 .metaTableCellName {
134 background: none repeat scroll 0 0 #FDDC75;
135 }
136
137
138 </style>
139
140 <gsf:script language="JavaScript" src="{$url}/wrapper-style/script.js"></gsf:script>
141
142
143 </xsl:template>
144
145 <xsl:template name="PeiJonesBackground2014">
146
147 <link type="text/css" rel="stylesheet" href="http://peitehurinuijones.co.nz/temp/default.css" media="all" />
148 <!--[if IE]><link type="text/css" rel="stylesheet" href="large.css" media="all" /><![endif]-->
149 <link type="text/css" rel="stylesheet" href="http://peitehurinuijones.co.nz/temp/print.css" media="print" />
150 <link rel="shortcut icon" type="image/ico" href="http://peitehurinuijones.co.nz/temp/favicon.ico" />
151
152
153 <style>
154 body {
155 background-image: url(sites/<xsl:value-of select="$site_name"/>/images/background.jpg);
156 background-repeat: no-repeat;
157 background-position: center top;
158 background-color: #2d2d2d;
159 }
160
161 #containerXXX {
162 max-width: 980px;
163 }
164
165 #topArea {
166 margin: 0px auto 0;
167 /* max-width: 970px; */
168 }
169
170 .ui-widget-header {
171 background: url(sites/<xsl:value-of select="$site_name"/>/images/pei-jones-banner-bg.png);
172 repeat-x scroll left top #f1ce28;
173 }
174
175 .ui-widget-content {
176 color: #888888;
177 }
178
179 .ui-state-default, .ui-widget-content .ui-state-default, .ui-widget-header .ui-state-default {
180/* background: url("images/ui-bg_highlight-hard_15_459e00_1x100.png") repeat-x scroll 50% 50% #459E00; */
181/* background: url(interfaces/<xsl:value-of select="$interface_name"/>/xxstyle/themes/main/images/ui-bg_highlight-hard_15_459e00_1x100.png) repeat-x scroll 50% 50% #a0a0a0; */
182
183 background: none repeat-x scroll 50% 50% #a0a0a0;
184/* border: 1px solid #327E04; */
185 border: 1px solid #808080;
186 color: #FFFFFF;
187 font-weight: bold;
188 }
189
190 .ui-widget-header {
191 border: 1px solid #808080;
192 }
193
194 .ui-state-active a, .ui-state-active a:link, .ui-state-active a:visited {
195 color: #000000;
196 /* text-decoration: none; */
197 }
198 </style>
199 </xsl:template>
200
201
202
203
204
205 <xsl:template name="UserTrackerScripts">
206 <script type="text/javascript">
207 <xsl:text disable-output-escaping="yes">
208 $(window).load(function()
209 {
210 if(gs.cgiParams.d &amp;&amp; gs.userInformation &amp;&amp; gs.userInformation.editEnabled == "true")
211 {
212 var statusBarDiv = $("&lt;div&gt;");
213 $("#gs_content").prepend(statusBarDiv);
214 var statusBar = new StatusBar(statusBarDiv[0]);
215 var statusUsernameMap = new Array();
216
217 var recordActionFunction = function()
218 {
219 var action = gs.userInformation.currentAction;
220 if(!action)
221 {
222 action = "viewingPage";
223 }
224 $.ajax(gs.xsltParams.library_name + "?a=g&amp;rt=ro&amp;s=RecordUserAction&amp;s1.site=" + gs.xsltParams.site_name + "&amp;s1.collection=" + gs.cgiParams.c + "&amp;s1.oid=" + gs.cgiParams.d + "&amp;s1.username=" + gs.userInformation.username + "&amp;s1.action=" + action);
225
226 if(action == "savingNote" &amp;&amp; gs.userInformation.saveSentOnce)
227 {
228 gs.userInformation.currentAction = "viewingPage";
229 gs.userInformation.saveSentOnce = false;
230 }
231 else if(action == "savingNote")
232 {
233 gs.userInformation.saveSentOnce = true;
234 }
235 }
236 setInterval(recordActionFunction, 5000);
237 recordActionFunction();
238
239 var userTrackerFunction = function(url)
240 {
241 $.ajax(url)
242 .success(function(response)
243 {
244 statusBar.clear();
245 var xml = $.parseXML(response);
246 $(xml).find("userList user").each(function()
247 {
248 var username = $(this).attr("username");
249 if(username == gs.userInformation.username)
250 {
251 return;
252 }
253
254 var statusString;
255 if($(this).attr("action") == "viewingPage")
256 {
257 statusString = "User " + $(this).attr("username") + " is currently viewing this page";
258 }
259 else if($(this).attr("action") == "addingNote")
260 {
261 statusString = "User " + $(this).attr("username") + " is currently adding a note";
262 }
263 else if($(this).attr("action") == "editingNote")
264 {
265 statusString = "User " + $(this).attr("username") + " is currently editing a note";
266 }
267 else if($(this).attr("action") == "savingNote")
268 {
269 gs.userInformation.reloadRequired = true;
270 statusString = "User " + $(this).attr("username") + " has saved a note";
271 }
272
273 if(gs.userInformation.reloadRequired)
274 {
275 statusString += ", a note has been added or changed, please click &lt;a href=\"javascript:location.reload();\"&gt;here&lt;/a&gt; to reload the page";
276 }
277 statusBar.addStatus(statusString);
278 });
279 });
280 }
281 var getURL = gs.xsltParams.library_name + "?a=g&amp;rt=ro&amp;s=GetActivityOnPage&amp;s1.site=" + gs.xsltParams.site_name + "&amp;s1.collection=" + gs.cgiParams.c + "&amp;s1.oid=" + gs.cgiParams.d;
282 setInterval(function(){userTrackerFunction(getURL);}, 10000);
283 userTrackerFunction(getURL);
284 }
285 });
286 </xsl:text>
287 </script>
288 </xsl:template>
289
290 <!-- redefine this to only include the buttons we want, and don't include the styling -->
291 <xsl:template name="home-help-preferences">
292 <xsl:call-template name="PrefsLink"/>
293 <xsl:call-template name="HelpLink"/>
294 <span id="userMenuButton"><xsl:call-template name="LoginoutLink"/></span>
295 </xsl:template>
296
297 <!-- redefine to link to google doc -->
298 <xsl:template name="HelpLink">
299 <!-- help -->
300 <a><xsl:attribute name="href"><xsl:value-of select="$library_name"/>/collection/<xsl:value-of select="/page/pageResponse/collection/@name"/>/page/html?url=https://docs.google.com/document/d/18PinB6uwdOvwzPi8foIV0hF4G8eNVYJ5XyqYL_k7ij0/edit?usp=sharing</xsl:attribute>
301 <xsl:attribute name="title"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'help_tip')"/></xsl:attribute>
302 <span id="helpButton"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'help_b')"/></span>
303 </a>
304 </xsl:template>
305
306</xsl:stylesheet>
Note: See TracBrowser for help on using the repository browser.