X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Fsearch%2Fcdr.html;h=852eebadbe8abc6020239c4eb34f1551e22838d4;hb=850f16089f73212d65751dec48e799d83defa6fb;hp=0fa64c00c0ef40dbc6cc99aeceea3c78b1a24925;hpb=c47123a101c99b35c3c7b1be5b003b773ae00e06;p=freeside.git diff --git a/httemplate/search/cdr.html b/httemplate/search/cdr.html index 0fa64c00c..852eebadb 100644 --- a/httemplate/search/cdr.html +++ b/httemplate/search/cdr.html @@ -1,15 +1,50 @@ <% include( 'elements/search.html', 'title' => $title, 'name' => 'call detail records', + 'query' => { 'table' => 'cdr', 'hashref' => $hashref, 'extra_sql' => $qsearch, 'order_by' => 'ORDER BY calldate', }, 'count_query' => $count_query, - 'header' => [ fields('cdr') ], #XXX fill in some nice names - 'fields' => [ fields('cdr') ], #XXX fill in some pretty-print - # processing, etc. + 'header' => [ + '', # checkbox column + fields('cdr'), #XXX fill in some nice names + ], + 'fields' => [ + sub { + return '' unless $edit_data; + $areboxes = 1; + my $cdr = shift; + my $acctid = $cdr->acctid; + qq!!; + }, + fields('cdr'), #XXX fill in some pretty-print + #processing, etc. + ], + + 'html_form' => qq!
!, + #false laziness w/queue.html + 'html_foot' => sub { + if ( $areboxes ) { + '
'. + ''. + qq!
!. + qq!
!. + ''; + } else { + ''; + } + }, + ) %> <%init> @@ -17,6 +52,10 @@ die "access denied" unless $FS::CurrentUser::CurrentUser->access_right('List rating data'); +my $edit_data = $FS::CurrentUser::CurrentUser->access_right('Edit rating data'); + +my $areboxes = 0; + my $title = 'Call Detail Records'; my $hashref = {};