Belegvorlagen: Anzeigen, Umbenennen, Löschen
[kivitendo-erp.git] / templates / webpages / record_template / dialog.html
diff --git a/templates/webpages/record_template/dialog.html b/templates/webpages/record_template/dialog.html
new file mode 100644 (file)
index 0000000..4131b9b
--- /dev/null
@@ -0,0 +1,56 @@
+[%- USE T8 %]
+[%- USE L %]
+[%- USE LxERP %]
+[%- USE HTML %][%- USE JavaScript -%]
+
+[% L.hidden_tag("", SELF.template_type, id="record_template_dialog_template_type",
+                "data-controller"=SELF.data.controller,
+                "data-load_action"=SELF.data.load_action,
+                "data-save_action"=SELF.data.save_action,
+                "data-form_selector"=SELF.data.form_selector) %]
+
+<h2 class="listheading">[% LxERP.t8("Add new record template") %]</h2>
+
+<p>
+ [% LxERP.t8("Name") %]:
+ [% L.input_tag("", "", id="record_template_dialog_new_template_name") %]
+ [% L.button_tag("kivi.RecordTemplate.create()", LxERP.t8("Save")) %]
+</p>
+
+[% SET templates = SELF.templates.as_list %]
+
+[% IF templates.size %]
+
+<h2 class="listheading">[% LxERP.t8("Existing templates") %]</h2>
+
+<table>
+ <thead>
+  <tr class="listheading">
+   <th>[% LxERP.t8("Action") %]</th>
+   <th>[% LxERP.t8("Name") %]</th>
+   <th>[% LxERP.t8("Modification date") %]</th>
+  </tr>
+ </thead>
+
+ <tbody>
+[% FOREACH template = templates %]
+  <tr class="listrow">
+   <td>
+    [% L.hidden_tag("", template.template_name, id="record_template_dialog_template_name_" _ template.id) %]
+    [% L.button_tag("kivi.RecordTemplate.load(" _ template.id _ ")", LxERP.t8("Load")) %]
+    [% L.button_tag("kivi.RecordTemplate.save(" _ template.id _ ")", LxERP.t8("Save")) %]
+    [% L.button_tag("kivi.RecordTemplate.rename(" _ template.id _ ")", LxERP.t8("Rename")) %]
+    [% L.button_tag("kivi.RecordTemplate.delete(" _ template.id _ ")", LxERP.t8("Delete")) %]
+   </td>
+   <td>[% HTML.escape(template.template_name) %]</td>
+   <td>[% HTML.escape(template.mtime.to_kivitendo) %] [% HTML.escape(template.mtime.to_kivitendo_time) %]</td>
+  </tr>
+[% END %]
+ </tbody>
+
+</table>
+[% ELSE %]
+
+<p>[% LxERP.t8("There are no record templates yet.") %]</p>
+
+[% END %]