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> </tr>
</thead> </thead>
<tbody> <tbody>
<% length = @header.length %>
<% if @checkbox || @radio: %>
<% length++ %>
<% end %>
<% position = 0 %> <% position = 0 %>
<% groupLast = '' %> <% groupLast = '' %>
<% for object in @objects: %> <% for object in @objects: %>
<% if @groupBy: %> <% if @groupBy: %>
<% if groupLast isnt object[@groupBy.id]: %> <% 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] %> <% groupLast = object[@groupBy.id] %>
<% end %> <% end %>
<% end %> <% end %>