Revision 3a8be1b7
Von Tamino Steinert vor 7 Monaten hinzugefügt
templates/webpages/email_journal/show.html | ||
---|---|---|
1 |
[% USE HTML %][% USE L %][% USE LxERP %][%- USE P -%] |
|
1 |
[% USE HTML %][% USE L %][% USE LxERP %][%- USE P -%] [% USE T8 %]
|
|
2 | 2 |
|
3 | 3 |
<h1>[% FORM.title %]</h1> |
4 | 4 |
|
5 | 5 |
[%- INCLUDE 'common/flash.html' %] |
6 | 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 |
[% P.email_journal.entry_status(SELF.entry) %] |
|
33 |
</td> |
|
34 |
</tr> |
|
7 |
<div class="tabwidget" id="email_tabs"> |
|
8 |
<ul> |
|
9 |
<li><a href="#ui-tabs-basic-data">[% 'Basic Data' | $T8 %]</a></li> |
|
10 |
<li><a href="controller.pl?action=RecordLinks/ajax_list&object_model=EmailJournal&object_id=[% HTML.url(SELF.entry.id) %]">[% 'Linked Records' | $T8 %]</a></li> |
|
11 |
</ul> |
|
35 | 12 |
|
36 |
<tr class="listrow"> |
|
37 |
<th>[%- LxERP.t8("Extended status") %]</th> |
|
38 |
<td><pre>[%- HTML.escape(SELF.entry.extended_status) %]</pre></td> |
|
39 |
</tr> |
|
40 |
|
|
41 |
<tr class="listrow"> |
|
42 |
<th>[%- LxERP.t8("Headers") %]</th> |
|
43 |
<td><pre>[% HTML.escape(SELF.entry.headers) %]</pre></td> |
|
44 |
</tr> |
|
45 |
|
|
46 |
<tr class="listrow"> |
|
47 |
<th>[%- LxERP.t8("Body") %]</th> |
|
48 |
<td> |
|
49 |
[%- IF SELF.entry.headers.match('(?i)content-type:.*text/html') %] |
|
50 |
[% P.restricted_html(SELF.entry.body) %] |
|
51 |
[%- ELSE %] |
|
52 |
<pre>[% HTML.escape(SELF.entry.body) %]</pre> |
|
53 |
[%- END %] |
|
54 |
</td> |
|
55 |
</tr> |
|
56 |
</table> |
|
13 |
[% PROCESS "email_journal/tabs/basic_data.html" %] |
|
14 |
</div> <!-- /.tabwidget --> |
|
57 | 15 |
|
58 | 16 |
[% SET attachments = SELF.entry.attachments_sorted %] |
59 | 17 |
<h2>[% LxERP.t8("Attachments") %]</h2> |
... | ... | |
97 | 55 |
</td> |
98 | 56 |
|
99 | 57 |
<td> |
100 |
[% L.select_tag('record_action', |
|
101 |
# id has to start with customer_ or vendor_ for picker selection |
|
58 |
[% L.select_tag('customer_vendor_selection', |
|
102 | 59 |
[ |
103 |
[ LxERP.t8("Linking"), [ |
|
104 |
{id => "link_sales_quotation", name => LxERP.t8("Link to sales quotation")}, |
|
105 |
{id => "link_sales_order_intake", name => LxERP.t8("Link to sales order intake")}, |
|
106 |
{id => "link_sales_order", name => LxERP.t8("Link to sales order")}, |
|
107 |
{id => "link_request_quotation", name => LxERP.t8("Link to request quotation")}, |
|
108 |
{id => "link_purchase_quotation_intake", name => LxERP.t8("Link to purchase quotation intake")}, |
|
109 |
{id => "link_purchase_order", name => LxERP.t8("Link to purchase order")}, |
|
110 |
|
|
111 |
] ], |
|
112 |
[ LxERP.t8("Sales"), [ |
|
113 |
{id => "customer_sales_order", name => LxERP.t8("Create sales order")}, |
|
114 |
{id => "customer_sales_order_intake", name => LxERP.t8("Create sales order intake")}, |
|
115 |
{id => "customer_sales_quotation", name => LxERP.t8("Create sales quotation")}, |
|
116 |
] ], |
|
117 |
[ LxERP.t8("Purchase"), [ |
|
118 |
{id => "vendor_purchase_order", name => LxERP.t8("Create purchase order")}, |
|
119 |
{id => "vendor_purchase_quotation_intake", name => LxERP.t8("Create purchase quotation intake")}, |
|
120 |
{id => "vendor_request_quotation", name => LxERP.t8("Create request quotation")}, |
|
121 |
|
|
122 |
] ], |
|
60 |
{value => "customer", name => LxERP.t8("Sales")}, |
|
61 |
{value => "vendor", name => LxERP.t8("Purchase")}, |
|
123 | 62 |
], |
124 |
value_key='id', title_key='name', |
|
125 |
with_empty=1, empty_value='', empty_title=LxERP.t8("No action"), |
|
126 |
with_optgroups=1, |
|
127 |
class="wi-normal", |
|
128 |
onchange='kivi.EmailJournal.update_extra_div_selection();' |
|
63 |
default = CV_TYPE_FOUND, |
|
64 |
value_key='value', title_key='name', |
|
65 |
class="wi-verysmall", |
|
66 |
onchange='kivi.EmailJournal.update_customer_vendor_selection();' |
|
129 | 67 |
) %] |
130 | 68 |
</td> |
131 | 69 |
|
132 | 70 |
<td> |
133 |
[% FOREACH cv_type_name = [['customer', 'Customer'], ['vendor', 'Vendor']] %] |
|
134 |
[% SET cv_type = cv_type_name.0 %] |
|
135 |
[% SET cv_name = cv_type_name.1 %] |
|
136 |
<div id="[% cv_type _ "_div" %]" style="display:none"> |
|
71 |
[% FOREACH cv_option = [ |
|
72 |
['customer', 'Customer', 1], |
|
73 |
['vendor', 'Vendor', 0], |
|
74 |
] %] |
|
75 |
[% SET cv_type = cv_option.0 %] |
|
76 |
[% SET cv_name = cv_option.1 %] |
|
77 |
[% SET cv_is_cusotmer = cv_option.2 %] |
|
78 |
<div |
|
79 |
id="[% cv_type _ "_div" %]" class="col" |
|
80 |
style=[% IF cv_type == CV_TYPE_FOUND %] "display:block" [% ELSE %] "display:none" [% END %] |
|
81 |
> |
|
137 | 82 |
[% P.customer_vendor.picker( |
138 |
cv_type _ "_id", SELF.find_cv_from_email(cv_type, SELF.entry), |
|
83 |
cv_type _ "_id", |
|
84 |
CUSTOMER_VENDOR.is_customer == cv_is_cusotmer ? CUSTOMER_VENDOR : undef, |
|
139 | 85 |
type=cv_type, class="wi-normal", placeholder=LxERP.t8(cv_name) |
140 | 86 |
) %] |
141 | 87 |
</div> |
142 |
[% END %] |
|
143 |
[% FOREACH record_type = [ |
|
144 |
'sales_quotation', 'sales_order_intake', 'sales_order', |
|
145 |
'request_quotation', 'purchase_quotation_intake', 'purchase_order' |
|
146 |
] %] |
|
147 |
<div id="[% "link_" _ record_type _ "_div" %]" style="display:none"> |
|
148 |
[% L.input_tag(record_type _ "_id", '', |
|
149 |
style="color:black", class="wi-normal", |
|
150 |
placeholder=record_type _ " id") %] |
|
88 |
[% END %] |
|
89 |
</td> |
|
90 |
|
|
91 |
<td> |
|
92 |
[% L.select_tag('action_selection', |
|
93 |
[ |
|
94 |
{value => "workflow", name => LxERP.t8("Create from Workflow")}, |
|
95 |
{value => "linking", name => LxERP.t8("Linking to Record")}, |
|
96 |
{value => "create_new", name => LxERP.t8("Create new")}, |
|
97 |
], |
|
98 |
value_key='value', title_key='name', |
|
99 |
class="wi-normal", |
|
100 |
onchange='kivi.EmailJournal.update_action_selection();' |
|
101 |
) %] |
|
102 |
</td> |
|
103 |
|
|
104 |
<td> |
|
105 |
[% FOREACH customer_vendor = ['customer', 'vendor'] %] |
|
106 |
<div id="[% customer_vendor _ "_record_types_div" %]" class="col" |
|
107 |
style=[% IF customer_vendor == CV_TYPE_FOUND %] "display:block" [% ELSE %] "display:none" [% END %] |
|
108 |
> |
|
109 |
|
|
110 |
[% |
|
111 |
SET options = []; |
|
112 |
FOREACH record_info = RECORD_TYPES_WITH_INFO; |
|
113 |
IF (record_info.customervendor == customer_vendor); |
|
114 |
options.push({value => record_info.record_type, name => record_info.text}); |
|
115 |
END; |
|
116 |
END; |
|
117 |
%] |
|
118 |
[% L.select_tag(customer_vendor _ '_record_type_selection', |
|
119 |
options, |
|
120 |
value_key='value', title_key='name', |
|
121 |
with_empty=1, empty_value='', empty_title=LxERP.t8("Select record type"), |
|
122 |
class="wi-normal", |
|
123 |
onchange='kivi.EmailJournal.update_record_type_selection("' _ customer_vendor _ '");' |
|
124 |
) %] |
|
151 | 125 |
</div> |
152 | 126 |
[% END %] |
153 |
<div id="placeholder_div" style="display:block"> |
|
127 |
</td> |
|
128 |
|
|
129 |
<td> |
|
130 |
<div id="record_type_div" class="col" style="display:block"> |
|
131 |
[% FOREACH record_info = RECORD_TYPES_WITH_INFO %] |
|
132 |
<div id="[% record_info.record_type _ "_div" %]" class="col record_type" style="display:none"> |
|
133 |
[% L.input_tag(record_info.record_type _ "_id", '', |
|
134 |
style="color:black", class="wi-normal", |
|
135 |
placeholder=record_info.record_type _ " id") %] |
|
136 |
</div> |
|
137 |
[% END %] |
|
138 |
<div id="record_type_placeholder_div" class="col record_type" style="display:block"> |
|
139 |
[% L.input_tag('cv_placeholder', '', |
|
140 |
style="color:black", class="wi-normal", disabled=1, |
|
141 |
placeholder=LxERP.t8("Select record type first"), |
|
142 |
) %] |
|
143 |
</div> |
|
144 |
</div> |
|
145 |
<div id="no_record_type_div" class="col" style="display:none"> |
|
154 | 146 |
[% L.input_tag('cv_placeholder', '', |
155 | 147 |
style="color:black", class="wi-normal", disabled=1, |
156 |
placeholder=LxERP.t8("Select action first"),
|
|
148 |
placeholder=LxERP.t8("No record needed"),
|
|
157 | 149 |
) %] |
158 | 150 |
</div> |
159 | 151 |
</td> |
160 | 152 |
|
161 | 153 |
<td> |
162 |
[% L.button_tag('kivi.EmailJournal.apply_record_action();', LxERP.t8('Apply with Attachment')) %]
|
|
154 |
[% L.button_tag('kivi.EmailJournal.apply_action_with_attachment();', LxERP.t8('Apply with Attachment')) %]
|
|
163 | 155 |
</td> |
164 | 156 |
</tr> </table> |
165 | 157 |
</form> |
Auch abrufbar als: Unified diff
EmailJournal: Templates überarbeitet und Verknüpfte Belege hinzugefügt