--- /dev/null
+[%- 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 %]