From: Owen Dunn Date: Thu, 4 Mar 2010 15:36:50 +0000 (+0000) Subject: Added style to conserve horizontal real estate X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~webstump/git?p=modbot-mtm.git;a=commitdiff_plain;h=53c512b2f9c07f8606376fdd64f2dc18055d3ce1 Added style to conserve horizontal real estate --- diff --git a/xlog/bin/report b/xlog/bin/report index 5f74769..7d0bb50 100755 --- a/xlog/bin/report +++ b/xlog/bin/report @@ -6,10 +6,11 @@ chdir $ng or die $!; use strict (qw(vars)); use IO::Handle; use POSIX; -use CGI qw/:standard *table end_*/; +use CGI qw/:standard *table end_* -no_xhtml/; our @lines= (); our @s; +our $oddeven = "o"; our ($processline,$needmap); our ($selectmid,$selectnum); @@ -22,6 +23,7 @@ sub processlog ($$) { @s= split /\t/; $s[0]= strftime "%Y-%m-%d %H:%M:%S %Z", localtime $s[0]; &$processline(); + $oddeven =~ y/oe/eo/; } } sub processlogs ($) { @@ -35,6 +37,8 @@ sub processline_print () { my @sp= @s; $sp[3] =~ s/\@\w{0,2}/ at .. /; @sp= map { escapeHTML($_) } @sp[0..5]; + $sp[3] =~ s/</\
</; + $sp[2]=~s/\@/\@<\/span>/; my @spu= map { s/\W/ sprintf "%%%02x", ord $& /ge; $_; @@ -42,14 +46,16 @@ sub processline_print () { if (length $s[1] && length $s[2]) { my $url= url().'/message/'.$spu[1].'/'.$spu[2]; foreach my $i (qw(1 2)) { - $sp[$i]= a({ href=>$url }, $sp[$i] ); + $sp[$i]= a({ href=>$url }, $sp[$i]."
" ); } } if (length $s[6]) { $sp[5]= a({ href=>"$staticfiles/nr-$s[6].txt" }, $sp[5] ); } -#print STDERR join('|',@sp),"\n"; - print Tr(td([@sp])); + + print "$sp[0]"; + print "$sp[1] $sp[2]"; + print "$sp[3]$sp[4]$sp[5]\n"; } sub processline_print_ifsingle () { @@ -98,12 +104,19 @@ if ($pi =~ m,^/message/(\d+)/(.*)$,) { $processline= \&processline_queue; } -print header(), start_html($title), h1($title), table(); +my $css=<$title, -style=>{'-code'=>$css}), + h1($title), start_table(); print Tr(td([map { strong($_) } (qw( Date - Reference - Message-ID + Reference/Message-ID From Subject Event