diff options
author | Mark Wells <mark@freeside.biz> | 2014-03-04 17:57:14 -0800 |
---|---|---|
committer | Mark Wells <mark@freeside.biz> | 2014-03-04 17:57:24 -0800 |
commit | 4c11454b932bb5cc58ad6405949c815beebc3278 (patch) | |
tree | 9a54a751079d1e45d306eb090318156f8fe6dfe8 /httemplate/search | |
parent | 13445756ae5d37e95649004c047e9376d3070700 (diff) |
log_sent_mail logs emailed invoices and receipts as well as msg_template messages, #25630
Diffstat (limited to 'httemplate/search')
-rw-r--r-- | httemplate/search/cust_msg.html | 38 | ||||
-rw-r--r-- | httemplate/search/elements/search-html.html | 2 |
2 files changed, 32 insertions, 8 deletions
diff --git a/httemplate/search/cust_msg.html b/httemplate/search/cust_msg.html index f71a86607..716addfd6 100644 --- a/httemplate/search/cust_msg.html +++ b/httemplate/search/cust_msg.html @@ -5,7 +5,7 @@ 'count_query' => $count_query, 'header' => [ 'Date', - 'Template', + 'Type', 'Destination', 'Status', '', #error @@ -15,7 +15,9 @@ my $date = $_[0]->_date; $date ? time2str('%Y-%m-%d %T',$_[0]->_date) : '' }, - 'msgname', + sub { + ucfirst($_[0]->msgtype) || $_[0]->msgname + }, sub { join('<BR>', split(/,\s*/, $_[0]->env_to) ) }, @@ -31,9 +33,11 @@ '', '', ], - 'color' => [ ('') x 3, - $statuscolor, - $statuscolor, + 'color' => [ '', + $typecolor, + '', + $statuscolor, + $statuscolor, ], 'html_init' => $html_init, 'really_disable_download' => 1, @@ -51,6 +55,9 @@ my @where; if ( $cgi->param('status') =~ /^(\w+)$/ ) { push @where, "status = '$1'"; } +if ( $cgi->param('msgtype') =~ /^(\w+)$/ ) { + push @where, "msgtype = '$1'"; +} my ($beginning, $ending) = FS::UI::Web::parse_beginning_ending($cgi, ''); push @where, "(_date >= $beginning AND _date <= $ending)"; @@ -79,16 +86,22 @@ my $sub_popup_link = sub { include('/elements/popup_link_onclick.html', 'action' => $p. 'view/cust_msg.html?' . $custmsgnum, 'actionlabel' => 'Message detail', - 'width' => 600, - 'height' => 500, + 'width' => 680, + 'height' => 550, ); }; my %color = ( 'failed' => 'FF0000', 'sent' => '', + + 'invoice' => '00CC00', + 'receipt' => '0000CC', + 'admin' => 'CC0000', + '' => '000000', ); my $statuscolor = sub { $color{$_[0]->status} }; +my $typecolor = sub { $color{$_[0]->msgtype} }; my $html_init = qq!<FORM ACTION="$p/search/cust_msg.html" METHOD="GET"> <TABLE cellspacing="10">!. @@ -110,6 +123,17 @@ include('/elements/select.html', 'failed' => 'failed', 'sent' => 'sent', }, ) . +'</TD><TD> Type '. +include('/elements/select.html', + 'field' => 'msgtype', + 'curr_value' => $cgi->param('msgtype') || '', + 'options' => [ '', 'invoice', 'receipt', 'admin' ], + 'labels' => { '' => '(any)', + 'invoice' => 'Invoices', + 'receipt' => 'Receipts', + 'admin' => 'Admin notices', + }, +) . '</TD> <TD><INPUT type="submit" value="Search"></TD></TR> </TABLE></FORM><BR> diff --git a/httemplate/search/elements/search-html.html b/httemplate/search/elements/search-html.html index bee33cfe8..10cc95539 100644 --- a/httemplate/search/elements/search-html.html +++ b/httemplate/search/elements/search-html.html @@ -446,7 +446,7 @@ % $cstyle = qq(STYLE="$cstyle") % if $cstyle; - <TD CLASS="<% $class %>" BGCOLOR="<% $bgcolor %>" <% $align %> <% $cstyle %>><% $font %><% $a %><% $s %><% $field %><% $es %><% $a ? '</A>' : '' %><% $font ? '</FONT>' : '' %></TD> + <TD CLASS="<% $class %>" BGCOLOR="<% $bgcolor %>" <% $align %> <% $cstyle %>><% $a %><% $font %><% $s %><% $field %><% $es %><% $font ? '</FONT>' : '' %><% $a ? '</A>' : '' %></TD> % } % |