From 5fa3cab7d8abfd1b7dffac032d97a618ddf422ba Mon Sep 17 00:00:00 2001 From: "timeless%mozdev.org" <> Date: Wed, 22 Sep 2004 02:56:18 +0000 Subject: Bug 259452 Add bonsai style &mark support to showbug for bug comments r=kiko a=justdave --- css/global.css | 6 ++++++ show_bug.cgi | 13 +++++++++++++ skins/standard/global.css | 6 ++++++ template/en/default/bug/comments.html.tmpl | 3 ++- 4 files changed, 27 insertions(+), 1 deletion(-) diff --git a/css/global.css b/css/global.css index 47a1558d6..aecfb1658 100644 --- a/css/global.css +++ b/css/global.css @@ -171,5 +171,11 @@ .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; } diff --git a/show_bug.cgi b/show_bug.cgi index 7a568e3f5..4803ff67b 100755 --- a/show_bug.cgi +++ b/show_bug.cgi @@ -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; diff --git a/skins/standard/global.css b/skins/standard/global.css index 47a1558d6..aecfb1658 100644 --- a/skins/standard/global.css +++ b/skins/standard/global.css @@ -171,5 +171,11 @@ .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; } diff --git a/template/en/default/bug/comments.html.tmpl b/template/en/default/bug/comments.html.tmpl index a2ef46a8a..2015d3abd 100644 --- a/template/en/default/bug/comments.html.tmpl +++ b/template/en/default/bug/comments.html.tmpl @@ -43,7 +43,8 @@ [% BLOCK a_comment %] [% IF NOT comment.isprivate || isinsider %] -
+
[% IF count > 0 %]
-- cgit v1.2.3-24-g4f1b