Revision 5b09ad86
Von Tamino Steinert vor etwa 1 Jahr hinzugefügt
SL/Presenter/EmailJournal.pm | ||
---|---|---|
4 | 4 |
|
5 | 5 |
use SL::Presenter::EscapedText qw(escape is_escaped); |
6 | 6 |
use SL::Presenter::Tag qw(link_tag); |
7 |
use SL::Locale::String qw(t8); |
|
7 | 8 |
|
8 | 9 |
use Exporter qw(import); |
9 |
our @EXPORT_OK = qw(email_journal); |
|
10 |
our @EXPORT_OK = qw(email_journal entry_status);
|
|
10 | 11 |
|
11 | 12 |
use Carp; |
12 | 13 |
|
... | ... | |
27 | 28 |
is_escaped($text); |
28 | 29 |
} |
29 | 30 |
|
31 |
sub entry_status { |
|
32 |
my ($email_journal_entry, %params) = @_; |
|
33 |
|
|
34 |
my %status_to_text = ( |
|
35 |
sent => t8('sent'), |
|
36 |
send_failed => t8('send failed'), |
|
37 |
imported => t8('imported'), |
|
38 |
); |
|
39 |
|
|
40 |
my $status = $email_journal_entry->status; |
|
41 |
my $text = $status_to_text{$status} || $status; |
|
42 |
|
|
43 |
return $text; |
|
44 |
} |
|
45 |
|
|
30 | 46 |
1; |
31 | 47 |
|
32 | 48 |
__END__ |
Auch abrufbar als: Unified diff
Presenter: EmailJournal: Funktion zum Anzeigen des Status