Merge branch 'master' of git.freeside.biz:/home/git/freeside
[freeside.git] / fs_selfservice / FS-SelfService / cgi / view_cdr_details.html
index 32bd632..f396682 100644 (file)
@@ -1,15 +1,15 @@
-<%= $url = "$selfurl?session=$session_id;action="; ''; %>
-<%= include('header') %>
-
-<FONT SIZE=4>Call usage for
-<%= Date::Format::time2str('%b&nbsp;%o&nbsp;%Y', $beginning) %> -
-<%= Date::Format::time2str('%b&nbsp;%o&nbsp;%Y', $ending) %>
-</FONT><BR><BR>
+<%= include('header', ($inbound ? 'Received calls' : 'Dialed calls' ) . 
+                       ' for '.
+                       Date::Format::time2str('%b&nbsp;%o&nbsp;%Y', $beginning).
+                       ' - '.
+                       Date::Format::time2str('%b&nbsp;%o&nbsp;%Y', $ending)
+           )
+%>
 
 <%= if ( $error ) {
   $OUT .= qq!<FONT SIZE="+1" COLOR="#ff0000">$error</FONT><BR><BR>!;
 } ''; %>
+
 <TABLE WIDTH="100%">
   <TR>
     <TD WIDTH="50%">
 </TABLE>
 <TABLE BGCOLOR="#cccccc">
   <TR>
-<%= foreach my $header (@header) {
-      $OUT .= qq(<TH ALIGN="right">$header</TH>);
-    }
+<%= $space = '<TD>&nbsp;</TD>';
+  $OUT .= join($space, 
+    map { '<TH ALIGN="right">'.$_.'</TH>' } 
+    @header
+  )
 %>
   </TR>
 <%= my $total = 0;
@@ -42,7 +44,9 @@
     my $dtotal = 0;
     foreach my $usage ( @usage ) {
       $OUT .= '<TR>';
-      $OUT .= qq(<TD>$_</TD>) foreach @{$usage};
+      $OUT .= join($space,
+        map { "<TD>$_</TD>" } @{$usage}
+      );
       $OUT .= '</TR>';
     }
 %>
@@ -50,5 +54,4 @@
 </TABLE>
 <BR>
 
-</TD></TR></TABLE>
 <%= include('footer') %>