git-svn-id: https://dev.finn.de/svn/cockpit/branches/reporting_merge@1630 7926756e-e54e-46e6-9721-ed318f58905epull/6827/head
parent
52991b8994
commit
b0d0ac5f87
@ -1 +1,39 @@ |
||||
No groups selected for row or column. |
||||
<% |
||||
list = @query.collect {|r| r.important_fields }.flatten.uniq |
||||
show_units = list.include? "cost_type_id" |
||||
%> |
||||
|
||||
<table class="list"> |
||||
<thead> |
||||
<% list.each do |field| %><th><%= label_for(field) %></th><% end %> |
||||
<th><%= label_for(:label_count) %></th> |
||||
<% if show_units %> |
||||
<th><%= label_for(:field_units) %></th> |
||||
<% end %> |
||||
<th><%= label_for(:label_sum) %></th> |
||||
</thead> |
||||
<tfoot> |
||||
<th colspan='<%= list.size + 3 %>'> |
||||
<%= show_result @query %> |
||||
</th> |
||||
</tfoot> |
||||
<tbody> |
||||
<% @query.each do |result| %> |
||||
<tr class='<%= cycle("odd", "even") %>'> |
||||
<td><%= show_row result %></td> |
||||
<td><%= result.count %></td> |
||||
<% if show_units %> |
||||
<td><%= show_result result, result.fields[:cost_type_id].to_i %></td> |
||||
<% end %> |
||||
<td><%= show_result result %></td> |
||||
</tr> |
||||
<% if params[:debug] %> |
||||
<tr> |
||||
<td colspan='<%= list.size + 3 %>'> |
||||
<%= result.fields.reject {|k,v| list.include? k.to_sym }.inspect %> |
||||
</td> |
||||
</tr> |
||||
<% end %> |
||||
<% end %> |
||||
</tbody> |
||||
</table> |
||||
|
Loading…
Reference in new issue