X-Git-Url: https://defaria.com/gitweb/?a=blobdiff_plain;f=maps%2Flib%2FMAPSWeb.pm;h=3389c6a7bde03b285108d22201fae8f033a879ee;hb=8d6e59ba7728e19d42da1533b9f24d0216867899;hp=5dd9d23488797bfdfb113e465d1d2a6e0e3a3818;hpb=ae9e57b169de143d2b8a7c761c3bf7394385e0d0;p=clearscm.git diff --git a/maps/lib/MAPSWeb.pm b/maps/lib/MAPSWeb.pm index 5dd9d23..3389c6a 100644 --- a/maps/lib/MAPSWeb.pm +++ b/maps/lib/MAPSWeb.pm @@ -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; @@ -94,6 +94,7 @@ sub displayquickstats($) { my $value = $dates{$date}{$_}; my $percent; + if ($_ eq 'mailloop' || $_ eq 'registered') { $percent = 'n/a'; } else { @@ -101,16 +102,22 @@ 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 $_; + + if ($value) { + $report = a {-href => "detail.cgi?type=$_;date=$date"}, $report; + $value = a {-href => "detail.cgi?type=$_;date=$date"}, $value; + $percent = a {-href => "detail.cgi?type=$_;date=$date"}, $percent; + } # if + + print td {-class => 'smalllabel'}, $report, + td {-class => 'smallnumber'}, $value, + td {-class => 'smallnumber'}, $percent; + print end_Tr; - } # foreach + } # for + print end_table; print end_div;