Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision ca5695e4

Von Tamino Steinert vor 12 Monaten hinzugefügt

  • ID ca5695e4c1076ee2bb1c38a098edd6f2be19c36c
  • Vorgänger 7e62d6a2
  • Nachfolger 4e8c7e82

Presenter: EmailJournal: Funktion zum Anzeigen des Status

Unterschiede anzeigen:

SL/Presenter/ALL.pm
7 7
use SL::Presenter::DatePeriod;
8 8
use SL::Presenter::DeliveryOrder;
9 9
use SL::Presenter::Dunning;
10
use SL::Presenter::EmailJournal;
10 11
use SL::Presenter::EscapedText;
11 12
use SL::Presenter::FileObject;
12 13
use SL::Presenter::Invoice;
......
32 33
  date_period                 => 'SL::Presenter::DatePeriod',
33 34
  delivery_order              => 'SL::Presenter::DeliveryOrder',
34 35
  dunning                     => 'SL::Presenter::Dunning',
36
  email_journal               => 'SL::Presenter::EmailJournal',
35 37
  escaped_text                => 'SL::Presenter::EscapedText',
36 38
  file_object                 => 'SL::Presenter::FileObject',
37 39
  invoice                     => 'SL::Presenter::Invoice',
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