1 [%- USE HTML -%][%- USE LxERP -%][%- USE L -%][%- USE T8 -%]
 
   3 <h1>[% HTML.escape(title) %]</h1>
 
   5 [%- INCLUDE 'common/flash.html' %]
 
   7 <table width="100%" id="object_list">
 
   9   <tr class="listheading">
 
  10    [% IF SELF.supports_reordering %]
 
  11     <th align="center" width="1%"><img src="image/updown.png" alt="[ LxERP.t8('reorder item') %]"></th>
 
  13    [% FOREACH attribute = SELF.list_attributes %]
 
  14     <th[% IF attribute.align %] align="[% attribute.align %]"[% END %]>[% HTML.escape(attribute.title) %]</th>
 
  20   [%- FOREACH object = SELF.all_objects %]
 
  21    <tr class="listrow" id="object_id_[% object.id %]">
 
  22    [% IF SELF.supports_reordering %]
 
  23     <td align="center" class="dragdrop">[% L.img_tag(src="image/updown.png", alt=LxERP.t8("reorder item")) %]</td>
 
  24    [% END %][%# IF SELF.supports_reordering %]
 
  25    [% FOREACH attribute = SELF.list_attributes %]
 
  26     <td[% IF attribute.align %] align="[% attribute.align %]"[% END %]>
 
  27      [% IF loop.count == 1 %]
 
  28       <a href="[% SELF.url_for(action='edit', type=SELF.type, id=object.id) %]">
 
  29      [% END %][%# IF loop.count == 0 %]
 
  30      [% SET method = attribute.method
 
  31             value  = attribute.exists('formatter') ? attribute.formatter(object) : object.$method ;
 
  33      [% IF loop.count == 1 %]
 
  35      [% END %][%# IF loop.count == 0 %]
 
  37    [% END %][%# FOREACH attribute… %]
 
  39   [%- END %][%# FOREACH object… %]
 
  43 [% IF SELF.supports_reordering %]
 
  44 [% L.sortable_element("#object_list tbody", url=SELF.url_for(action="reorder", type=SELF.type), with="object_id") %]