[freeside-commits] freeside/httemplate/view svc_phone.cgi, 1.2, 1.2.2.1
Ivan,,,
ivan at wavetail.420.am
Sat Mar 29 02:12:08 PDT 2008
Update of /home/cvs/cvsroot/freeside/httemplate/view
In directory wavetail.420.am:/tmp/cvs-serv1573
Modified Files:
Tag: FREESIDE_1_7_BRANCH
svc_phone.cgi
Log Message:
add quick links for unprocessed and processed CDRs to svc_phone view
Index: svc_phone.cgi
===================================================================
RCS file: /home/cvs/cvsroot/freeside/httemplate/view/svc_phone.cgi,v
retrieving revision 1.2
retrieving revision 1.2.2.1
diff -u -d -r1.2 -r1.2.2.1
--- svc_phone.cgi 23 Aug 2006 22:25:38 -0000 1.2
+++ svc_phone.cgi 29 Mar 2008 09:12:06 -0000 1.2.2.1
@@ -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>
More information about the freeside-commits
mailing list