X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=blobdiff_plain;f=httemplate%2Fsearch%2Fcust_msg.html;h=716addfd6c9c6fe1f17759bad6b8b12f8d0345f2;hp=7932ab3a2e602f2330804e4ede29406a664c5373;hb=e9e0cf0989259b94d9758eceff448666a2e5a5cc;hpb=bb119c4cc86e906f698a205437790bd8f96bb3d0 diff --git a/httemplate/search/cust_msg.html b/httemplate/search/cust_msg.html index 7932ab3a2..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,8 +15,12 @@ my $date = $_[0]->_date; $date ? time2str('%Y-%m-%d %T',$_[0]->_date) : '' }, - 'msgname', - 'env_to', + sub { + ucfirst($_[0]->msgtype) || $_[0]->msgname + }, + sub { + join('
', split(/,\s*/, $_[0]->env_to) ) + }, 'status', sub { encode_entities($_[0]->error) }, ], @@ -29,9 +33,11 @@ '', '', ], - 'color' => [ ('') x 3, - $statuscolor, - $statuscolor, + 'color' => [ '', + $typecolor, + '', + $statuscolor, + $statuscolor, ], 'html_init' => $html_init, 'really_disable_download' => 1, @@ -39,7 +45,7 @@ <%init> #hmm... die "access denied" - unless $FS::CurrentUser::CurrentUser->access_right('View customers of all agents'); + unless $FS::CurrentUser::CurrentUser->access_right('View email logs'); my $conf = new FS::Conf; @@ -49,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)"; @@ -77,17 +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 = ( - 'prepared' => '0000FF', '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!
!. @@ -104,11 +118,21 @@ include('/elements/input-date-field.html', include('/elements/select.html', 'field' => 'status', 'curr_value' => $cgi->param('status') || '', - 'options' => [ '', 'failed', 'sent', 'prepared' ], + 'options' => [ '', 'failed', 'sent', ], 'labels' => { '' => '(any)', 'failed' => 'failed', - 'sent' => 'sent', - 'prepared'=> 'prepared' }, + 'sent' => 'sent', }, +) . +'
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', + }, ) . '