Feature #2848 » _report_criteria.rhtml.patch
app/views/timelog/_report_criteria.rhtml (working copy) | ||
---|---|---|
1 |
<% @hours.collect {|h| h[criterias[level]].to_s}.uniq.each do |value| %> |
|
1 |
<% sorted_criterias = Hash.new %> |
|
2 |
<% @hours.collect {|h| h[criterias[level]].to_s}.uniq.each {|v| sorted_criterias[v] = format_criteria_value(criterias[level], v) } %> |
|
3 |
<% sorted_criterias.sort {|a,b| a[1]<=>b[1]}.each do |value, formatted_criteria_value| %> |
|
2 | 4 |
<% hours_for_value = select_hours(hours, criterias[level], value) -%> |
3 | 5 |
<% next if hours_for_value.empty? -%> |
4 | 6 |
<tr class="<%= cycle('odd', 'even') %> <%= 'last-level' unless criterias.length > level+1 %>"> |
5 | 7 |
<%= '<td></td>' * level %> |
6 |
<td><%= h(format_criteria_value(criterias[level], value)) %></td>
|
|
8 |
<td><%= h(formatted_criteria_value) %></td>
|
|
7 | 9 |
<%= '<td></td>' * (criterias.length - level - 1) -%> |
8 | 10 |
<% total = 0 -%> |
9 | 11 |
<% @periods.each do |period| -%> |