X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/mfinanz.git/blobdiff_plain/0e5e350124f7eec8f67109fe4777bc2dae6c0ea6..5f1fd60d611a698ffc0147976514ff757043d039:/SL/Presenter/Record.pm diff --git a/SL/Presenter/Record.pm b/SL/Presenter/Record.pm index d1d7c3b44..5890f4292 100644 --- a/SL/Presenter/Record.pm +++ b/SL/Presenter/Record.pm @@ -65,6 +65,7 @@ sub grouped_record_list { $output .= _sepa_transfer_list( $groups{sepa_transfers}, %params) if $groups{sepa_transfers}; $output .= _letter_list( $groups{letters}, %params) if $groups{letters}; + $output .= _email_journal_list( $groups{email_journals}, %params) if $groups{email_journals}; $output = SL::Presenter->get->render('presenter/record/grouped_record_list', %params, output => $output); @@ -193,6 +194,7 @@ sub _group_records { gl_transactions => sub { (ref($_[0]) eq 'SL::DB::GLTransaction') }, bank_transactions => sub { (ref($_[0]) eq 'SL::DB::BankTransaction') && $_[0]->id }, letters => sub { (ref($_[0]) eq 'SL::DB::Letter') && $_[0]->id }, + email_journals => sub { (ref($_[0]) eq 'SL::DB::EmailJournal') && $_[0]->id }, ); my %groups; @@ -554,6 +556,25 @@ sub _letter_list { ); } +sub _email_journal_list { + my ($list, %params) = @_; + + return record_list( + $list, + title => $::locale->text('Email'), + type => 'email_journal', + columns => [ + [ $::locale->text('Sent on'), sub { $_[0]->sent_on->to_kivitendo(precision => 'seconds') } ], + [ $::locale->text('Subject'), sub { $_[0]->presenter->email_journal(display => 'table-cell') } ], + [ $::locale->text('Status'), 'status' ], + [ $::locale->text('From'), 'from' ], + [ $::locale->text('To'), 'recipients' ], + ], + %params, + ); +} + + 1; __END__