Revision 54de916a
Von Tamino Steinert vor mehr als 1 Jahr hinzugefügt
SL/Controller/EmailJournal.pm | ||
---|---|---|
128 | 128 |
@filters; |
129 | 129 |
|
130 | 130 |
my %status = ( |
131 |
failed => $::locale->text('failed'), |
|
132 |
ok => $::locale->text('succeeded'), |
|
131 |
send_failed => $::locale->text('send failed'), |
|
132 |
sent => $::locale->text('sent'), |
|
133 |
imported => $::locale->text('imported'), |
|
133 | 134 |
); |
134 | 135 |
push @filter_strings, $status{ $filter->{'status:eq_ignore_empty'} } if $filter->{'status:eq_ignore_empty'}; |
135 | 136 |
|
SL/Mailer.pm | ||
---|---|---|
270 | 270 |
$self->{driver} = eval { $self->_create_driver }; |
271 | 271 |
if (!$self->{driver}) { |
272 | 272 |
my $error = $@; |
273 |
$self->_store_in_journal('failed', 'driver could not be created; check your configuration & log files'); |
|
273 |
$self->_store_in_journal('send_failed', 'driver could not be created; check your configuration & log files');
|
|
274 | 274 |
$::lxdebug->message(LXDebug::WARN(), "Mailer error during 'send': $error"); |
275 | 275 |
|
276 | 276 |
return $error; |
... | ... | |
395 | 395 |
return if $journal_enable == 0; |
396 | 396 |
|
397 | 397 |
$status //= $self->{driver}->status if $self->{driver}; |
398 |
$status //= 'failed'; |
|
398 |
$status //= 'send_failed';
|
|
399 | 399 |
$extended_status //= $self->{driver}->extended_status if $self->{driver}; |
400 | 400 |
$extended_status //= 'unknown error'; |
401 | 401 |
|
SL/Mailer/SMTP.pm | ||
---|---|---|
20 | 20 |
|
21 | 21 |
Rose::Object::init( |
22 | 22 |
@_, |
23 |
status => 'failed', |
|
23 |
status => 'send_failed',
|
|
24 | 24 |
extended_status => 'no send attempt made', |
25 | 25 |
); |
26 | 26 |
|
... | ... | |
96 | 96 |
|
97 | 97 |
my $ok = $self->{smtp}->dataend; |
98 | 98 |
$self->extended_status($self->{smtp}->message); |
99 |
$self->status('ok') if $ok;
|
|
99 |
$self->status('sent') if $ok;
|
|
100 | 100 |
|
101 | 101 |
$self->{smtp}->quit; |
102 | 102 |
|
SL/Mailer/Sendmail.pm | ||
---|---|---|
18 | 18 |
|
19 | 19 |
Rose::Object::init( |
20 | 20 |
@_, |
21 |
status => 'failed', |
|
21 |
status => 'send_failed',
|
|
22 | 22 |
extended_status => 'no send attempt made', |
23 | 23 |
); |
24 | 24 |
|
... | ... | |
48 | 48 |
|
49 | 49 |
$self->{sendmail}->close or do { $self->extended_status("sendmail: $!"); die $self->extended_status; }; |
50 | 50 |
|
51 |
$self->status('ok');
|
|
51 |
$self->status('sent');
|
|
52 | 52 |
$self->extended_status(''); |
53 | 53 |
|
54 | 54 |
delete $self->{sendmail}; |
locale/de/all | ||
---|---|---|
4876 | 4876 |
'history search engine' => 'Historien Suchmaschine', |
4877 | 4877 |
'http' => 'http', |
4878 | 4878 |
'https' => 'https', |
4879 |
'imported' => 'Importiert',
|
|
4879 |
'imported' => 'importiert',
|
|
4880 | 4880 |
'inactive' => 'inaktiv', |
4881 | 4881 |
'income' => 'Einnahmen-Überschuß-Rechnung', |
4882 | 4882 |
'internal error (see details)' => 'Interner Fehler (siehe Details)!', |
... | ... | |
5015 | 5015 |
'searched part not for purchase' => 'Gesuchter Artikel ist nicht für den Einkauf', |
5016 | 5016 |
'searched part not for sale' => 'Gesuchter Artikel ist nicht für den Verkauf', |
5017 | 5017 |
'semiannually' => 'halbjährlich', |
5018 |
'send failed' => 'senden fehlgeschlagen', |
|
5018 | 5019 |
'sent' => 'gesendet', |
5019 | 5020 |
'sent to printer' => 'an Drucker geschickt', |
5020 | 5021 |
'service' => 'Dienstleistung', |
locale/en/all | ||
---|---|---|
5006 | 5006 |
'searched part not for purchase' => '', |
5007 | 5007 |
'searched part not for sale' => '', |
5008 | 5008 |
'semiannually' => '', |
5009 |
'send failed' => '', |
|
5009 | 5010 |
'sent' => '', |
5010 | 5011 |
'sent to printer' => '', |
5011 | 5012 |
'service' => '', |
templates/design40_webpages/email_journal/_filter.html | ||
---|---|---|
22 | 22 |
</tr> |
23 | 23 |
<tr> |
24 | 24 |
<th>[% LxERP.t8("Status") %]</th> |
25 |
<td>[% L.select_tag("filter.status:eq_ignore_empty", [ [ "", "" ], [ "failed", LxERP.t8("failed") ], [ "ok", LxERP.t8("succeeded") ] ], default=filter.status_eq_ignore_empty) %]
|
|
25 |
<td>[% L.select_tag("filter.status:eq_ignore_empty", [ [ "", "" ], [ "send_failed", LxERP.t8("send failed") ], [ "sent", LxERP.t8("sent") ], [ "imported", LxERP.t8("imported") ] ], default=filter.status_eq_ignore_empty) %]</td>
|
|
26 | 26 |
</td> |
27 | 27 |
</tr> |
28 | 28 |
</tbody> |
templates/design40_webpages/email_journal/list.html | ||
---|---|---|
36 | 36 |
<td>[% HTML.escape(entry.recipients) %]</td> |
37 | 37 |
<td><a href="[% SELF.url_for(action => 'show', id => entry.id, back_to => SELF.get_callback) %]"> [% HTML.escape(entry.subject) %] </a></td> |
38 | 38 |
<td>[% HTML.escape(entry.sent_on.to_lxoffice('precision' => 'second')) %]</td> |
39 |
<td>[% IF entry.status == 'ok' %] [% LxERP.t8('succeeded') %] [% ELSE %] [% LxERP.t8('failed') %] [% END %]</td> |
|
39 |
<td> |
|
40 |
[% IF entry.status == 'sent' %] |
|
41 |
[% LxERP.t8('sent') %] |
|
42 |
[% ELSIF entry.status == 'send_failed' %] |
|
43 |
[% LxERP.t8('send failed') %] |
|
44 |
[% ELSIF entry.status == 'imported' %] |
|
45 |
[% LxERP.t8('imported') %] |
|
46 |
[% ELSE %] |
|
47 |
[% entry.status %] |
|
48 |
[% END %] |
|
49 |
</td> |
|
40 | 50 |
<td>[% HTML.escape(entry.extended_status) %]</td> |
41 | 51 |
</tr> |
42 | 52 |
[% END %] |
templates/design40_webpages/email_journal/show.html | ||
---|---|---|
28 | 28 |
</tr> |
29 | 29 |
<tr> |
30 | 30 |
<th>[% LxERP.t8("Status") %]</th> |
31 |
<td> [% IF SELF.entry.status == "ok" %] [% LxERP.t8("succeeded") %] [% ELSE %] [% LxERP.t8("failed") %] [% END %]</td>
|
|
31 |
<td>[% IF SELF.entry.status == 'sent' %] [% LxERP.t8('sent') %] [% ELSIF SELF.entry.status == 'send_failed' %] [% LxERP.t8('send failed') %] [% ELSIF SELF.entry.status == 'imported' %] [% LxERP.t8('imported') %] [% ELSE %] [% SELF.entry.status %] [% END %] </td>
|
|
32 | 32 |
</tr> |
33 | 33 |
<tr> |
34 | 34 |
<th>[% LxERP.t8("Extended status") %]</th> |
templates/webpages/email_journal/_filter.html | ||
---|---|---|
26 | 26 |
</tr> |
27 | 27 |
<tr> |
28 | 28 |
<th align="right">[% LxERP.t8("Status") %]</th> |
29 |
<td>[% L.select_tag("filter.status:eq_ignore_empty", [ [ "", "" ], [ "failed", LxERP.t8("failed") ], [ "ok", LxERP.t8("succeeded") ] ], default=filter.status_eq_ignore_empty) %]</td>
|
|
29 |
<td>[% L.select_tag("filter.status:eq_ignore_empty", [ [ "", "" ], [ "send_failed", LxERP.t8("send failed") ], [ "sent", LxERP.t8("sent") ], [ "imported", LxERP.t8("imported") ] ], default=filter.status_eq_ignore_empty) %]</td>
|
|
30 | 30 |
</tr> |
31 | 31 |
</table> |
32 | 32 |
|
templates/webpages/email_journal/list.html | ||
---|---|---|
52 | 52 |
</td> |
53 | 53 |
<td>[%- HTML.escape(entry.sent_on.to_lxoffice('precision' => 'second')) %]</td> |
54 | 54 |
<td> |
55 |
[%- IF entry.status == 'ok' %] |
|
56 |
[%- LxERP.t8('succeeded') %] |
|
57 |
[% ELSE %] |
|
58 |
[%- LxERP.t8('failed') %] |
|
59 |
[%- END %] |
|
55 |
[% IF entry.status == 'sent' %] |
|
56 |
[% LxERP.t8('sent') %] |
|
57 |
[% ELSIF entry.status == 'send_failed' %] |
|
58 |
[% LxERP.t8('send failed') %] |
|
59 |
[% ELSIF entry.status == 'imported' %] |
|
60 |
[% LxERP.t8('imported') %] |
|
61 |
[% ELSE %] |
|
62 |
[% entry.status %] |
|
63 |
[% END %] |
|
60 | 64 |
</td> |
61 | 65 |
<td>[%- HTML.escape(entry.extended_status) %]</td> |
62 | 66 |
</tr> |
templates/webpages/email_journal/show.html | ||
---|---|---|
29 | 29 |
<tr class="listrow"> |
30 | 30 |
<th>[%- LxERP.t8("Status") %]</th> |
31 | 31 |
<td> |
32 |
[%- IF SELF.entry.status == "ok" %] |
|
33 |
[%- LxERP.t8("succeeded") %] |
|
34 |
[%- ELSE %] |
|
35 |
[%- LxERP.t8("failed") %] |
|
36 |
[%- END %] |
|
32 |
[% IF SELF.entry.status == 'sent' %] |
|
33 |
[% LxERP.t8('sent') %] |
|
34 |
[% ELSIF SELF.entry.status == 'send_failed' %] |
|
35 |
[% LxERP.t8('send failed') %] |
|
36 |
[% ELSIF SELF.entry.status == 'imported' %] |
|
37 |
[% LxERP.t8('imported') %] |
|
38 |
[% ELSE %] |
|
39 |
[% SELF.entry.status %] |
|
40 |
[% END %] |
|
37 | 41 |
</td> |
38 | 42 |
</tr> |
39 | 43 |
|
Auch abrufbar als: Unified diff
Anpassung für geänderten EmailJournal-Status