b484bc76c467aee060d21d81cb83b5385a1bdd06
[kivitendo-erp.git] / templates / webpages / email_journal / show.html
1 [% USE HTML %][% USE L %][% USE LxERP %][%- USE P -%]
2
3  <h1>[% FORM.title %]</h1>
4
5 [%- INCLUDE 'common/flash.html' %]
6
7  <table id="email_journal_details" class="email_journal_details">
8   <tbody>
9    <tr class="listrow">
10     <th>[%- LxERP.t8("From") %]</th>
11     <td>[%- HTML.escape(SELF.entry.from) %]</td>
12    </tr>
13
14    <tr class="listrow">
15     <th>[%- LxERP.t8("Recipients") %]</th>
16     <td>[%- HTML.escape(SELF.entry.recipients) %]</td>
17    </tr>
18
19    <tr class="listrow">
20     <th>[%- LxERP.t8("Subject") %]</th>
21     <td>[%- HTML.escape(SELF.entry.subject) %]</td>
22    </tr>
23
24    <tr class="listrow">
25     <th>[%- LxERP.t8("Sent on") %]</th>
26     <td>[%- HTML.escape(SELF.entry.sent_on.to_lxoffice("precision" => "second")) %]</td>
27    </tr>
28
29    <tr class="listrow">
30     <th>[%- LxERP.t8("Status") %]</th>
31     <td>
32      [%- IF SELF.entry.status == "ok" %]
33       [%- LxERP.t8("succeeded") %]
34      [%- ELSE %]
35       [%- LxERP.t8("failed") %]
36      [%- END %]
37     </td>
38    </tr>
39
40    <tr class="listrow">
41     <th>[%- LxERP.t8("Extended status") %]</th>
42     <td><pre>[%- HTML.escape(SELF.entry.extended_status) %]</pre></td>
43    </tr>
44
45    <tr class="listrow">
46     <th>[%- LxERP.t8("Headers") %]</th>
47     <td><pre>[% HTML.escape(SELF.entry.headers) %]</pre></td>
48    </tr>
49
50    <tr class="listrow">
51     <th>[%- LxERP.t8("Body") %]</th>
52     <td>
53      [%- IF SELF.entry.headers.match('(?i)content-type:.*text/html') %]
54       [% P.restricted_html(SELF.entry.body) %]
55      [%- ELSE %]
56       <pre>[% HTML.escape(SELF.entry.body) %]</pre>
57      [%- END %]
58     </td>
59    </tr>
60  </table>
61
62  [% SET attachments = SELF.entry.attachments_sorted %]
63  [% IF attachments.size %]
64   <h2>[% LxERP.t8("Attachments") %]</h2>
65
66   <table id="email_journal_details" class="email_journal_details">
67    <thead>
68     <tr>
69      <th>[% LxERP.t8("Attachment name") %]</th>
70      <th>[% LxERP.t8("MIME type") %]</th>
71      <th>[% LxERP.t8("Size") %]</th>
72     </tr>
73    </thead>
74
75    <tbody>
76     [% FOREACH attachment = attachments %]
77      <tr class="listrow">
78       <td>[% L.link(SELF.url_for(action="download_attachment", id=attachment.id), attachment.name) %]</td>
79       <td>[% HTML.escape(attachment.mime_type) %]</td>
80       <td>[% HTML.escape(LxERP.format_amount(attachment.content.length, 0)) %]</td>
81      </tr>
82     [% END %]
83    </tbody>
84   </table>
85  [% END %]