small formatting updates to RADIUS report
[freeside.git] / httemplate / search / sqlradius.cgi
index 3c5046b..bb51acb 100644 (file)
 
   my $time_format = sub {
     my $time = shift;
-    $time > 0
-      ? time2str('%T%P %a %b %o %Y', $time )
-      : ' ';
+    return ' ' if $time == 0;
+    my $pretty = time2str('%T%P %a %b %o %Y', $time );
+    $pretty =~ s/ (\d)(st|dn|rd|th)/ $1$2/;
+    $pretty;
   };
 
   my $duration_format = sub {
                              fmt     => $customer_format,
                            },
     'framedipaddress'   => {
-                             name    => 'IP Address',
+                             name    => 'IP Address',
                              attrib  => 'Framed-IP-Address',
                              fmt     => sub { my $ip = shift;
                                               length($ip) ? $ip : '&nbsp';
                                             },
                            },
     'acctstarttime'     => {
-                             name    => 'Start time',
+                             name    => 'Start time',
                              attrib  => 'Acct-Start-Time',
                              fmt     => $time_format,
                            },
     'acctstoptime'      => {
-                             name    => 'End time',
+                             name    => 'End time',
                              attrib  => 'Acct-Stop-Time',
                              fmt     => $time_format,
                            },
   <% foreach my $field ( keys %fields ) { %>
     <TH>
       <%= $fields{$field}->{name} %><BR>
-      <FONT SIZE=-1><%= $fields{$field}->{attrib} %></FONT>
+      <FONT SIZE=-2><%= $fields{$field}->{attrib} %></FONT>
     </TH>
   <% } %>
 </TR>