4131b9bb59f8c82bef41964ebbff93e90b296b76
[kivitendo-erp.git] / templates / webpages / record_template / dialog.html
1 [%- USE T8 %]
2 [%- USE L %]
3 [%- USE LxERP %]
4 [%- USE HTML %][%- USE JavaScript -%]
5
6 [% L.hidden_tag("", SELF.template_type, id="record_template_dialog_template_type",
7                 "data-controller"=SELF.data.controller,
8                 "data-load_action"=SELF.data.load_action,
9                 "data-save_action"=SELF.data.save_action,
10                 "data-form_selector"=SELF.data.form_selector) %]
11
12 <h2 class="listheading">[% LxERP.t8("Add new record template") %]</h2>
13
14 <p>
15  [% LxERP.t8("Name") %]:
16  [% L.input_tag("", "", id="record_template_dialog_new_template_name") %]
17  [% L.button_tag("kivi.RecordTemplate.create()", LxERP.t8("Save")) %]
18 </p>
19
20 [% SET templates = SELF.templates.as_list %]
21
22 [% IF templates.size %]
23
24 <h2 class="listheading">[% LxERP.t8("Existing templates") %]</h2>
25
26 <table>
27  <thead>
28   <tr class="listheading">
29    <th>[% LxERP.t8("Action") %]</th>
30    <th>[% LxERP.t8("Name") %]</th>
31    <th>[% LxERP.t8("Modification date") %]</th>
32   </tr>
33  </thead>
34
35  <tbody>
36 [% FOREACH template = templates %]
37   <tr class="listrow">
38    <td>
39     [% L.hidden_tag("", template.template_name, id="record_template_dialog_template_name_" _ template.id) %]
40     [% L.button_tag("kivi.RecordTemplate.load(" _ template.id _ ")", LxERP.t8("Load")) %]
41     [% L.button_tag("kivi.RecordTemplate.save(" _ template.id _ ")", LxERP.t8("Save")) %]
42     [% L.button_tag("kivi.RecordTemplate.rename(" _ template.id _ ")", LxERP.t8("Rename")) %]
43     [% L.button_tag("kivi.RecordTemplate.delete(" _ template.id _ ")", LxERP.t8("Delete")) %]
44    </td>
45    <td>[% HTML.escape(template.template_name) %]</td>
46    <td>[% HTML.escape(template.mtime.to_kivitendo) %] [% HTML.escape(template.mtime.to_kivitendo_time) %]</td>
47   </tr>
48 [% END %]
49  </tbody>
50
51 </table>
52 [% ELSE %]
53
54 <p>[% LxERP.t8("There are no record templates yet.") %]</p>
55
56 [% END %]