Add an optional ability to stagger the headers in the bug list, which

is uglier, but often squeezes things better horizontally.


git-svn-id: svn://10.0.0.236/trunk@59769 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
terry%mozilla.org
2000-02-04 14:08:00 +00:00
parent 4eb839f8ce
commit b7fa516b57
2 changed files with 52 additions and 10 deletions

View File

@@ -943,26 +943,52 @@ if ($dotweak) {
pnl "<FORM NAME=changeform METHOD=POST ACTION=\"process_bug.cgi\">";
}
my @th;
foreach my $c (@collist) {
if (exists $::needquote{$c}) {
my $h = "";
if ($::needquote{$c}) {
$h .= "<TH WIDTH=100%>";
} else {
$h .= "<TH>";
}
if (defined $::sortkey{$c}) {
$h .= "<A HREF=\"buglist.cgi?$fields&order=" . url_quote($::sortkey{$c}) . "$oldorder\">$::title{$c}</A>";
} else {
$h .= $::title{$c};
}
$h .= "</TH>";
push(@th, $h);
}
}
my $tablestart = "<TABLE CELLSPACING=0 CELLPADDING=4 WIDTH=100%>
<TR ALIGN=LEFT><TH>
<A HREF=\"buglist.cgi?$fields&order=bugs.bug_id\">ID</A>";
my $splitheader = 0;
if ($::COOKIE{'SPLITHEADER'}) {
$splitheader = 1;
}
foreach my $c (@collist) {
if (exists $::needquote{$c}) {
if ($::needquote{$c}) {
$tablestart .= "<TH WIDTH=100% valign=left>";
} else {
$tablestart .= "<TH valign=left>";
if ($splitheader) {
$tablestart =~ s/<TH/<TH COLSPAN="2"/;
for (my $pass=0 ; $pass<2 ; $pass++) {
if ($pass == 1) {
$tablestart .= "</TR>\n<TR><TD></TD>";
}
if (defined $::sortkey{$c}) {
$tablestart .= "<A HREF=\"buglist.cgi?$fields&order=" . url_quote($::sortkey{$c}) . "$oldorder\">$::title{$c}</A>";
} else {
$tablestart .= $::title{$c};
for (my $i=1-$pass ; $i<@th ; $i += 2) {
my $h = @th[$i];
$h =~ s/TH/TH COLSPAN="2" ALIGN="left"/;
$tablestart .= $h;
}
}
} else {
$tablestart .= join("", @th);
}
$tablestart .= "\n";