]> git.ipfire.org Git - thirdparty/bugzilla.git/commitdiff
Hum... 2nd attempt to fix bug 332149. I committed the wrong patch *and* I lost connec...
authorlpsolit%gmail.com <>
Wed, 8 Aug 2007 19:14:23 +0000 (19:14 +0000)
committerlpsolit%gmail.com <>
Wed, 8 Aug 2007 19:14:23 +0000 (19:14 +0000)
Bugzilla/BugMail.pm
Bugzilla/Install/DB.pm
template/en/default/admin/groups/create.html.tmpl
template/en/default/admin/groups/edit.html.tmpl
template/en/default/bug/comments.html.tmpl
template/en/default/bug/show.xml.tmpl
template/en/default/global/messages.html.tmpl

index 0d5d3fd78725d62a2f77451c0abf93e42bbde8af..c9f09c551a4e8ddfca8f39eb9eaa57b9c7125e6e 100644 (file)
@@ -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()
index 5106fd525df7c6d4854e0c6319c39c9e5e5cc8bf..aa3c89d233d8945b03645d3012e1a439e286e398 100644 (file)
@@ -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'});
 
     ################################################################
index fb255304cc86d054719f0f563127b044cfc36b36..543e8ed6ec0736a231d68787596fc54c32ea22dd 100644 (file)
     <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 
index e1682639866f4d51f39ae57002131593949ba391..c94126106a3871c3717ef5ef628469fe17d95dd4 100644 (file)
       </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>
index 428b8771c131ad5cfc49cb0250d35f955bdfb51c..5df295423ba1fdc90061a2f27160d1d534fa5c47 100644 (file)
           <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" %]
index 6db4aab27067d0608dd0e94b89cb9b571a9e9013..4fbb6dc61d6931a57e6ec04aca8b84294f7f01f6 100644 (file)
@@ -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>
index acee5b180e03160e013c55075972ca58f7c372e9..e02b379ceba23742ff4316ebcdfb7b7c96492bba 100644 (file)
 
   [% 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 %]
             [% 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>