Impproved group_by in table feature.
This commit is contained in:
parent
4fd9385196
commit
0f418e13e6
1 changed files with 5 additions and 1 deletions
|
@ -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 %>
|
||||||
|
|
Loading…
Reference in a new issue