X-Git-Url: https://defaria.com/gitweb/?a=blobdiff_plain;f=maps%2Flib%2FMAPSWeb.pm;h=59ec10bee2cc38ca788d667b35a8cee742e83271;hb=901870f2fc61575bff838a8556a9fec652ec7d0b;hp=5dd9d23488797bfdfb113e465d1d2a6e0e3a3818;hpb=ae9e57b169de143d2b8a7c761c3bf7394385e0d0;p=clearscm.git
diff --git a/maps/lib/MAPSWeb.pm b/maps/lib/MAPSWeb.pm
index 5dd9d23..59ec10b 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
@@ -274,7 +283,7 @@ sub NavigationBar($) {
print start_div {-id => 'leftbar'};
unless ($userid) {
- print h2({-align => 'center'}, font({-color => 'white'}, "MAPS $MAPS::Version"));
+ print h2({-align => 'center'}, font({-color => 'white'}, "MAPS $MAPS::VERSION"));
print div ({-class => 'username'}, 'Welcome to MAPS');
print div ({-class => 'menu'},
(a {-href => '/maps/doc/'},
@@ -291,7 +300,7 @@ sub NavigationBar($) {
'Help
'),
);
} else {
- print h2({-align => 'center'}, font({-color => 'white'}, "MAPS $MAPS::Version"));
+ print h2({-align => 'center'}, font({-color => 'white'}, "MAPS $MAPS::VERSION"));
print div ({-class => 'username'}, 'Welcome '. ucfirst $userid);
print div ({-class => 'menu'},
@@ -312,7 +321,7 @@ sub NavigationBar($) {
(a {-href => '/maps/doc/'},
'Help
'),
(a {-href => '/maps/adm/'},
- 'MAPS
'),
+ 'Admin
'),
(a {-href => '/maps/?logout=yes'},
'Logout'),
);