1 [%- USE HTML -%][%- USE LxERP -%][%- USE L -%][%- USE T8 -%]
3 <h1>[% HTML.escape(title) %]</h1>
5 [%- INCLUDE 'common/flash.html' %]
8 <table id="object_list" class="tbl-list wi-moderate">
11 [% IF SELF.supports_reordering %]
12 <th class="img center"><img src="image/updown.png" alt="[ LxERP.t8('reorder item') %]"></th>
14 [% FOREACH attribute = SELF.list_attributes %]
15 <th[% IF attribute.align %] align="[% attribute.align %]"[% END %]>[% HTML.escape(attribute.title) %]</th>
21 [%- FOREACH object = SELF.all_objects %]
22 <tr id="object_id_[% object.id %]">
23 [% IF SELF.supports_reordering %]
24 <td class="img center dragdrop">[% L.img_tag(src="image/updown.png", alt=LxERP.t8("reorder item")) %]</td>
25 [% END %][%# IF SELF.supports_reordering %]
26 [% FOREACH attribute = SELF.list_attributes %]
27 <td[% IF attribute.align %] align="[% attribute.align %]"[% END %]>
28 [% IF loop.count == 1 %]
29 <a href="[% SELF.url_for(action='edit', type=SELF.type, id=object.id) %]">
30 [% END %][%# IF loop.count == 0 %]
31 [% SET method = attribute.method
32 value = attribute.exists('formatter') ? attribute.formatter(object) : object.$method ;
34 [% IF loop.count == 1 %]
36 [% END %][%# IF loop.count == 0 %]
38 [% END %][%# FOREACH attribute… %]
40 [%- END %][%# FOREACH object… %]
46 [% IF SELF.supports_reordering %]
47 [% L.sortable_element("#object_list tbody", url=SELF.url_for(action="reorder", type=SELF.type), with="object_id") %]