X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Fsearch%2Fcdr.html;h=5544ff58cf90856d91783b3cbdcf66ab214e5738;hb=1318909d7eb16d736cbfb9f641eecccb00d4636c;hp=827a50895c4e7217f646e71115d42bcf6cfcc697;hpb=3ce7691203a7737406bf2d4442f7fd84b81f847e;p=freeside.git diff --git a/httemplate/search/cdr.html b/httemplate/search/cdr.html index 827a50895..5544ff58c 100644 --- a/httemplate/search/cdr.html +++ b/httemplate/search/cdr.html @@ -1,38 +1,315 @@ -% -% -%my $title = 'Call Detail Records'; -%my $hashref = {}; -%my $count_query = 'SELECT COUNT(*) FROM cdr'; -% -%#process params for CDR search, populate $hashref... -%# and fixup $count_query -% -%if ( $cgi->param('freesidestatus') eq 'NULL' ) { -% -% my $title = "Unprocessed $title"; -% $hashref->{'freesidestatus'} = ''; # Record.pm will take care of it -% #$count_query .= " AND ( freesidestatus IS NULL OR freesidestatus = '' )"; -% $count_query .= " WHERE ( freesidestatus IS NULL OR freesidestatus = '' )"; -% -%} elsif ( $cgi->param('freesidestatus') =~ /^([\w ]+)$/ ) { -% -% my $title = "Processed $title"; -% $hashref->{'freesidestatus'} = $1; -% #$count_query .= " AND freesidestatus = '$1'"; -% $count_query .= " WHERE freesidestatus = '$1'"; -% -%} -% -% <% include( 'elements/search.html', 'title' => $title, 'name' => 'call detail records', - 'query' => { 'table' => 'cdr', - 'hashref' => $hashref + + '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 + @header, + ], + 'fields' => [ + sub { + return '' unless $edit_data; + $areboxes = 1; + my $cdr = shift; + my $acctid = $cdr->acctid; + qq!!; + }, + @fields, #XXX fill in some pretty-print + #processing, etc. + ], + 'links' => \@links, + + 'html_form' => qq!