X-Git-Url: https://defaria.com/gitweb/?a=blobdiff_plain;ds=inline;f=maps%2Flib%2FMAPSWeb.pm;h=bea5eff621b1fa0052d3dde7776bb90206048901;hb=0ce6b60d0dffe894fcefc01605e8c113b47362a2;hp=5dd9d23488797bfdfb113e465d1d2a6e0e3a3818;hpb=ae9e57b169de143d2b8a7c761c3bf7394385e0d0;p=clearscm.git
diff --git a/maps/lib/MAPSWeb.pm b/maps/lib/MAPSWeb.pm
index 5dd9d23..bea5eff 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
@@ -312,7 +321,7 @@ sub NavigationBar($) {
(a {-href => '/maps/doc/'},
'Help
'),
(a {-href => '/maps/adm/'},
- 'MAPS
'),
+ 'Admin
'),
(a {-href => '/maps/?logout=yes'},
'Logout'),
);