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