summaryrefslogtreecommitdiffstats
path: root/extensions/Gravatar
diff options
context:
space:
mode:
authorByron Jones <bjones@mozilla.com>2013-11-01 08:39:59 +0100
committerByron Jones <bjones@mozilla.com>2013-11-01 08:39:59 +0100
commite5d385374cb02e7d6b1b2013144135264ec5d29a (patch)
tree49e83687a3a08a749ac79ea41ea91bbc8acf2b50 /extensions/Gravatar
parent682a16ef7a6bcd78cac1748f431ab3912269a929 (diff)
downloadbugzilla-e5d385374cb02e7d6b1b2013144135264ec5d29a.tar.gz
bugzilla-e5d385374cb02e7d6b1b2013144135264ec5d29a.tar.xz
Bug 911812: make the user profile more discoverable
Diffstat (limited to 'extensions/Gravatar')
-rw-r--r--extensions/Gravatar/Extension.pm7
-rw-r--r--extensions/Gravatar/template/en/default/hook/bug/comments-user-image.html.tmpl6
2 files changed, 9 insertions, 4 deletions
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} . "&amp;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 %]