/[web]/templates/bugzilla/work/global/header.html.tmpl
ViewVC logotype

Contents of /templates/bugzilla/work/global/header.html.tmpl

Parent Directory Parent Directory | Revision Log Revision Log


Revision 971 - (show annotations) (download)
Tue Jan 31 15:30:51 2012 UTC (12 years, 2 months ago) by dmorgan
File size: 12074 byte(s)
Add vanilla 4.0.x template to add custom mageia template
1 [%# The contents of this file are subject to the Mozilla Public
2 # License Version 1.1 (the "License"); you may not use this file
3 # except in compliance with the License. You may obtain a copy of
4 # the License at http://www.mozilla.org/MPL/
5 #
6 # Software distributed under the License is distributed on an "AS
7 # IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
8 # implied. See the License for the specific language governing
9 # rights and limitations under the License.
10 #
11 # The Original Code is the Bugzilla Bug Tracking System.
12 #
13 # The Initial Developer of the Original Code is Netscape Communications
14 # Corporation. Portions created by Netscape are
15 # Copyright (C) 1998 Netscape Communications Corporation. All
16 # Rights Reserved.
17 #
18 # Contributor(s): Gervase Markham <gerv@gerv.net>
19 # Vaskin Kissoyan <vkissoyan@yahoo.com>
20 # Vitaly Harisov <vitaly@rathedg.com>
21 # Svetlana Harisova <light@rathedg.com>
22 #%]
23
24 [%# INTERFACE:
25 # (All the below interface elements are optional.)
26 # title: string. Page title.
27 # header: string. Main page header.
28 # subheader: string. Page subheader.
29 # header_addl_info: string. Additional header information.
30 # bodyclasses: array of extra CSS classes for the <body>
31 # onload: string. JavaScript code to run when the page finishes loading.
32 # javascript: string. Javascript to go in the header.
33 # javascript_urls: list. List of URLs to Javascript.
34 # style: string. CSS style.
35 # style_urls: list. List of URLs to CSS style sheets.
36 # message: string. A message to display to the user. May contain HTML.
37 # atomlink: Atom link URL, May contain HTML
38 #%]
39
40 [% IF message %]
41 [% PROCESS global/messages.html.tmpl %]
42 [% END %]
43
44 [% DEFAULT
45 subheader = ""
46 header_addl_info = ""
47 onload = ""
48 style_urls = []
49 yui = []
50 %]
51
52 [% SET yui_css = {
53 autocomplete => 1,
54 calendar => 1,
55 datatable => 1,
56 button => 1,
57 } %]
58
59 [%# Note: This is simple dependency resolution--you can't have dependencies
60 # that depend on each other. You have to specify all of a module's deps,
61 # if that module is going to be specified in "yui".
62 #%]
63 [% SET yui_deps = {
64 autocomplete => ['json', 'connection', 'datasource'],
65 datatable => ['json', 'connection', 'datasource', 'element'],
66 } %]
67
68 [%# When using certain YUI modules, we need to process certain
69 # extra JS templates.
70 #%]
71 [% SET yui_templates = {
72 datatable => ['global/value-descs.js.tmpl'],
73 } %]
74
75 [%# These are JS URLs that are *always* on the page and come before
76 # every other JS URL.
77 #%]
78 [% SET starting_js_urls = [
79 "js/yui/yahoo-dom-event/yahoo-dom-event.js",
80 "js/yui/cookie/cookie-min.js",
81 ] %]
82
83
84 [%# We should be able to set the default value of the header variable
85 # to the value of the title variable using the DEFAULT directive,
86 # but that doesn't work if a caller sets header to the empty string
87 # to avoid header inheriting the value of title, since DEFAULT
88 # mistakenly treats empty strings as undefined and gives header the
89 # value of title anyway. To get around that problem we explicitly
90 # set header's default value here only if it is undefined. %]
91 [% IF !header.defined %][% header = title %][% END %]
92
93 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
94 "http://www.w3.org/TR/html4/loose.dtd">
95 <html>
96 <head>
97 [% Hook.process("start") %]
98 <title>[% title %]</title>
99
100 [%# Migration note: contents of the old Param 'headerhtml' would go here %]
101
102 [% PROCESS "global/site-navigation.html.tmpl" %]
103
104 [% PROCESS 'global/setting-descs.none.tmpl' %]
105
106 [% SET yui = yui_resolve_deps(yui, yui_deps) %]
107 [% SET css_sets = css_files(style_urls, yui, yui_css) %]
108
109 [%# CSS cascade, part 1: Standard Bugzilla stylesheet set (persistent).
110 # Always present.
111 #%]
112 [%# This allows people to switch back to the "Classic" skin if they
113 # are in another skin.
114 #%]
115 <link href="[% 'skins/standard/global.css' FILTER mtime FILTER html %]"
116 rel="alternate stylesheet"
117 title="[% setting_descs.standard FILTER html %]">
118 [% FOREACH style_url = css_sets.standard %]
119 [% PROCESS format_css_link css_set_name = 'standard' %]
120 [% END %]
121
122 [%# CSS cascade, part 2 & 3: Third-party stylesheet set (selected and
123 # selectable). All third-party skins are present as alternate
124 # stylesheets, even if they are not currently in use.
125 #%]
126 [% FOREACH style_url = css_sets.skin %]
127 [% PROCESS format_css_link css_set_name = user.settings.skin.value %]
128 [% END %]
129
130 [% FOREACH alternate_skin = css_sets.alternate.keys %]
131 [% FOREACH style_url = css_sets.alternate.$alternate_skin %]
132 [% PROCESS format_css_link css_set_name = alternate_skin %]
133 [% END %]
134 [% END %]
135
136 [%# CSS cascade, part 4: page-specific styles.
137 #%]
138 [% IF style %]
139 <style type="text/css">
140 [% style %]
141 </style>
142 [% END %]
143
144 [%# CSS cascade, part 5: Custom Bugzilla stylesheet set (persistent).
145 # Always present. Site administrators may override all other style
146 # definitions, including skins, using custom stylesheets.
147 #%]
148 [% FOREACH style_url = css_sets.custom %]
149 [% PROCESS format_css_link css_set_name = 'standard' %]
150 [% END %]
151
152 [%# YUI Scripts %]
153 [% FOREACH yui_name = yui %]
154 [% starting_js_urls.push("js/yui/$yui_name/${yui_name}-min.js") %]
155 [% END %]
156 [% starting_js_urls.push('js/global.js') %]
157
158 [% FOREACH javascript_url = starting_js_urls %]
159 [% PROCESS format_js_link %]
160 [% END %]
161
162 <script type="text/javascript">
163 <!--
164 YAHOO.namespace('bugzilla');
165 YAHOO.util.Event.addListener = function (el, sType, fn, obj, overrideContext) {
166 if ( ("onpagehide" in window || YAHOO.env.ua.gecko) && sType === "unload") { sType = "pagehide"; };
167 var capture = ((sType == "focusin" || sType == "focusout") && !YAHOO.env.ua.ie) ? true : false;
168 return this._addListener(el, this._getType(sType), fn, obj, overrideContext, capture);
169 };
170 if ( "onpagehide" in window || YAHOO.env.ua.gecko) {
171 YAHOO.util.Event._simpleRemove(window, "unload",
172 YAHOO.util.Event._unload);
173 }
174 [%# The language selector needs javascript to set its cookie,
175 # so it is hidden in HTML/CSS by the "bz_default_hidden" class.
176 # If the browser can run javascript, it will then "unhide"
177 # the language selector using the following code.
178 #%]
179 function unhide_language_selector() {
180 YAHOO.util.Dom.removeClass(
181 'lang_links_container', 'bz_default_hidden'
182 );
183 }
184 YAHOO.util.Event.onDOMReady(unhide_language_selector);
185
186 [%# Make some Bugzilla information available to all scripts.
187 # We don't import every parameter and constant because we
188 # don't want to add a lot of uncached JS to every page.
189 #%]
190 var BUGZILLA = {
191 param: {
192 cookiepath: '[% Param('cookiepath') FILTER js %]',
193 maxusermatches: [% Param('maxusermatches') FILTER js %]
194 },
195
196 string: {
197 [%# Please keep these in alphabetical order. %]
198
199 attach_desc_required:
200 'You must enter a Description for this attachment.',
201 component_required:
202 'You must select a Component for this [% terms.bug %].',
203 description_required:
204 'You must enter a Description for this [% terms.bug %].',
205 short_desc_required:
206 'You must enter a Summary for this [% terms.bug %].',
207 version_required:
208 'You must select a Version for this [% terms.bug %].'
209 }
210 };
211
212 [% FOREACH yui_name = yui %]
213 [% FOREACH yui_template = yui_templates.$yui_name %]
214 [% PROCESS $yui_template %]
215 [% END %]
216 [% END %]
217 [% IF javascript %]
218 [% javascript %]
219 [% END %]
220 // -->
221 </script>
222
223 [% FOREACH javascript_url = javascript_urls %]
224 [% PROCESS format_js_link %]
225 [% END %]
226
227 [%# this puts the live bookmark up on firefox for the Atom feed %]
228 [% IF atomlink %]
229 <link rel="alternate"
230 type="application/atom+xml" title="Atom feed"
231 href="[% atomlink FILTER html %]">
232 [% END %]
233
234 [%# Required for the 'Autodiscovery' feature in Firefox 2 and IE 7. %]
235 <link rel="search" type="application/opensearchdescription+xml"
236 title="[% terms.Bugzilla %]" href="./search_plugin.cgi">
237 <link rel="shortcut icon" href="images/favicon.ico" >
238 [% Hook.process("additional_header") %]
239 </head>
240
241 [%# Migration note: contents of the old Param 'bodyhtml' go in the body tag,
242 # but set the onload attribute in the DEFAULT directive above.
243 #%]
244
245 <body onload="[% onload %]"
246 class="[% urlbase.replace('^https?://','').replace('/$','').replace('[-~@:/.]+','-') %]
247 [% FOREACH class = bodyclasses %]
248 [% ' ' %][% class FILTER css_class_quote %]
249 [% END %] yui-skin-sam">
250
251 [%# Migration note: the following file corresponds to the old Param
252 # 'bannerhtml'
253 #%]
254
255 <div id="header">
256
257 [% INCLUDE global/banner.html.tmpl %]
258
259 <table border="0" cellspacing="0" cellpadding="0" id="titles">
260 <tr>
261 <td id="title">
262 <p>[% terms.Bugzilla %]
263 [% " &ndash; $header" IF header %]</p>
264 </td>
265
266 [% IF subheader %]
267 <td id="subtitle">
268 <p class="subheader">[% subheader %]</p>
269 </td>
270 [% END %]
271
272 [% IF header_addl_info %]
273 <td id="information">
274 <p class="header_addl_info">[% header_addl_info %]</p>
275 </td>
276 [% END %]
277 </tr>
278 </table>
279
280 <table id="lang_links_container" cellpadding="0" cellspacing="0"
281 class="bz_default_hidden"><tr><td>
282 [% IF Bugzilla.languages.size > 1 %]
283 <ul class="links">
284 [% FOREACH lang = Bugzilla.languages.sort %]
285 <li>[% IF NOT loop.first %]<span class="separator"> | </span>[% END %]
286 [% IF lang == current_language %]
287 <span class="lang_current">[% lang FILTER html FILTER upper %]</span>
288 [% ELSE %]
289 <a href="#" onclick="set_language('[% lang FILTER none %]');">
290 [%- lang FILTER html FILTER upper %]</a>
291 [% END %]
292 </li>
293 [% END %]
294 </ul>
295 [% END %]
296 </td></tr></table>
297
298 [% PROCESS "global/common-links.html.tmpl" qs_suffix = "_top" %]
299 </div> [%# header %]
300
301 <div id="bugzilla-body">
302
303 [% IF Param('announcehtml') %]
304 [% Param('announcehtml') FILTER none %]
305 [% END %]
306
307 [% IF message %]
308 <div id="message">[% message %]</div>
309 [% END %]
310
311 [% BLOCK format_css_link %]
312 [% IF style_url.match('/IE-fixes\.css') %]
313 <!--[if lte IE 7]>
314 [%# Internet Explorer treats [if IE] HTML comments as uncommented.
315 # We use it to import CSS fixes so that Bugzilla looks decent on IE 7
316 # and below.
317 #%]
318 [% END %]
319
320 [% IF css_set_name == 'standard'
321 OR css_set_name == user.settings.skin.value
322 %]
323 [% SET css_rel = 'stylesheet' %]
324 [% SET css_set_display_name = setting_descs.${user.settings.skin.value}
325 || user.settings.skin.value %]
326 [% ELSE %]
327 [% SET css_rel = 'alternate stylesheet' %]
328 [% SET css_set_display_name = setting_descs.$css_set_name || css_set_name %]
329 [% END %]
330
331 [% IF css_set_name == 'standard' %]
332 [% SET css_title_link = '' %]
333 [% ELSE %]
334 [% css_title_link = BLOCK ~%]
335 title="[% css_set_display_name FILTER html %]"
336 [% END %]
337 [% END %]
338
339 <link href="[% style_url FILTER html %]" rel="[% css_rel FILTER none %]"
340 type="text/css" [% css_title_link FILTER none %]>
341
342 [% '<![endif]-->' IF style_url.match('/IE-fixes\.css') %]
343 [% END %]
344
345 [% BLOCK format_js_link %]
346 <script type="text/javascript" src="[% javascript_url FILTER mtime FILTER html %]"></script>
347 [% END %]

  ViewVC Help
Powered by ViewVC 1.1.30