diff options
author | ivan <ivan> | 2008-03-29 09:11:54 +0000 |
---|---|---|
committer | ivan <ivan> | 2008-03-29 09:11:54 +0000 |
commit | 4a476092eda9c8e42292cc7bf01f5c73cf5abcd0 (patch) | |
tree | 293bc4356ea90cc08e140d3487b1345b1bc5da1d /httemplate/view/svc_phone.cgi | |
parent | cf388e9e55e5c1125a4ac7b8f2a1b3354d46f59b (diff) |
add quick links for unprocessed and processed CDRs to svc_phone view
Diffstat (limited to 'httemplate/view/svc_phone.cgi')
-rw-r--r-- | httemplate/view/svc_phone.cgi | 42 |
1 files changed, 34 insertions, 8 deletions
diff --git a/httemplate/view/svc_phone.cgi b/httemplate/view/svc_phone.cgi index f540555d4..8bd4dba02 100644 --- a/httemplate/view/svc_phone.cgi +++ b/httemplate/view/svc_phone.cgi @@ -1,10 +1,36 @@ <% include('elements/svc_Common.html', - 'table' => 'svc_phone', - 'fields' => [qw( countrycode phonenum pin )], - 'labels' => { - 'countrycode' => 'Country code', - 'phonenum' => 'Phone number', - 'pin' => 'PIN', - }, - ) + 'table' => 'svc_phone', + 'fields' => [qw( countrycode phonenum pin )], + 'labels' => { + 'countrycode' => 'Country code', + 'phonenum' => 'Phone number', + 'pin' => 'PIN', + }, + 'html_foot' => $html_foot, + ) %> +<%init> + +my $html_foot = sub { + my $svc_phone = shift; + + tie my %what, 'Tie::IxHash', + 'pending' => 'NULL', + 'billed' => 'done', + ; + + #XXX src & charged party (& default prefix) as per voip_cdr.pm + #XXX handle toll free too + + my $number = $svc_phone->phonenum; + + my @links = map { + qq(<A HREF="${p}search/cdr.html?src=$number;freesidestatus=$what{$_}">). + "View $_ CDRs</A>"; + } keys(%what); + + join(' | ', @links). '<BR>'; + +}; + +</%init> |