Merge branch 'b-3.6.1' of ../kivitendo-erp_20220811
[kivitendo-erp.git] / templates / webpages / bank_transactions / _template_list.html
diff --git a/templates/webpages/bank_transactions/_template_list.html b/templates/webpages/bank_transactions/_template_list.html
new file mode 100644 (file)
index 0000000..245f062
--- /dev/null
@@ -0,0 +1,55 @@
+[%- USE HTML -%][%- USE LxERP -%][%- USE P -%]
+
+[% IF TEMPLATES_AP.size %]
+ [% LxERP.t8('AP template suggestions') %]:
+ <table>
+  <thead>
+   <tr>
+    <th class="listheading">[% LxERP.t8('Description') %]</th>
+    <th class="listheading">[% LxERP.t8('Vendor') %]</th>
+    <th class="listheading">[% LxERP.t8('Employee') %]</th>
+    <th class="listheading">[% LxERP.t8('Template date') %]</th>
+   </tr>
+  </thead>
+
+  <tbody>
+   [% FOREACH template = TEMPLATES_AP %]
+    <tr class="listrow">
+     <td>[% P.link_tag(SELF.load_ap_record_template_url(template), template.template_name) %]</td>
+     <td>[% HTML.escape(template.vendor.name) %]</td>
+     <td>[% HTML.escape(template.employee.name || template.employee.login) %]</td>
+     <td>[% HTML.escape(template.itime_as_date) %]</td>
+    </tr>
+   [% END %]
+  </tbody>
+ </table>
+[% ELSE %]
+ <p class="message_hint">[% LxERP.t8('No AP template was found.') %]</p>
+[% END %]
+
+[% IF TEMPLATES_GL.size %]
+ [% LxERP.t8('GL template suggestions') %]:
+ <table>
+  <thead>
+   <tr>
+    <th class="listheading">[% LxERP.t8('Description') %]</th>
+    <th class="listheading">[% LxERP.t8('Reference') %]</th>
+    <th class="listheading">[% LxERP.t8('Employee') %]</th>
+    <th class="listheading">[% LxERP.t8('Template date') %]</th>
+   </tr>
+  </thead>
+
+  <tbody>
+   [% FOREACH template = TEMPLATES_GL %]
+    <tr class="listrow">
+     <td>[% P.link_tag(SELF.load_gl_record_template_url(template), template.template_name) %]</td>
+     <td>[% HTML.escape(template.reference) %]</td>
+     <td>[% HTML.escape(template.employee.name || template.employee.login) %]</td>
+     <td>[% HTML.escape(template.itime_as_date) %]</td>
+    </tr>
+   [% END %]
+  </tbody>
+ </table>
+[% ELSE %]
+ <p class="message_hint">[% LxERP.t8('No GL template was found.') %]</p>
+[% END %]