summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorlpsolit%gmail.com <>2007-08-08 21:14:23 +0200
committerlpsolit%gmail.com <>2007-08-08 21:14:23 +0200
commit1e87283250635a69e5d855d1bd5d075253796e88 (patch)
tree0d0ef94cf2683dfd1652dd858f3dc17ffe231ac9
parent152f61366bd9b268cd838307c1e58399003ef2c7 (diff)
downloadbugzilla-1e87283250635a69e5d855d1bd5d075253796e88.tar.gz
bugzilla-1e87283250635a69e5d855d1bd5d075253796e88.tar.xz
Hum... 2nd attempt to fix bug 332149. I committed the wrong patch *and* I lost connection in the middle of the commit. Bad!
-rw-r--r--Bugzilla/BugMail.pm13
-rw-r--r--Bugzilla/Install/DB.pm2
-rw-r--r--template/en/default/admin/groups/create.html.tmpl11
-rw-r--r--template/en/default/admin/groups/edit.html.tmpl13
-rw-r--r--template/en/default/bug/comments.html.tmpl11
-rw-r--r--template/en/default/bug/show.xml.tmpl2
-rw-r--r--template/en/default/global/messages.html.tmpl4
7 files changed, 41 insertions, 15 deletions
diff --git a/Bugzilla/BugMail.pm b/Bugzilla/BugMail.pm
index 0d5d3fd78..c9f09c551 100644
--- a/Bugzilla/BugMail.pm
+++ b/Bugzilla/BugMail.pm
@@ -227,8 +227,7 @@ sub Send {
my $diffpart = {};
if ($who ne $lastwho) {
$lastwho = $who;
- $fullwho = $whoname ? "$whoname <$who" . Bugzilla->params->{'emailsuffix'} . ">" :
- "$who" . Bugzilla->params->{'emailsuffix'};
+ $fullwho = $whoname ? "$whoname <$who>" : $who;
$diffheader = "\n$fullwho changed:\n\n";
$diffheader .= FormatTriple("What ", "Removed", "Added");
$diffheader .= ('-' x 76) . "\n";
@@ -703,14 +702,8 @@ sub prepare_comments {
my $result = "";
foreach my $comment (@$raw_comments) {
if ($count) {
- my $author = $comment->{'author'};
- $result .= "\n\n--- Comment #$count from ";
- if ($author->name) {
- $result .= $author->name . " <" . $author->email . ">";
- } else {
- $result .= $author->email;
- }
- $result .= " " . format_time($comment->{'time'}) . " ---\n";
+ $result .= "\n\n--- Comment #$count from " . $comment->{'author'}->identity .
+ " " . format_time($comment->{'time'}) . " ---\n";
}
# Format language specific comments. We don't update $comment->{'body'}
# directly, otherwise it would grow everytime you call format_comment()
diff --git a/Bugzilla/Install/DB.pm b/Bugzilla/Install/DB.pm
index 5106fd525..aa3c89d23 100644
--- a/Bugzilla/Install/DB.pm
+++ b/Bugzilla/Install/DB.pm
@@ -510,7 +510,7 @@ sub update_table_definitions {
# 2007-05-17 LpSolit@gmail.com - Bug 344965
_initialize_workflow($old_params);
- # 2007-07-11 LpSolit@gmail.com - Bug 332149
+ # 2007-08-08 LpSolit@gmail.com - Bug 332149
$dbh->bz_add_column('groups', 'icon_url', {TYPE => 'TINYTEXT'});
################################################################
diff --git a/template/en/default/admin/groups/create.html.tmpl b/template/en/default/admin/groups/create.html.tmpl
index fb255304c..543e8ed6e 100644
--- a/template/en/default/admin/groups/create.html.tmpl
+++ b/template/en/default/admin/groups/create.html.tmpl
@@ -42,6 +42,10 @@
<td><input size="40" name="desc"></td>
<td><input size="30" name="regexp"></td>
<td><input type="checkbox" name="isactive" value="1" checked></td>
+ </tr>
+ <tr>
+ <th>Icon URL:</th>
+ <td colspan="3"><input type="text" size="70" maxlength="255" id="icon_url" name="icon_url"></td>
</tr></table><hr>
<input type="checkbox" name="insertnew" value="1"
@@ -75,6 +79,13 @@ case you should leave this checked.</b></p>
automatically grant membership to this group to anyone with an
email address that matches this regular expression.</p>
+<p>
+ <b>Icon URL</b> is optional, and is the URL pointing to the icon
+ used to identify the group. It may be either a relative URL to the base URL
+ of this installation or an absolute URL. This icon will be displayed
+ in comments in [% terms.bugs %] besides the name of the author of comments.
+</p>
+
<p>By default, the new group will be associated with existing
products. Unchecking the "Insert new group into all existing
products" option will prevent this and make the group become
diff --git a/template/en/default/admin/groups/edit.html.tmpl b/template/en/default/admin/groups/edit.html.tmpl
index e16826398..c94126106 100644
--- a/template/en/default/admin/groups/edit.html.tmpl
+++ b/template/en/default/admin/groups/edit.html.tmpl
@@ -83,6 +83,19 @@
</td>
</tr>
+ <tr>
+ <th>
+ Icon URL:
+ [% IF group.icon_url %]
+ <img src="[% group.icon_url FILTER html %]" alt="[% group.name FILTER html %]">
+ [% END %]
+ </th>
+ <td>
+ <input type="text" name="icon_url" size="70" maxlength="255"
+ value="[% group.icon_url FILTER html %]">
+ </td>
+ </tr>
+
[% IF group.is_bug_group %]
<tr>
<th>Use For [% terms.Bugs %]:</th>
diff --git a/template/en/default/bug/comments.html.tmpl b/template/en/default/bug/comments.html.tmpl
index 428b8771c..5df295423 100644
--- a/template/en/default/bug/comments.html.tmpl
+++ b/template/en/default/bug/comments.html.tmpl
@@ -172,10 +172,17 @@
<a name="c[% count %]" href="show_bug.cgi?id=[% bug.bug_id %]#c[% count %]">
#[% count %]</a> From
<span class="vcard">
- <a class="fn email" href="mailto:[% comment.email FILTER html %]">
- [% (comment.name || comment.email) FILTER html %]
+ <a class="fn email" href="mailto:[% comment.author.email FILTER html %]">
+ [% (comment.author.name || comment.author.login) FILTER html %]
</a>
</span>
+ [% FOREACH group = comment.author.direct_group_membership %]
+ [% NEXT UNLESS group.icon_url %]
+ <img src="[% group.icon_url FILTER html %]"
+ alt="[% group.name FILTER html %]"
+ title="[% group.name FILTER html %] - [% group.description FILTER html %]">
+ [% END %]
+
[%+ comment.time FILTER time %]
</i>
[% IF mode == "edit" %]
diff --git a/template/en/default/bug/show.xml.tmpl b/template/en/default/bug/show.xml.tmpl
index 6db4aab27..4fbb6dc61 100644
--- a/template/en/default/bug/show.xml.tmpl
+++ b/template/en/default/bug/show.xml.tmpl
@@ -69,7 +69,7 @@
[% FOREACH c = bug.longdescs %]
[% NEXT IF c.isprivate && !user.in_group(Param("insidergroup")) %]
<long_desc isprivate="[% c.isprivate FILTER xml %]">
- <who name="[% c.name FILTER xml %]">[% c.email FILTER xml %]</who>
+ <who name="[% c.author.name FILTER xml %]">[% c.author.email FILTER xml %]</who>
<bug_when>[% c.time FILTER time FILTER xml %]</bug_when>
[% IF user.in_group(Param('timetrackinggroup')) && (c.work_time - 0 != 0) %]
<work_time>[% PROCESS formattimeunit time_unit = c.work_time FILTER xml %]</work_time>
diff --git a/template/en/default/global/messages.html.tmpl b/template/en/default/global/messages.html.tmpl
index acee5b180..e02b379ce 100644
--- a/template/en/default/global/messages.html.tmpl
+++ b/template/en/default/global/messages.html.tmpl
@@ -209,7 +209,7 @@
[% ELSIF message_tag == "group_updated" %]
[% IF changes.keys.size %]
- The following changes have been made to the '[% group.name FILTER html %]
+ The following changes have been made to the '[% group.name FILTER html %]'
group:
<ul>
[% FOREACH field = changes.keys.sort %]
@@ -226,6 +226,8 @@
[% ELSE %]
<li>The group will no longer be used for [% terms.bugs %].</li>
[% END %]
+ [% CASE 'icon_url' %]
+ <li>The group icon URL has been updated.</li>
[% CASE 'members_add' %]
<li>The following groups are now members of this group:
[%+ changes.members_add.join(', ') FILTER html %]</li>