X-Git-Url: https://defaria.com/gitweb/?a=blobdiff_plain;f=maps%2Flib%2FMAPSWeb.pm;h=5425480316386a5c2fa1aa76b3353991b2428742;hb=15842e23ec99588d83312f43b66e468fabe40eec;hp=5dd9d23488797bfdfb113e465d1d2a6e0e3a3818;hpb=ae9e57b169de143d2b8a7c761c3bf7394385e0d0;p=clearscm.git diff --git a/maps/lib/MAPSWeb.pm b/maps/lib/MAPSWeb.pm index 5dd9d23..5425480 100644 --- a/maps/lib/MAPSWeb.pm +++ b/maps/lib/MAPSWeb.pm @@ -44,7 +44,7 @@ sub getquickstats(%) { my $date = $params{date}; - for (@MAPSLog::Types) { + for (@Types) { $dates{$date}{processed} += $dates{$date}{$_}; } # for @@ -54,7 +54,7 @@ sub getquickstats(%) { sub displayquickstats($) { my ($userid) = @_; - # Quick stats are today only. + # Quick stats are today only my $today = Today2SQLDatetime; my $time = substr $today, 11; my $date = substr $today, 0, 10; @@ -69,11 +69,15 @@ sub displayquickstats($) { 'Today\'s Activity'; print p {-align => 'center'}, b ('as of ' . FormatTime($time)); + + print start_div {-id => 'quickstats'}; + print start_table { - -align => 'center', - -border => 0, -cellspacing => 0, - -cellpadding => 2}; + -border => 0, + -align => 'center', + -cellpadding => 2, + }; print start_Tr {-align => 'right'}; print td {-class => 'smalllabel', @@ -89,11 +93,13 @@ sub displayquickstats($) { 'n/a'; print end_Tr; - for (@MAPSLog::Types) { + for (@Types) { print start_Tr {-align => 'right'}; + my $foo = $_; my $value = $dates{$date}{$_}; my $percent; + if ($_ eq 'mailloop' || $_ eq 'registered') { $percent = 'n/a'; } else { @@ -101,18 +107,21 @@ sub displayquickstats($) { 0 : $dates{$date}{$_} / $dates{$date}{processed} * 100; $percent = sprintf '%5.1f%s', $percent, '%'; } # if - my $stat = $value == 0 ? - 0 : a {-href => "detail.cgi?type=$_;date=$date"}, $value; - print - td {-class => 'smalllabel'}, ucfirst ($_); - print - td {-class => 'smallnumber'}, $stat; - print - td {-class => 'smallnumber'}, $percent; + + my $report = ucfirst $_; + + $report = a {-href => "detail.cgi?type=$_;date=$date"}, $report if $value; + + print td {-class => 'link'}, $report, + td {-class => 'smallnumber'}, $value, + td {-class => 'smallnumber'}, $percent; + print end_Tr; - } # foreach + } # for + print end_table; print end_div; + print end_div; return; } # displayquickstats