X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Fview%2Fsvc_phone.cgi;h=3cc1b3f44da74e4c01e7a2f164b5753753ffbda1;hb=d4b68558b9a0e40d66d0f61a940a233a85e31b90;hp=732f3cd79591f5bdb447a206c0bc996d5be940ee;hpb=5e05724a635a22776f1b973f5d7e77989da4e048;p=freeside.git
diff --git a/httemplate/view/svc_phone.cgi b/httemplate/view/svc_phone.cgi
index 732f3cd79..3cc1b3f44 100644
--- a/httemplate/view/svc_phone.cgi
+++ b/httemplate/view/svc_phone.cgi
@@ -1,10 +1,45 @@
<% 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 sip_password pin )],
+ 'labels' => {
+ 'countrycode' => 'Country code',
+ 'phonenum' => 'Phone number',
+ 'sip_password' => 'SIP password',
+ '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().
+ # "View $_ CDRs";
+ #} keys(%what);
+ my @links = map {
+ qq().
+ "View $_ CDRs";
+ } keys(%what);
+
+ my @ilinks = ( qq().
+ 'View incoming CDRs' );
+
+ join(' | ', @links ). '
'.
+ join(' | ', @ilinks). '
';
+
+};
+
+%init>