diff options
-rw-r--r-- | extensions/BMO/template/en/default/hook/global/header-start.html.tmpl | 3 | ||||
-rw-r--r-- | extensions/Gravatar/Extension.pm | 7 | ||||
-rw-r--r-- | extensions/Gravatar/template/en/default/hook/bug/comments-user-image.html.tmpl | 6 | ||||
-rw-r--r-- | extensions/InlineHistory/template/en/default/hook/bug/comments-aftercomments.html.tmpl | 2 | ||||
-rw-r--r-- | extensions/UserProfile/Extension.pm | 9 | ||||
-rw-r--r-- | extensions/UserProfile/template/en/default/pages/user_profile.html.tmpl | 69 | ||||
-rw-r--r-- | extensions/UserProfile/web/styles/user_profile.css | 44 | ||||
-rw-r--r-- | skins/contrib/Dusk-Helvetica/global.css | 4 | ||||
-rw-r--r-- | skins/contrib/Dusk-Segoe/global.css | 4 | ||||
-rw-r--r-- | skins/contrib/Dusk/global.css | 4 | ||||
-rw-r--r-- | skins/contrib/Mozilla/global.css | 5 | ||||
-rw-r--r-- | skins/custom/show_bug.css | 1 | ||||
-rw-r--r-- | skins/standard/global.css | 15 | ||||
-rw-r--r-- | template/en/default/global/header.html.tmpl | 1 | ||||
-rw-r--r-- | template/en/default/global/user.html.tmpl | 13 |
15 files changed, 133 insertions, 54 deletions
diff --git a/extensions/BMO/template/en/default/hook/global/header-start.html.tmpl b/extensions/BMO/template/en/default/hook/global/header-start.html.tmpl index e265d0bb6..2b2642148 100644 --- a/extensions/BMO/template/en/default/hook/global/header-start.html.tmpl +++ b/extensions/BMO/template/en/default/hook/global/header-start.html.tmpl @@ -33,7 +33,8 @@ [% END %] [% END %] -[% IF user.in_group('canconfirm') %] +[%# BMO - add user context menu %] +[% IF user.id %] [% yui.push('container', 'menu') %] [% style_urls.push('js/yui/assets/skins/sam/menu.css') %] [% javascript_urls.push('extensions/BMO/web/js/edituser_menu.js') %] diff --git a/extensions/Gravatar/Extension.pm b/extensions/Gravatar/Extension.pm index e30e921c1..52bbd3d08 100644 --- a/extensions/Gravatar/Extension.pm +++ b/extensions/Gravatar/Extension.pm @@ -20,16 +20,17 @@ BEGIN { } sub _user_gravatar { - my ($self) = @_; + my ($self, $size) = @_; if (!$self->{gravatar}) { if ($self->setting('show_my_gravatar') eq 'On') { (my $email = $self->email) =~ s/\+(.*?)\@/@/; - $self->{gravatar} = 'https://secure.gravatar.com/avatar/' . md5_hex(lc($email)) . '?size=64&d=mm'; + $self->{gravatar} = 'https://secure.gravatar.com/avatar/' . md5_hex(lc($email)) . '?d=mm'; } else { $self->{gravatar} = 'extensions/Gravatar/web/default.jpg'; } } - return $self->{gravatar}; + $size ||= 64; + return $self->{gravatar} . "&size=$size"; } sub install_before_final_checks { diff --git a/extensions/Gravatar/template/en/default/hook/bug/comments-user-image.html.tmpl b/extensions/Gravatar/template/en/default/hook/bug/comments-user-image.html.tmpl index 14adfd055..6faed368d 100644 --- a/extensions/Gravatar/template/en/default/hook/bug/comments-user-image.html.tmpl +++ b/extensions/Gravatar/template/en/default/hook/bug/comments-user-image.html.tmpl @@ -7,5 +7,9 @@ #%] [% IF user.settings.show_gravatars.value == 'On' %] - <img align="middle" src="[% who.gravatar FILTER none %]" width="32" height="32"> + [% IF who.last_activity_ts %] + <a href="user_profile?login=[% who.login FILTER uri %]"> + [% END %] + <img align="middle" src="[% who.gravatar FILTER none %]" width="32" height="32" border="0"> + [% "</a>" IF who.last_activity_ts %] [% END %] diff --git a/extensions/InlineHistory/template/en/default/hook/bug/comments-aftercomments.html.tmpl b/extensions/InlineHistory/template/en/default/hook/bug/comments-aftercomments.html.tmpl index 079af95f0..25100fe9a 100644 --- a/extensions/InlineHistory/template/en/default/hook/bug/comments-aftercomments.html.tmpl +++ b/extensions/InlineHistory/template/en/default/hook/bug/comments-aftercomments.html.tmpl @@ -113,7 +113,7 @@ item[3] = '<div class="bz_comment_head">' + '<span class="bz_comment_user">' + user_image - + '[% user_cache.$changer_id FILTER js %]' + + ' [% user_cache.$changer_id FILTER js %]' + '</span>' + '<span class="bz_comment_time"> ' + item[1] + ' </span>' + '</div>'; diff --git a/extensions/UserProfile/Extension.pm b/extensions/UserProfile/Extension.pm index 99f235896..9e8eadb97 100644 --- a/extensions/UserProfile/Extension.pm +++ b/extensions/UserProfile/Extension.pm @@ -281,16 +281,18 @@ sub page_before_template { my $target; my $input = Bugzilla->input_params; my $limit = Bugzilla->params->{'maxusermatches'} + 1; - if (!$input->{login}) { + my $login = $input->{login}; + if (!$login) { $target = Bugzilla->login(LOGIN_REQUIRED); + $login = $target->login; } else { - my $users = Bugzilla::User::match($input->{login}, $limit, 1); + my $users = Bugzilla::User::match($login, $limit, 1); if (scalar(@$users) == 1) { # always allow singular matches without confirmation $target = $users->[0]; } else { Bugzilla::User::match_field({ 'login' => {'type' => 'single'} }); - $target = Bugzilla::User->check($input->{login}); + $target = Bugzilla::User->check($login); } } @@ -353,6 +355,7 @@ sub page_before_template { $vars->{stats} = $stats; $vars->{statuses} = $statuses; $vars->{products} = $products; + $vars->{login} = $login; $vars->{target} = $target; } diff --git a/extensions/UserProfile/template/en/default/pages/user_profile.html.tmpl b/extensions/UserProfile/template/en/default/pages/user_profile.html.tmpl index 005d53443..71442b822 100644 --- a/extensions/UserProfile/template/en/default/pages/user_profile.html.tmpl +++ b/extensions/UserProfile/template/en/default/pages/user_profile.html.tmpl @@ -8,39 +8,9 @@ [% PROCESS global/variables.none.tmpl %] -[% inline_styles = BLOCK %] - #login_autocomplete { - float: left; - } - - #user_profile_table th { - text-align: right; - padding-right: 1em; - vertical-align: middle; - white-space: nowrap; - } - - #user_profile_table .numeric { - text-align: right; - } - - #user_profile_table .product_span { - white-space: nowrap; - } - - #what { - margin-top: 2em; - } - - #updated { - font-style: italic; - font-size: x-small; - } -[% END %] - [% PROCESS global/header.html.tmpl title = "User Profile: " _ target.identity - style = inline_styles + style_urls = [ "extensions/UserProfile/web/styles/user_profile.css" ] yui = [ 'autocomplete' ] javascript_urls = [ "js/field.js" ] %] @@ -48,13 +18,14 @@ <table id="user_profile_table"> <tr> - <th>Email</th> + <td> </td> + <th>Search</th> <td colspan="2"> <form action="user_profile"> [% INCLUDE global/userselect.html.tmpl id => "login" name => "login" - value => target.email + value => login size => 40 emptyok => 0 %] @@ -64,14 +35,31 @@ </tr> <tr> + <td colspan="4" class="separator"><hr></td> +</tr> + +<tr> + <td rowspan="16" id="gravatar-container"> + [% IF user.gravatar %] + <img id="gravatar" src="[% target.gravatar(256) FILTER none %]" width="128" height="128"><br> + [% IF target.id == user.id %] + <a href="http://gravatar.com/">Change my image</a> + [% END %] + [% ELSE %] + + [% END %] + </td> <th>Name</th> <td colspan="2">[% target.name FILTER html %]</td> </tr> <tr> + <th>Email</th> + <td colspan="2"><a href="mailto:[% target.login FILTER uri %]">[% target.login FILTER html %]</a></td> +</tr> + +<tr> <td> </td> - <td> </td> - <td width="100%"> </td> </tr> [%# user.creation_ts is added by the TagNewUsers extension %] @@ -150,7 +138,7 @@ </tr> <tr> - <th>Statuses changed</td> + <th>Statuses changed</th> <td colspan="2"> RESOLVED ([% statuses.item('RESOLVED') || 0 FILTER html %]), FIXED ([% statuses.item('RESOLVED/FIXED') || 0 FILTER html %]), @@ -160,7 +148,7 @@ </tr> <tr> - <th>Activity by product</td> + <th>Activity by product</th> <td colspan="2"> [% FOREACH p = products %] <span class="product_span"> @@ -176,6 +164,13 @@ </td> </tr> +<tr> + <td> </td> + <td> </td> + <td> </td> + <td width="100%"> </td> +</tr> + </table> <div id="what"> diff --git a/extensions/UserProfile/web/styles/user_profile.css b/extensions/UserProfile/web/styles/user_profile.css new file mode 100644 index 000000000..c261c24b6 --- /dev/null +++ b/extensions/UserProfile/web/styles/user_profile.css @@ -0,0 +1,44 @@ +/* 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. */ + +#login_autocomplete { + float: left; +} + +#user_profile_table th { + text-align: right; + padding-right: 1em; + vertical-align: middle; + white-space: nowrap; +} + +#user_profile_table .numeric { + text-align: right; +} + +#user_profile_table .product_span { + white-space: nowrap; +} + +#updated { + font-style: italic; + font-size: x-small; +} + +#gravatar-container { + text-align: center; + font-size: x-small; + vertical-align: top; + padding-right: 15px; +} + +#gravatar { + -moz-box-shadow: 2px 2px 5px #888; + -webkit-box-shadow: 2px 2px 5px #888; + box-shadow: 2px 2px 5px #888; + margin-bottom: 5px; +} diff --git a/skins/contrib/Dusk-Helvetica/global.css b/skins/contrib/Dusk-Helvetica/global.css index 8478c1a88..566bf3cf7 100644 --- a/skins/contrib/Dusk-Helvetica/global.css +++ b/skins/contrib/Dusk-Helvetica/global.css @@ -242,6 +242,10 @@ hr { background-color: #f0f0f0; } +.arrow_down { + border-top-color: #6070cf; +} + /* Rules specific for printing */ @media print { #header, diff --git a/skins/contrib/Dusk-Segoe/global.css b/skins/contrib/Dusk-Segoe/global.css index f431aceba..e9fb55e08 100644 --- a/skins/contrib/Dusk-Segoe/global.css +++ b/skins/contrib/Dusk-Segoe/global.css @@ -242,6 +242,10 @@ hr { background-color: #f0f0f0; } +.arrow_down { + border-top-color: #6070cf; +} + /* Rules specific for printing */ @media print { #header, diff --git a/skins/contrib/Dusk/global.css b/skins/contrib/Dusk/global.css index 33f28965c..b3c8aea4d 100644 --- a/skins/contrib/Dusk/global.css +++ b/skins/contrib/Dusk/global.css @@ -236,6 +236,10 @@ hr { background-color: #f0f0f0; } +.arrow_down { + border-top-color: #6070cf; +} + /* Rules specific for printing */ @media print { #header, diff --git a/skins/contrib/Mozilla/global.css b/skins/contrib/Mozilla/global.css index ecbab8ba7..cbd829740 100644 --- a/skins/contrib/Mozilla/global.css +++ b/skins/contrib/Mozilla/global.css @@ -443,7 +443,6 @@ table.edit_form hr { } .bz_comment_head img, .bz_first_comment_head img { - margin-right: 0.25em; vertical-align: middle; } @@ -641,6 +640,10 @@ button[disabled], input[type=submit][disabled], input[type=button][disabled], bu padding: 5px 10px; } +.arrow_down { + border-top-color: #0095dd; +} + /* Attachments */ #viewFrame { diff --git a/skins/custom/show_bug.css b/skins/custom/show_bug.css index 1a89a6892..e98e32fb4 100644 --- a/skins/custom/show_bug.css +++ b/skins/custom/show_bug.css @@ -83,4 +83,3 @@ table#flags { border-collapse: collapse; border-spacing: 0px; } - diff --git a/skins/standard/global.css b/skins/standard/global.css index 325b82ca3..bb44a919b 100644 --- a/skins/standard/global.css +++ b/skins/standard/global.css @@ -459,6 +459,21 @@ div.user_match { padding: 0.5em 1em; } +.arrow_down { + width: 0; + height: 0; + border-left: 4px solid transparent; + border-right: 4px solid transparent; + border-top: 4px solid #003399; + position: relative; + top: 1em; + margin: 4px 0; +} + +.arrow_container { + margin: 0 2px; +} + .collapsed { display: none; } diff --git a/template/en/default/global/header.html.tmpl b/template/en/default/global/header.html.tmpl index 9336d5cd4..6071b2845 100644 --- a/template/en/default/global/header.html.tmpl +++ b/template/en/default/global/header.html.tmpl @@ -265,6 +265,7 @@ [% filtered_username = user.login FILTER uri %] <li><a href="[% Param('mybugstemplate').replace('%userid%', filtered_username) %]">My [% terms.Bugs %]</a></li> [% END %] + <li><a href="user_profile">My Profile</a></li> <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 diff --git a/template/en/default/global/user.html.tmpl b/template/en/default/global/user.html.tmpl index 4f9b8a41b..2c12fa6dd 100644 --- a/template/en/default/global/user.html.tmpl +++ b/template/en/default/global/user.html.tmpl @@ -27,17 +27,18 @@ [% FILTER collapse %] [% IF user.id %] <a class="email" href="mailto:[% who.email FILTER html %]" - [% IF who.id && user.in_group('canconfirm') %] onclick="return show_usermenu(event, [% who.id FILTER none %], '[% who.email FILTER js %]', - [% IF (user.in_group('editusers') || user.bless_groups.size > 0) %]true[% ELSE %]false[% END %]);" - [% END %] - title="[% who.identity FILTER html %]"> + [% user.in_group('editusers') || user.bless_groups.size > 0 ? "true" : "false" %]);" + title="[% who.identity FILTER html %]"> [%- END -%] [% IF who.name %] <span class="fn">[% who.name FILTER html %]</span> [% ELSE %] - [% who.login FILTER email FILTER html %] + <span class="ln">[% who.login FILTER email FILTER html %]</span> + [% END %] + [% IF user.id %] + <span class="arrow_container"><span class="arrow_down"></span></span> + </a> [% END %] - [% '</a>' IF user.id %] [% END %] </span> |