Impproved group_by in table feature.

This commit is contained in:
Martin Edenhofer 2012-11-12 16:17:09 +01:00
parent 4fd9385196
commit 0f418e13e6

View file

@ -16,12 +16,16 @@
</tr>
</thead>
<tbody>
<% length = @header.length %>
<% if @checkbox || @radio: %>
<% length++ %>
<% end %>
<% position = 0 %>
<% groupLast = '' %>
<% for object in @objects: %>
<% if @groupBy: %>
<% if groupLast isnt object[@groupBy.id]: %>
<tr class=""><td colspan="<%= @overview.length + 1 %>"><b><%- @P( object[@groupBy.name] ) %></b></td></tr>
<tr class=""><td colspan="<%= length %>"><b><%- @P( object[@groupBy.name] ) %></b></td></tr>
<% groupLast = object[@groupBy.id] %>
<% end %>
<% end %>