diff options
Diffstat (limited to 'template/en/default/global/header.html.tmpl')
-rw-r--r-- | template/en/default/global/header.html.tmpl | 134 |
1 files changed, 99 insertions, 35 deletions
diff --git a/template/en/default/global/header.html.tmpl b/template/en/default/global/header.html.tmpl index 0dffcb5de..48140f74c 100644 --- a/template/en/default/global/header.html.tmpl +++ b/template/en/default/global/header.html.tmpl @@ -110,12 +110,8 @@ [% SET yui = yui_resolve_deps(yui, yui_deps) %] [% SET css_sets = css_files(style_urls, yui, yui_css) %] - [%# CSS cascade, part 1: Standard Bugzilla stylesheet set (persistent). - # Always present. - #%] - [%# This allows people to switch back to the "Classic" skin if they - # are in another skin. - #%] + [%# CSS cascade, parts 1 & 2: YUI & Standard Bugzilla stylesheet set (persistent). + # Always present. %] <link href="[% 'skins/standard/global.css' FILTER mtime FILTER html %]" rel="alternate stylesheet" title="[% setting_descs.standard FILTER html %]"> @@ -123,22 +119,12 @@ [% PROCESS format_css_link css_set_name = 'standard' %] [% END %] - [%# CSS cascade, part 2 & 3: Third-party stylesheet set (selected and - # selectable). All third-party skins are present as alternate - # stylesheets, even if they are not currently in use. - #%] + [%# CSS cascade, part 3: Third-party stylesheet set, per user prefs. %] [% FOREACH style_url = css_sets.skin %] [% PROCESS format_css_link css_set_name = user.settings.skin.value %] [% END %] - [% FOREACH alternate_skin = css_sets.alternate.keys %] - [% FOREACH style_url = css_sets.alternate.$alternate_skin %] - [% PROCESS format_css_link css_set_name = alternate_skin %] - [% END %] - [% END %] - - [%# CSS cascade, part 4: page-specific styles. - #%] + [%# CSS cascade, part 4: page-specific styles. %] [% IF style %] <style type="text/css"> [% style %] @@ -239,8 +225,7 @@ [%# Required for the 'Autodiscovery' feature in Firefox 2 and IE 7. %] <link rel="search" type="application/opensearchdescription+xml" - title="[% terms.Bugzilla %]" href="./search_plugin.cgi"> - <link rel="shortcut icon" href="images/favicon.ico" > + title="[% terms.BugzillaTitle %]" href="./search_plugin.cgi"> [% Hook.process("additional_header") %] </head> @@ -250,6 +235,7 @@ <body onload="[% onload %]" class="[% urlbase.replace('^https?://','').replace('/$','').replace('[-~@:/.]+','-') FILTER css_class_quote %] + skin-[% user.settings.skin.value FILTER css_class_quote %] [% FOREACH class = bodyclasses %] [% ' ' %][% class FILTER css_class_quote %] [% END %] yui-skin-sam"> @@ -260,12 +246,98 @@ <div id="header"> +[% IF user.settings.skin.value == 'Mozilla' %] + + <div class="wrapper"> + <table border="0" cellspacing="0" cellpadding="0" id="titles"> + <tr> + <td id="title"> + <a href="./" title="Home">[% terms.BugzillaTitle %]</a> + </td> + <td id="information"></td> + <td id="languages"> + [% IF Bugzilla.languages.size > 1 %] + <ul class="links"> + [% FOREACH lang = Bugzilla.languages.sort %] + <li>[% IF NOT loop.first %]<span class="separator"> | </span>[% END %] + [% IF lang == current_language %] + <span class="lang_current">[% lang FILTER html FILTER upper %]</span> + [% ELSE %] + <a href="#" onclick="set_language('[% lang FILTER none %]');"> + [%- lang FILTER html FILTER upper %]</a> + [% END %] + </li> + [% END %] + </ul> + [% END %] + </td> + <td id="login"> + [% IF user.id %] + <ul class="links"> + <li class="dropdown"> + <span class="anchor">[% user.login FILTER html %]</span> + <ul> + [% IF user.showmybugslink %] + [% filtered_username = user.login FILTER uri %] + <li><a href="[% Param('mybugstemplate').replace('%userid%', filtered_username) %]">My [% terms.Bugs %]</a></li> + [% END %] + <li><a href="userprefs.cgi">Preferences</a></li> + <li><a href="request.cgi?requester=[% user.login FILTER uri %]&requestee=[% user.login FILTER uri %]&do_union=1&group=type&action=queue">My Requests</a></li> + [% IF user.in_group('tweakparams') || user.in_group('editusers') || user.can_bless + || (Param('useclassification') && user.in_group('editclassifications')) + || user.in_group('editcomponents') || user.in_group('admin') || user.in_group('creategroups') + || user.in_group('editkeywords') || user.in_group('bz_canusewhines') + || user.get_products_by_permission("editcomponents").size %] + <li><a href="admin.cgi">Administration</a></li> + [% END %] + [% IF user.authorizer.can_logout %] + <li><a href="index.cgi?logout=1">Log out</a></li> + [% END %] + [% IF sudoer %] + <li> + <a href="relogin.cgi?action=end-sudo">End sudo session impersonating [% user.login FILTER html %]</a> + </li> + [% END %] + </ul> + </li> + </ul> + [% ELSE %] + <ul class="login-links"> + [% IF Param('createemailregexp') + && user.authorizer.user_can_create_account %] + <li id="new_account_container_top"><a href="createaccount.cgi">New Account</a></li> + [% END %] + + [%# Only display one login form when we're on a LOGIN_REQUIRED page. That + # way, we're guaranteed that the user will use the form that has + # hidden_fields in it (the center form) instead of this one. Also, it's + # less confusing to have one form (as opposed to three) when you're + # required to log in. + #%] + [% IF user.authorizer.can_login && !Bugzilla.page_requires_login %] + [% PROCESS "account/auth/login-small.html.tmpl" %] + [% END %] + </ul> + [% END %] + </td> + <td id="tab"> + <a href="http://mozilla.org/"><img src="https://addons.cdn.mozilla.net/media/img/zamboni/mozilla-tab.png?b=4953ddb"></a> + </td> + </tr> + </table> + + [% PROCESS "global/common-links.html.tmpl" qs_suffix = "_top" %] + + </div> + +[% ELSE %] + [% INCLUDE global/banner.html.tmpl %] <table border="0" cellspacing="0" cellpadding="0" id="titles"> <tr> <td id="title"> - <p>[% terms.Bugzilla %] + <p>[% terms.BugzillaTitle %] [% " – $header" IF header %]</p> </td> @@ -302,6 +374,9 @@ </td></tr></table> [% PROCESS "global/common-links.html.tmpl" qs_suffix = "_top" %] + +[% END %] + </div> [%# header %] <div id="bugzilla-body"> @@ -311,7 +386,7 @@ [% END %] [% IF message %] -<div id="message">[% message %]</div> + <div id="message">[% message %]</div> [% END %] [% BLOCK format_css_link %] @@ -323,26 +398,15 @@ #%] [% END %] - [% IF css_set_name == 'standard' - OR css_set_name == user.settings.skin.value - %] - [% SET css_rel = 'stylesheet' %] - [% SET css_set_display_name = setting_descs.${user.settings.skin.value} - || user.settings.skin.value %] - [% ELSE %] - [% SET css_rel = 'alternate stylesheet' %] - [% SET css_set_display_name = setting_descs.$css_set_name || css_set_name %] - [% END %] - [% IF css_set_name == 'standard' %] [% SET css_title_link = '' %] [% ELSE %] [% css_title_link = BLOCK ~%] - title="[% css_set_display_name FILTER html %]" + title="[% setting_descs.${user.settings.skin.value} || user.settings.skin.value FILTER html %]" [% END %] [% END %] - <link href="[% style_url FILTER html %]" rel="[% css_rel FILTER none %]" + <link href="[% style_url FILTER html %]" rel="stylesheet" type="text/css" [% css_title_link FILTER none %]> [% '<![endif]-->' IF style_url.match('/IE-fixes\.css') %] |