]> git.ipfire.org Git - thirdparty/bugzilla.git/commitdiff
Bug 259452 Add bonsai style &mark support to showbug for bug comments
authortimeless%mozdev.org <>
Wed, 22 Sep 2004 02:56:18 +0000 (02:56 +0000)
committertimeless%mozdev.org <>
Wed, 22 Sep 2004 02:56:18 +0000 (02:56 +0000)
r=kiko a=justdave

css/global.css
show_bug.cgi
skins/standard/global.css
template/en/default/bug/comments.html.tmpl

index 47a1558d653d158053607925aad6512f26b9033e..aecfb16586defe7ce365a51d5be43d0eef3f2c48 100644 (file)
 .bz_disabled { color: #a0a0a0 ; }
 
 .bz_comment { background-color: #e0e0e0; }
+.bz_comment_hilite pre
+{
+    background-color: lightgreen;
+    margin: 0;
+    padding: 1em 0;
+}
 
 table#flags th, table#flags td { vertical-align: baseline; text-align: left; }
index 7a568e3f54ec23dc53b69f66f1cff40e72776cb4..4803ff67bdeb34a74dce5a460c9f17fa561c40e9 100755 (executable)
@@ -59,6 +59,7 @@ my $format = GetFormat("bug/show", scalar $cgi->param('format'),
 GetVersionTable();
 
 my @bugs = ();
+my %marks;
 
 if ($single) {
     my $id = $cgi->param('id');
@@ -66,6 +67,17 @@ if ($single) {
     # probably move into Bug.pm at some point
     ValidateBugID($id);
     push @bugs, new Bugzilla::Bug($id, $userid);
+    if (defined $cgi->param('mark')) {
+        foreach my $range (split ',', $cgi->param('mark')) {
+            if ($range =~ /^(\d+)-(\d+)$/) {
+               foreach my $i ($1..$2) {
+                   $marks{$i} = 1;
+               }
+            } elsif ($range =~ /^(\d+)$/) {
+               $marks{$1} = 1;
+            }
+        }
+    }
 } else {
     foreach my $id ($cgi->param('id')) {
         my $bug = new Bugzilla::Bug($id, $userid);
@@ -80,6 +92,7 @@ eval {
 };
 
 $vars->{'bugs'} = \@bugs;
+$vars->{'marks'} = \%marks;
 
 # Next bug in list (if there is one)
 my @bug_list;
index 47a1558d653d158053607925aad6512f26b9033e..aecfb16586defe7ce365a51d5be43d0eef3f2c48 100644 (file)
 .bz_disabled { color: #a0a0a0 ; }
 
 .bz_comment { background-color: #e0e0e0; }
+.bz_comment_hilite pre
+{
+    background-color: lightgreen;
+    margin: 0;
+    padding: 1em 0;
+}
 
 table#flags th, table#flags td { vertical-align: baseline; text-align: left; }
index a2ef46a8af3d1be5272c6ac6930e0350a13dba61..2015d3abd4df2a69a33180af939629976783a055 100644 (file)
@@ -43,7 +43,8 @@
 
 [% BLOCK a_comment %]
   [% IF NOT comment.isprivate || isinsider %]
-    <div [% "class=\"bz_private\"" IF comment.isprivate %]>
+    <div [% "class=\"bz_private\" " IF comment.isprivate %]
+         [% "class=\"bz_comment_hilite\" " IF marks.$count %]>
       [% IF count > 0 %]
         <br>
         <span class="bz_comment">