summaryrefslogtreecommitdiffstats
path: root/template/en/default/global/header.html.tmpl
diff options
context:
space:
mode:
Diffstat (limited to 'template/en/default/global/header.html.tmpl')
-rw-r--r--template/en/default/global/header.html.tmpl128
1 files changed, 92 insertions, 36 deletions
diff --git a/template/en/default/global/header.html.tmpl b/template/en/default/global/header.html.tmpl
index 0dffcb5de..87ce891f9 100644
--- a/template/en/default/global/header.html.tmpl
+++ b/template/en/default/global/header.html.tmpl
@@ -110,35 +110,20 @@
[% 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 %]">
[% FOREACH style_url = css_sets.standard %]
[% 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 +224,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 +234,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 +245,82 @@
<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="moz_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 %]&amp;requestee=[% user.login FILTER uri %]&amp;do_union=1&amp;group=type&amp;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&nbsp;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="moz_new_account_container_top"><a href="createaccount.cgi">New&nbsp;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" qs_suffix = "_top" %]
+ [% END %]
+ </ul>
+ [% END %]
+ </td>
+ <td id="moz_tab">
+ <a href="https://www.mozilla.org/" title="Mozilla - Home of the Mozilla Project">
+ <img src="skins/contrib/Mozilla/tabzilla.png" border="0" height="42" width="154"></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 %]
[% " &ndash; $header" IF header %]</p>
</td>
@@ -302,16 +357,28 @@
</td></tr></table>
[% PROCESS "global/common-links.html.tmpl" qs_suffix = "_top" %]
+
+[% END %]
+
</div> [%# header %]
<div id="bugzilla-body">
+[%# 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'
+ && template.name.match('^attachment/')
+ && !header.match('^Bug&nbsp;\d+$')
+%]
+ <h2>[% header FILTER none %]</h2>
+[% END %]
+
[% IF Param('announcehtml') %]
[% Param('announcehtml') FILTER none %]
[% END %]
[% IF message %]
-<div id="message">[% message %]</div>
+ <div id="message">[% message %]</div>
[% END %]
[% BLOCK format_css_link %]
@@ -323,26 +390,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') %]