[%# This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. # # This Source Code Form is "Incompatible With Secondary Licenses", as # defined by the Mozilla Public License, v. 2.0. #%] [%# 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 #%] [% IF message %] [% PROCESS global/messages.html.tmpl %] [% END %] [% DEFAULT subheader = "" header_addl_info = "" onload = "" style_urls = [] javascript_urls = [] yui = [] generate_api_token = 0 favicon_url = "images/favicon.ico" %] [% SET yui_css = { autocomplete => 1, 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 = { autocomplete => ['json', 'connection', 'datasource'], 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'], } %] [%# These are JS URLs that are *always* on the page and come before # every other JS URL. #%] [% SET starting_js_urls = [ "js/yui/yahoo-dom-event/yahoo-dom-event.js", "js/yui/cookie/cookie-min.js", ] %] [%# 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 %] [% Hook.process("start") %] [% title %] [% IF Param('utf8') %] [% END %] [% SET yui = yui_resolve_deps(yui, yui_deps) %] [% SET css_sets = css_files(style_urls, 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 %] [%# YUI Scripts %] [% FOREACH yui_name = yui %] [% starting_js_urls.push("js/yui/$yui_name/${yui_name}-min.js") %] [% END %] [% starting_js_urls.push('js/global.js') %] [% FOREACH asset_url = concatenate_js(starting_js_urls) %] [% PROCESS format_js_link %] [% 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. %] [% Hook.process("additional_header") %]
[% IF Param('announcehtml') %] [% Param('announcehtml') FILTER none %] [% END %] [% IF message %]
[% message %]
[% END %] [% BLOCK format_css_link %] [% END %] [% BLOCK format_js_link %] [% END %]