[%# The contents of this file are subject to the Mozilla Public # License Version 1.1 (the "License"); you may not use this file # except in compliance with the License. You may obtain a copy of # the License at http://www.mozilla.org/MPL/ # # Software distributed under the License is distributed on an "AS # IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or # implied. See the License for the specific language governing # rights and limitations under the License. # # The Original Code is the Bugzilla Bug Tracking System. # # The Initial Developer of the Original Code is Netscape Communications # Corporation. Portions created by Netscape are # Copyright (C) 1998 Netscape Communications Corporation. All # Rights Reserved. # # Contributor(s): Gervase Markham # Vaskin Kissoyan # Vitaly Harisov # Svetlana Harisova #%] [%# INTERFACE: # (All the below interface elements are optional.) # title: string. Page title. # header: string. Main page header. # subheader: string. Page subheader. # header_addl_info: string. Additional header information. # bodyclasses: array of extra CSS classes for the # onload: string. JavaScript code to run when the page finishes loading. # javascript: string. Javascript to go in the header. # javascript_urls: list. List of URLs to Javascript. # style: string. CSS style. # style_urls: list. List of URLs to CSS style sheets. # message: string. A message to display to the user. May contain HTML. # atomlink: Atom link URL, May contain HTML # generate_api_token: generate a token which can be used to make authenticated webservice calls # no_body: if true the body element will not be generated # allow_mobile: allow special CSS and viewport for detected mobile useragents # use_login_page: display a link to the full login page, rather than an inline login. #%] [% IF message %] [% PROCESS global/messages.html.tmpl %] [% END %] [% DEFAULT subheader = "" header_addl_info = "" onload = "" style_urls = [] yui = [] yui_css = {} yui_deps = {} no_yui = 0 jquery = [] jquery_css = [] generate_api_token = 0 %] [% IF NOT no_yui %] [% SET yui_css = { calendar => 1, datatable => 1, button => 1, } %] [%# Note: This is simple dependency resolution--you can't have dependencies # that depend on each other. You have to specify all of a module's deps, # if that module is going to be specified in "yui". #%] [% SET yui_deps = { datatable => ['json', 'connection', 'datasource', 'element'], } %] [%# When using certain YUI modules, we need to process certain # extra JS templates. #%] [% SET yui_templates = { datatable => ['global/value-descs.js.tmpl'], } %] [% END %] [%# These are JS URLs that are *always* on the page and come before # every other JS URL. #%] [% SET starting_js_urls = [ "js/jquery/jquery-min.js", "js/jquery/ui/jquery-ui-min.js" ] %] [% IF NOT no_yui %] [% starting_js_urls.push("js/yui/yahoo-dom-event/yahoo-dom-event.js", "js/yui/cookie/cookie-min.js") %] [% END %] [% SET jq_css_urls = [ "js/jquery/ui/jquery-ui-min.css", "js/jquery/ui/jquery-ui-structure-min.css", "js/jquery/ui/jquery-ui-theme-min.css", ] %] [% style_urls.import(jquery_css, jq_css_urls) FILTER null %] [%# Add our required jQuery plugins %] [% jquery.push("cookie", "devbridgeAutocomplete") %] [% IF allow_mobile && is_mobile_browser %] [% style_urls.push("skins/standard/mobile.css") %] [% END %] [%# We should be able to set the default value of the header variable # to the value of the title variable using the DEFAULT directive, # but that doesn't work if a caller sets header to the empty string # to avoid header inheriting the value of title, since DEFAULT # mistakenly treats empty strings as undefined and gives header the # value of title anyway. To get around that problem we explicitly # set header's default value here only if it is undefined. %] [% IF !header.defined %][% header = title %][% END %] [%- js_BUGZILLA = { param => { cookiepath => Param('cookiepath'), maxusermatches => Param('maxusermatches'), }, constant => { COMMENT_COLS => constants.COMMENT_COLS, }, string => { # Please keep these in alphabetical order. attach_desc_required => 'You must enter a Description for this attachment.', component_required => "You must select a Component for this $terms.bug", description_required => "You must enter a Description for this $terms.bug", short_desc_required => "You must enter a Summary for this $terms.bug", version_required => "You must select a Version for this $terms.bug" } }; %] [% Hook.process("start") %] [% IF generate_api_token; js_BUGZILLA.api_token = get_api_token(); END; %] [% title %] [% IF Param('utf8') %] [% END %] [% PROCESS "global/site-navigation.html.tmpl" %] [% PROCESS 'global/setting-descs.none.tmpl' %] [% IF NOT no_yui %] [% SET yui = yui_resolve_deps(yui, yui_deps) %] [% END %] [% SET css_sets = css_files(style_urls.unique, yui, yui_css) %] [% IF constants.CONCATENATE_ASSETS %] [% PROCESS format_css_link asset_url = css_sets.unified_standard_skin %] [% ELSE %] [% FOREACH asset_url = css_sets.standard %] [% PROCESS format_css_link %] [% END %] [% FOREACH asset_url = css_sets.skin %] [% PROCESS format_css_link %] [% END %] [% END %] [% IF style %] [% END %] [% IF css_sets.unified_custom %] [% IF constants.CONCATENATE_ASSETS %] [% PROCESS format_css_link asset_url = css_sets.unified_custom %] [% ELSE %] [% FOREACH asset_url = css_sets.custom %] [% PROCESS format_css_link %] [% END %] [% END %] [% END %] [% IF NOT no_yui %] [%# YUI Scripts %] [% FOREACH yui_name = yui %] [% starting_js_urls.push("js/yui/$yui_name/${yui_name}-min.js") %] [% END %] [% END %] [%# jQuery Plugins %] [% FOREACH jq_name = jquery.unique %] [% starting_js_urls.push("js/jquery/plugins/$jq_name/${jq_name}-min.js") %] [% END %] [% starting_js_urls.push('js/global.js') %] [% FOREACH asset_url = concatenate_js(starting_js_urls) %] [% PROCESS format_js_link %] [% END %] [%# Make some Bugzilla information available to all scripts. # We don't import every parameter and constant because we # don't want to add a lot of uncached JS to every page. # %] [% inline_javascript = BLOCK %] [% IF NOT no_yui %] YAHOO.namespace('bugzilla'); if ( "onpagehide" in window || YAHOO.env.ua.gecko) { YAHOO.util.Event._simpleRemove(window, "unload", YAHOO.util.Event._unload); } [% FOREACH yui_name = yui %] [% FOREACH yui_template = yui_templates.$yui_name %] [% INCLUDE $yui_template %] [% END %] [% END %] [% END %] [% IF javascript %] [% javascript %] [% END %] [% END %] [% IF inline_javascript.search("\\S") %] [% END %] [% FOREACH asset_url = concatenate_js(javascript_urls) %] [% PROCESS format_js_link %] [% END %] [%# this puts the live bookmark up on firefox for the Atom feed %] [% IF atomlink %] [% END %] [%# Required for the 'Autodiscovery' feature in Firefox 2 and IE 7. %] [% IF allow_mobile && is_mobile_browser %] [% END %] [% Hook.process("additional_header") %] [% RETURN IF no_body %] [%# Migration note: contents of the old Param 'bodyhtml' go in the body tag, # but set the onload attribute in the DEFAULT directive above. #%] [% IF onload %] [% END %] [%# Migration note: the following file corresponds to the old Param # 'bannerhtml' #%] [%# header %]
[%# in most cases the "header" variable provides redundant information, however # there are exceptions where not displaying this text is problematic. %] [% IF (user.settings.skin.value == 'Mozilla' || user.settings.skin.value == 'Mozilla-OpenSans') && template.name.match('^attachment/') && !header.match('^Bug \d+$') %]

[% header FILTER none %]

[% END %] [% IF Param('announcehtml') %] [% Param('announcehtml') FILTER none %] [% END %] [% IF message %]
[% message %]
[% END %] [% BLOCK format_css_link %] [% END %] [% BLOCK format_js_link %] [% END %]