Merge branch 'b-3.6.1' of ../kivitendo-erp_20220811
[kivitendo-erp.git] / templates / webpages / simple_system_setting / list.html
diff --git a/templates/webpages/simple_system_setting/list.html b/templates/webpages/simple_system_setting/list.html
new file mode 100644 (file)
index 0000000..0f89642
--- /dev/null
@@ -0,0 +1,45 @@
+[%- USE HTML -%][%- USE LxERP -%][%- USE L -%][%- USE T8 -%]
+
+<h1>[% HTML.escape(title) %]</h1>
+
+[%- INCLUDE 'common/flash.html' %]
+
+<table width="100%" id="object_list">
+ <thead>
+  <tr class="listheading">
+   [% IF SELF.supports_reordering %]
+    <th align="center" width="1%"><img src="image/updown.png" alt="[ LxERP.t8('reorder item') %]"></th>
+   [% END %]
+   [% FOREACH attribute = SELF.list_attributes %]
+    <th[% IF attribute.align %] align="[% attribute.align %]"[% END %]>[% HTML.escape(attribute.title) %]</th>
+   [% END %]
+  </tr>
+ </thead>
+
+ <tbody>
+  [%- FOREACH object = SELF.all_objects %]
+   <tr class="listrow" id="object_id_[% object.id %]">
+   [% IF SELF.supports_reordering %]
+    <td align="center" class="dragdrop">[% L.img_tag(src="image/updown.png", alt=LxERP.t8("reorder item")) %]</td>
+   [% END %][%# IF SELF.supports_reordering %]
+   [% FOREACH attribute = SELF.list_attributes %]
+    <td[% IF attribute.align %] align="[% attribute.align %]"[% END %]>
+     [% IF loop.count == 1 %]
+      <a href="[% SELF.url_for(action='edit', type=SELF.type, id=object.id) %]">
+     [% END %][%# IF loop.count == 0 %]
+     [% SET method = attribute.method
+            value  = attribute.exists('formatter') ? attribute.formatter(object) : object.$method ;
+        HTML.escape(value) %]
+     [% IF loop.count == 1 %]
+      </a>
+     [% END %][%# IF loop.count == 0 %]
+    </td>
+   [% END %][%# FOREACH attribute… %]
+   </tr>
+  [%- END %][%# FOREACH object… %]
+ </tbody>
+</table>
+
+[% IF SELF.supports_reordering %]
+[% L.sortable_element("#object_list tbody", url=SELF.url_for(action="reorder", type=SELF.type), with="object_id") %]
+[% END %]