Revision aeffe525
Von Werner Hahn vor etwa 2 Jahren hinzugefügt
templates/design40_webpages/custom_data_export/export.html | ||
---|---|---|
1 | 1 |
[% USE HTML %][% USE L %][% USE LxERP %] |
2 | 2 |
|
3 | 3 |
<h1>[% FORM.title %]</h1> |
4 |
<div class="wrapper"> |
|
4 |
<div class="wrapper ">
|
|
5 | 5 |
[%- INCLUDE 'common/flash.html' %] |
6 | 6 |
|
7 | 7 |
<form method="post" action="controller.pl" id="form"> |
... | ... | |
14 | 14 |
</p> |
15 | 15 |
|
16 | 16 |
[% ELSE %] |
17 |
|
|
18 |
<table class="tbl-horizontal wi-moderate">
|
|
19 |
<thead>
|
|
17 |
<div class="input-panel control-panel"> |
|
18 |
<table class="tbl-plain wi-moderate">
|
|
19 |
<tbody>
|
|
20 | 20 |
<tr> |
21 |
<th>[% LxERP.t8("Variable Name") %]</th>
|
|
22 |
<th>[% LxERP.t8("Type") %]</th>
|
|
23 |
<th>[% LxERP.t8("Value") %]</th>
|
|
24 |
<th>[% LxERP.t8("Description") %]</th>
|
|
21 |
<td>[% LxERP.t8("Variable Name") %]</td>
|
|
22 |
<td>[% LxERP.t8("Type") %]</td>
|
|
23 |
<td>[% LxERP.t8("Value") %]</td>
|
|
24 |
<td>[% LxERP.t8("Description") %]</td>
|
|
25 | 25 |
</tr> |
26 |
</thead> |
|
27 | 26 |
|
28 |
<tbody> |
|
29 | 27 |
[% FOREACH parameter = SELF.parameters %] |
30 | 28 |
<tr> |
31 | 29 |
<td> |
... | ... | |
51 | 49 |
</tr> |
52 | 50 |
[% END %] |
53 | 51 |
</tbody> |
52 |
</div> |
|
54 | 53 |
[% END %] |
55 | 54 |
</form> |
56 | 55 |
</div> |
templates/design40_webpages/custom_data_export/list.html | ||
---|---|---|
11 | 11 |
|
12 | 12 |
[%- ELSE %] |
13 | 13 |
<table class="tbl-list wi-moderate"> |
14 |
<colgroup> |
|
15 |
<col class="wi-normal"> |
|
16 |
<col> |
|
17 |
</colgroup> |
|
14 | 18 |
<thead> |
15 | 19 |
<tr> |
16 | 20 |
<th>[% LxERP.t8("Name") %]</th> |
... | ... | |
22 | 26 |
[%- FOREACH query = SELF.queries %] |
23 | 27 |
<tr> |
24 | 28 |
<td>[% L.link(SELF.url_for(action="export", id=query.id), query.name) %]</td> |
25 |
<td>[% IF query.description %][% L.link(SELF.url_for(action="export", id=query.id), query.description) %][% END %]</td>
|
|
29 |
<td>[% IF query.description %][% query.description %][% END %]</td>
|
|
26 | 30 |
</tr> |
27 | 31 |
[%- END %] |
28 | 32 |
</tbody> |
templates/design40_webpages/custom_data_export_designer/edit.html | ||
---|---|---|
1 |
[% USE HTML %][% USE L %][% USE LxERP %] |
|
2 |
|
|
3 |
<h1>[% FORM.title %] — [% LxERP.t8("Step #1/#2", 1, 2) %] — [% LxERP.t8("Basic Data") %]</h1> |
|
4 |
<div class="wrapper"> |
|
5 |
[%- INCLUDE 'common/flash.html' %] |
|
6 |
|
|
7 |
<form method="post" action="controller.pl" id="form"> |
|
8 |
[% L.hidden_tag("id", SELF.query.id) %] |
|
9 |
<div class="input-panel control-panel"> |
|
10 |
<table class="tbl-horizontal wi-moderate"> |
|
11 |
<tr> |
|
12 |
<th align="right">[%- LxERP.t8("Name") %]</th> |
|
13 |
<td>[% L.input_tag("query.name", SELF.query.name, style="width: 800px", "data-validate"="required") %]</td> |
|
14 |
</tr> |
|
15 |
|
|
16 |
<tr> |
|
17 |
<th align="right">[%- LxERP.t8("Required access right") %]</th> |
|
18 |
<td>[% L.select_tag("query.access_right", SELF.access_rights, default=SELF.query.access_right, style="width: 800px") %]</td> |
|
19 |
</tr> |
|
20 |
|
|
21 |
<tr> |
|
22 |
<th valign="top" align="right">[%- LxERP.t8("Description") %]</th> |
|
23 |
<td valign="top">[% L.textarea_tag("query.description", SELF.query.description, rows=5, style="width: 800px") %]</td> |
|
24 |
</tr> |
|
25 |
|
|
26 |
<tr> |
|
27 |
<th valign="top" align="right">[%- LxERP.t8("SQL query") %]</th> |
|
28 |
<td valign="top">[% L.textarea_tag("query.sql_query", SELF.query.sql_query, rows=20, style="width: 800px", "data-validate"="required") %]</td> |
|
29 |
</tr> |
|
30 |
</table> |
|
31 |
</div> |
|
32 |
</form> |
|
33 |
|
|
34 |
<p> |
|
35 |
[% LxERP.t8("The SQL query can be parameterized with variables named as follows: <%name%>.") %] |
|
36 |
[% LxERP.t8("On the next page the type of all variables can be set.") %] |
|
37 |
[% LxERP.t8("Note that parameter names must not be quoted.") %] |
|
38 |
[% LxERP.t8("Example") %]: |
|
39 |
</p> |
|
40 |
|
|
41 |
<pre> |
|
42 |
SELECT extract(YEAR FROM oe.transdate) AS "Jahr", SUM(oe.amount) AS "Angebotssumme" |
|
43 |
FROM oe |
|
44 |
LEFT JOIN employee ON (oe.employee_id = employee.id) |
|
45 |
WHERE (oe.customer_id IS NOT NULL) |
|
46 |
AND COALESCE(oe.quotation, FALSE) |
|
47 |
AND (employee.login = <%Benutzer-Login%>) |
|
48 |
GROUP BY "Jahr" |
|
49 |
ORDER BY "Jahr" |
|
50 |
</pre> |
|
51 |
</div> |
templates/design40_webpages/custom_data_export_designer/edit_parameters.html | ||
---|---|---|
1 |
[% USE HTML %][% USE L %][% USE LxERP %] |
|
2 |
|
|
3 |
<h1>[% FORM.title %] — [% LxERP.t8("Step #1/#2", 2, 2) %] — [% LxERP.t8("Query parameters") %]</h1> |
|
4 |
<div class="wrapper"> |
|
5 |
[%- INCLUDE 'common/flash.html' %] |
|
6 |
|
|
7 |
<form method="post" action="controller.pl" id="form"> |
|
8 |
[% L.hidden_tag("id", SELF.query.id) %] |
|
9 |
[% L.hidden_tag("query.name", SELF.query.name) %] |
|
10 |
[% L.hidden_tag("query.access_right", SELF.query.access_right) %] |
|
11 |
[% L.hidden_tag("query.description", SELF.query.description) %] |
|
12 |
[% L.hidden_tag("query.sql_query", SELF.query.sql_query) %] |
|
13 |
|
|
14 |
[% IF !PARAMETERS.size %] |
|
15 |
<p> |
|
16 |
[% LxERP.t8("The SQL query does not contain any parameter that need to be configured.") %] |
|
17 |
</p> |
|
18 |
|
|
19 |
[% ELSE %] |
|
20 |
|
|
21 |
<div class="input-panel control-panel"> |
|
22 |
<table class="tbl-plain condensed"> |
|
23 |
<tbody> |
|
24 |
<tr> |
|
25 |
<td>[% LxERP.t8("Variable Name") %]</td> |
|
26 |
<td>[% LxERP.t8("Type") %]</td> |
|
27 |
<td>[% LxERP.t8("Description") %]</td> |
|
28 |
<td colspan="2">[% LxERP.t8("Default value") %]</td> |
|
29 |
</tr> |
|
30 |
|
|
31 |
[% FOREACH parameter = PARAMETERS %] |
|
32 |
<tr> |
|
33 |
<td> |
|
34 |
[% L.hidden_tag("parameters[+].name", parameter.name) %] |
|
35 |
[% HTML.escape(parameter.name) %] |
|
36 |
</td> |
|
37 |
<td> |
|
38 |
[% L.select_tag("parameters[].parameter_type", [ [ "text", LxERP.t8("Text") ], [ "number", LxERP.t8("Number") ], [ "date", LxERP.t8("Date") ] ], default=parameter.parameter_type) %] |
|
39 |
</td> |
|
40 |
<td>[% L.input_tag("parameters[].description", parameter.description, class="wi-verywide") %]</td> |
|
41 |
<td> |
|
42 |
[% L.select_tag("parameters[].default_value_type", |
|
43 |
[ [ "none", LxERP.t8("No default value") ], [ "current_user_login", LxERP.t8("Current user's login") ], [ "sql_query", LxERP.t8("Result of SQL query") ], |
|
44 |
[ "fixed_value", LxERP.t8("Fixed value") ] ], |
|
45 |
default=parameter.default_value_type, |
|
46 |
id="default_value_type_" _ loop.count) %] |
|
47 |
</td> |
|
48 |
<td> |
|
49 |
[% SET disabled = (parameter.default_value_type == "none") || (parameter.default_value_type == "current_user_login") ? "disabled" : "" %] |
|
50 |
[% L.textarea_tag("parameters[].default_value", parameter.default_value, id="default_value_" _ loop.count, cols=80, rows=3, disabled=disabled) %] |
|
51 |
</td> |
|
52 |
</tr> |
|
53 |
[% END %] |
|
54 |
</tbody> |
|
55 |
[% END %] |
|
56 |
</table> |
|
57 |
</div> |
|
58 |
</form> |
|
59 |
</div> |
templates/design40_webpages/custom_data_export_designer/list.html | ||
---|---|---|
1 |
[% USE HTML %][% USE L %][% USE LxERP %] |
|
2 |
|
|
3 |
<h1>[% FORM.title %]</h1> |
|
4 |
|
|
5 |
<div class="wrapper"> |
|
6 |
[%- INCLUDE 'common/flash.html' %] |
|
7 |
|
|
8 |
[% IF !SELF.queries.size %] |
|
9 |
<p> |
|
10 |
[%- LxERP.t8("No custom data exports have been created yet.") %] |
|
11 |
</p> |
|
12 |
|
|
13 |
[%- ELSE %] |
|
14 |
<table class="tbl-list moderate"> |
|
15 |
<colgroup> |
|
16 |
<col class="wi-wide"> |
|
17 |
<col> |
|
18 |
</colgroup> |
|
19 |
<thead> |
|
20 |
<tr class="listheading"> |
|
21 |
<th>[% LxERP.t8("Name") %]</th> |
|
22 |
<th>[% LxERP.t8("Description") %]</th> |
|
23 |
</tr> |
|
24 |
</thead> |
|
25 |
|
|
26 |
<tbody> |
|
27 |
[%- FOREACH query = SELF.queries %] |
|
28 |
<tr class="listrow"> |
|
29 |
<td>[% L.link(SELF.url_for(action="edit", id=query.id), query.name) %]</td> |
|
30 |
<td>[% IF query.description %][% query.description %][% END %]</td> |
|
31 |
</tr> |
|
32 |
[%- END %] |
|
33 |
</tbody> |
|
34 |
</table> |
|
35 |
[%- END %] |
|
36 |
</div> |
Auch abrufbar als: Unified diff
Design 4.0: Benutzerdefinierten Datenexport angepasst