summaryrefslogtreecommitdiffstats
path: root/buglist.cgi
diff options
context:
space:
mode:
authorterry%mozilla.org <>2000-02-04 23:07:58 +0100
committerterry%mozilla.org <>2000-02-04 23:07:58 +0100
commit8b725463c37f431d33489d6e48542d9a4d4be906 (patch)
tree009c8a74b6ee3ccb65001fa9b4b6236ea77aef10 /buglist.cgi
parentf3e3cab0b214a8941cab1c55b55eb6397f91deb4 (diff)
downloadbugzilla-8b725463c37f431d33489d6e48542d9a4d4be906.tar.gz
bugzilla-8b725463c37f431d33489d6e48542d9a4d4be906.tar.xz
Add an optional ability to stagger the headers in the bug list, which
is uglier, but often squeezes things better horizontally.
Diffstat (limited to 'buglist.cgi')
-rwxr-xr-xbuglist.cgi42
1 files changed, 34 insertions, 8 deletions
diff --git a/buglist.cgi b/buglist.cgi
index fc213137b..18d8c5c4a 100755
--- a/buglist.cgi
+++ b/buglist.cgi
@@ -943,26 +943,52 @@ if ($dotweak) {
pnl "<FORM NAME=changeform METHOD=POST ACTION=\"process_bug.cgi\">";
}
-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 @th;
foreach my $c (@collist) {
if (exists $::needquote{$c}) {
+ my $h = "";
if ($::needquote{$c}) {
- $tablestart .= "<TH WIDTH=100% valign=left>";
+ $h .= "<TH WIDTH=100%>";
} else {
- $tablestart .= "<TH valign=left>";
+ $h .= "<TH>";
}
if (defined $::sortkey{$c}) {
- $tablestart .= "<A HREF=\"buglist.cgi?$fields&order=" . url_quote($::sortkey{$c}) . "$oldorder\">$::title{$c}</A>";
+ $h .= "<A HREF=\"buglist.cgi?$fields&order=" . url_quote($::sortkey{$c}) . "$oldorder\">$::title{$c}</A>";
} else {
- $tablestart .= $::title{$c};
+ $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;
+}
+
+if ($splitheader) {
+ $tablestart =~ s/<TH/<TH COLSPAN="2"/;
+ for (my $pass=0 ; $pass<2 ; $pass++) {
+ if ($pass == 1) {
+ $tablestart .= "</TR>\n<TR><TD></TD>";
+ }
+ 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";