Revision 3ac8bdc7
Von Tamino Steinert vor 2 Monaten hinzugefügt
SL/Controller/EmailJournal.pm | ||
---|---|---|
779 | 779 |
record_type => t8('Record Type'), |
780 | 780 |
obsolete => t8('Obsolete'), |
781 | 781 |
linked_to => t8('Linked to'), |
782 |
has_unprocessed_attachments => t8('Has unprocessed attachments'), |
|
782 | 783 |
}, |
783 | 784 |
); |
784 | 785 |
} |
... | ... | |
814 | 815 |
|
815 | 816 |
push @filter_strings, $::locale->text('Linked') if $filter->{'linked_to:eq_ignore_empty'} eq '1'; |
816 | 817 |
push @filter_strings, $::locale->text('Not linked') if $filter->{'linked_to:eq_ignore_empty'} eq '0'; |
818 |
push @filter_strings, $::locale->text('Unprocessed') if $filter->{'has_unprocessed_attachments:eq_ignore_empty'} eq '1'; |
|
819 |
push @filter_strings, $::locale->text('Processed') if $filter->{'has_unprocessed_attachments:eq_ignore_empty'} eq '0'; |
|
817 | 820 |
|
818 | 821 |
return join ', ', @filter_strings; |
819 | 822 |
} |
SL/DB/EmailJournal.pm | ||
---|---|---|
57 | 57 |
return !!scalar @{$self->linked_records}; |
58 | 58 |
} |
59 | 59 |
|
60 |
sub has_unprocessed_attachments { |
|
61 |
my ($self) = @_; |
|
62 |
|
|
63 |
return scalar grep{$_->processed == 0} @{$self->attachments}; |
|
64 |
} |
|
65 |
|
|
60 | 66 |
1; |
61 | 67 |
|
62 | 68 |
__END__ |
SL/DB/Manager/EmailJournal.pm | ||
---|---|---|
33 | 33 |
) |
34 | 34 |
)} => \'TRUE'; |
35 | 35 |
}, |
36 |
has_unprocessed_attachments => sub { |
|
37 |
my ($key, $value, $prefix) = @_; |
|
38 |
|
|
39 |
# if $value is truish, we want at least one link otherwise we want none |
|
40 |
my $comp = !!$value ? '>' : '='; |
|
41 |
|
|
42 |
# table emial_journal is aliased as t1 |
|
43 |
return |
|
44 |
\qq{( |
|
45 |
SELECT CASE WHEN count(*) $comp 0 THEN TRUE ELSE FALSE END |
|
46 |
FROM email_journal_attachments |
|
47 |
WHERE |
|
48 |
email_journal_attachments.email_journal_id = t1.id |
|
49 |
AND email_journal_attachments.processed = FALSE |
|
50 |
)} => \'TRUE'; |
|
51 |
}, |
|
36 | 52 |
); |
37 | 53 |
|
38 | 54 |
sub _sort_spec { |
... | ... | |
51 | 67 |
record_links.to_table = 'email_journal'::varchar(50) |
52 | 68 |
AND record_links.to_id = email_journal.id |
53 | 69 |
) |
54 |
)} |
|
70 |
)}, |
|
71 |
has_unprocessed_attachments => qq{( |
|
72 |
SELECT count(*) |
|
73 |
FROM email_journal_attachments |
|
74 |
WHERE |
|
75 |
email_journal_attachments.email_journal_id = email_journal.id |
|
76 |
AND email_journal_attachments.processed = FALSE |
|
77 |
)}, |
|
55 | 78 |
}, |
56 | 79 |
); |
57 | 80 |
} |
locale/de/all | ||
---|---|---|
1921 | 1921 |
'Hardcopy' => 'Seite drucken', |
1922 | 1922 |
'Has item type' => 'Hat Regeltypen', |
1923 | 1923 |
'Has serial number' => 'Hat eine Serienummer', |
1924 |
'Has unprocessed attachments' => 'Besitzt nicht verarbeitete Anhänge', |
|
1924 | 1925 |
'Headers' => 'Kopfzeilen', |
1925 | 1926 |
'Heading' => 'Überschrift', |
1926 | 1927 |
'Help Template Variables' => 'Hilfe zu Dokumenten-Variablen', |
... | ... | |
4664 | 4665 |
'Unknown problem type.' => 'Unbekannter Problem-Typ', |
4665 | 4666 |
'Unlink bank transactions' => 'Bankverbuchung(en) rückgängig machen', |
4666 | 4667 |
'Unlock System' => 'System entsperren', |
4668 |
'Unprocessed' => 'Nicht verarbeitet', |
|
4667 | 4669 |
'Unsuccessfully executed:\n' => 'Erfolglos ausgeführt:', |
4668 | 4670 |
'Unsupported image type (supported types: #1)' => 'Nicht unterstützter Bildtyp (unterstützte Typen: #1)', |
4669 | 4671 |
'Until' => 'Bis', |
locale/en/all | ||
---|---|---|
1920 | 1920 |
'Hardcopy' => '', |
1921 | 1921 |
'Has item type' => '', |
1922 | 1922 |
'Has serial number' => '', |
1923 |
'Has unprocessed attachments' => '', |
|
1923 | 1924 |
'Headers' => '', |
1924 | 1925 |
'Heading' => '', |
1925 | 1926 |
'Help Template Variables' => '', |
... | ... | |
4662 | 4663 |
'Unknown problem type.' => '', |
4663 | 4664 |
'Unlink bank transactions' => '', |
4664 | 4665 |
'Unlock System' => '', |
4666 |
'Unprocessed' => '', |
|
4665 | 4667 |
'Unsuccessfully executed:\n' => '', |
4666 | 4668 |
'Unsupported image type (supported types: #1)' => '', |
4667 | 4669 |
'Until' => '', |
templates/design40_webpages/email_journal/_filter.html | ||
---|---|---|
64 | 64 |
) %] |
65 | 65 |
</td> |
66 | 66 |
</tr> |
67 |
<tr> |
|
68 |
<th>[% LxERP.t8("Has unprocessed attachments") %]</th> |
|
69 |
<td>[% L.yes_no_tag("filter.has_unprocessed_attachments:eq_ignore_empty", |
|
70 |
filter.has_unprocessed_attachments, with_empty=1, |
|
71 |
default=filter.has_unprocessed_attachments_eq_ignore_empty |
|
72 |
) %] |
|
73 |
</td> |
|
74 |
</tr> |
|
67 | 75 |
</tbody> |
68 | 76 |
</table> |
69 | 77 |
[% L.hidden_tag("sort_by", FORM.sort_by) %] |
templates/design40_webpages/email_journal/list.html | ||
---|---|---|
28 | 28 |
<th>[% L.sortable_table_header("record_type") %]</th> |
29 | 29 |
<th>[% L.sortable_table_header("obsolete") %]</th> |
30 | 30 |
<th>[% L.sortable_table_header("linked_to") %]</th> |
31 |
<th>[% L.sortable_table_header("has_unprocessed_attachments") %]</th> |
|
31 | 32 |
</tr> |
32 | 33 |
</thead> |
33 | 34 |
<tbody> |
... | ... | |
51 | 52 |
<td> |
52 | 53 |
[% P.record.simple_grouped_record_list(entry.linked_records) %] |
53 | 54 |
</td> |
55 |
<td>[% HTML.escape(entry.has_unprocessed_attachments) %]</td> |
|
54 | 56 |
</tr> |
55 | 57 |
[% END %] |
56 | 58 |
</tbody> |
templates/webpages/email_journal/_filter.html | ||
---|---|---|
66 | 66 |
) %] |
67 | 67 |
</td> |
68 | 68 |
</tr> |
69 |
<tr> |
|
70 |
<th>[% LxERP.t8("Has unprocessed attachments") %]</th> |
|
71 |
<td>[% L.yes_no_tag("filter.has_unprocessed_attachments:eq_ignore_empty", |
|
72 |
filter.has_unprocessed_attachments, with_empty=1, |
|
73 |
default=filter.has_unprocessed_attachments_eq_ignore_empty |
|
74 |
) %] |
|
75 |
</td> |
|
76 |
</tr> |
|
69 | 77 |
</table> |
70 | 78 |
|
71 | 79 |
[% L.hidden_tag("sort_by", FORM.sort_by) %] |
templates/webpages/email_journal/list.html | ||
---|---|---|
27 | 27 |
<th>[% L.sortable_table_header("record_type") %]</th> |
28 | 28 |
<th>[% L.sortable_table_header("obsolete") %]</th> |
29 | 29 |
<th>[% L.sortable_table_header("linked_to") %]</th> |
30 |
<th>[% L.sortable_table_header("has_unprocessed_attachments") %]</th> |
|
30 | 31 |
</tr> |
31 | 32 |
</thead> |
32 | 33 |
|
... | ... | |
57 | 58 |
<td> |
58 | 59 |
[% P.record.simple_grouped_record_list(entry.linked_records) %] |
59 | 60 |
</td> |
61 |
<td>[% HTML.escape(entry.has_unprocessed_attachments) %]</td> |
|
60 | 62 |
</tr> |
61 | 63 |
[%- END %] |
62 | 64 |
</tbody> |
Auch abrufbar als: Unified diff
EmailJournal: Nach unverarbeiteten E-Mails filtern