X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Fsearch%2Fcdr.html;h=a5575967c71b0e6dca3b4f92fe1d084a66dad50d;hb=995a145c931164347683071c95c6754379d36604;hp=75049b4434f86e639e9f2067a9d852ea95714768;hpb=fadaa67e77ad8d5d966e252aba7f193e9e3840e3;p=freeside.git diff --git a/httemplate/search/cdr.html b/httemplate/search/cdr.html index 75049b443..a5575967c 100644 --- a/httemplate/search/cdr.html +++ b/httemplate/search/cdr.html @@ -1,20 +1,289 @@ -<% - -my $hashref = {}; -#process params for CDR search, populate $hashref... - -my $count_query = 'SELECT COUNT(*) FROM cdr'; -# and fixup $count_query - -%><%= include( 'elements/search.html', - 'title' => 'Call Detail Records', +<% 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!