summaryrefslogtreecommitdiff
path: root/httemplate/search
diff options
context:
space:
mode:
Diffstat (limited to 'httemplate/search')
-rw-r--r--httemplate/search/cdr.html21
-rw-r--r--httemplate/search/report_cdr.html5
2 files changed, 23 insertions, 3 deletions
diff --git a/httemplate/search/cdr.html b/httemplate/search/cdr.html
index 75049b443..ec847e41f 100644
--- a/httemplate/search/cdr.html
+++ b/httemplate/search/cdr.html
@@ -1,13 +1,28 @@
<%
+my $title = 'Call Detail Records';
my $hashref = {};
-#process params for CDR search, populate $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 = '' )";
+
+} elsif ( $cgi->param('freesidestatus') =~ /^([\w ]+)$/ ) {
+
+ my $title = "Processed $title";
+ $hashref->{'freesidestatus'} = $1;
+ $count_query .= " AND freesidestatus = '$1'";
+
+}
+
%><%= include( 'elements/search.html',
- 'title' => 'Call Detail Records',
+ 'title' => $title,
'name' => 'call detail records',
'query' => { 'table' => 'cdr',
'hashref' => $hashref
diff --git a/httemplate/search/report_cdr.html b/httemplate/search/report_cdr.html
index b9ad55e10..924e28bd7 100644
--- a/httemplate/search/report_cdr.html
+++ b/httemplate/search/report_cdr.html
@@ -1,6 +1,11 @@
<%= include('/elements/header.html', 'Call Detail Record Search' ) %>
<FORM ACTION="cdr.html" METHOD="GET">
+Status: <SELECT NAME="freesidestatus">
+ <OPTION VALUE="">(all)
+ <OPTION VALUE="NULL">unprocessed
+ <OPTION VALUE="done"">processed
+</SELECT><BR>
<INPUT TYPE="submit" VALUE="Search Call Detail Records">
<%= include('/elements/footer.html') %>