[freeside-commits] freeside/httemplate/search cdr.html,1.13,1.14
Ivan,,,
ivan at wavetail.420.am
Fri May 29 16:36:16 PDT 2009
Update of /home/cvs/cvsroot/freeside/httemplate/search
In directory wavetail.420.am:/tmp/cvs-serv1491
Modified Files:
cdr.html
Log Message:
slightly better labels and field order for CDR report, RT#4081
Index: cdr.html
===================================================================
RCS file: /home/cvs/cvsroot/freeside/httemplate/search/cdr.html,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -d -r1.13 -r1.14
--- cdr.html 11 Feb 2009 18:44:45 -0000 1.13
+++ cdr.html 29 May 2009 23:36:14 -0000 1.14
@@ -10,7 +10,7 @@
'count_query' => $count_query,
'header' => [
'', # checkbox column
- fields('cdr'), #XXX fill in some nice names
+ @header,
],
'fields' => [
sub {
@@ -20,7 +20,7 @@
my $acctid = $cdr->acctid;
qq!<INPUT NAME="acctid$acctid" TYPE="checkbox" VALUE="1">!;
},
- fields('cdr'), #XXX fill in some pretty-print
+ @fields, #XXX fill in some pretty-print
#processing, etc.
],
@@ -156,4 +156,36 @@
$qsearch = ( scalar(keys %$hashref) ? ' AND ' : ' WHERE ' ) . $qsearch
if $qsearch;
+###
+# display fields
+###
+
+#XXX fill in some (more) nice names
+my %header = (
+ 'calldate' => 'Call Date',
+ 'clid' => 'Caller ID',
+ 'charged_party' => 'Charged party',
+ 'src' => 'Source',
+ 'dst' => 'Destination',
+ 'dcontext' => 'Destination Context',
+ 'channel' => 'Channel',
+ 'dstchannel' => 'Destination Channel',
+ 'freesidestatus' => 'Freeside status',
+);
+
+my @first = qw( acctid calldate clid charged_party src dst dcontext );
+my %first = map { $_=>1 } @first;
+
+my @fields = ( @first, grep !$first{$_}, fields('cdr') );
+
+my @header = map {
+ if ( exists($header{$_}) ) {
+ $header{$_};
+ } else {
+ my $header = $_;
+ $header =~ s/\_/ /g;
+ ucfirst($header);
+ }
+ } @fields;
+
</%init>
More information about the freeside-commits
mailing list