comparison .svn/pristine/f5/f57cbb444e8429b644080691a858bff0638c3c62.svn-base @ 1464:261b3d9a4903 redmine-2.4

Update to Redmine 2.4 branch rev 12663
author Chris Cannam
date Tue, 14 Jan 2014 14:37:42 +0000
parents
children
comparison
equal deleted inserted replaced
1296:038ba2d95de8 1464:261b3d9a4903
1 <% @report.hours.collect {|h| h[criterias[level]].to_s}.uniq.each do |value| %>
2 <% hours_for_value = select_hours(hours, criterias[level], value) -%>
3 <% next if hours_for_value.empty? -%>
4 <tr class="<%= cycle('odd', 'even') %> <%= criterias.length > level+1 ? 'subtotal' : 'last-level' %>">
5 <%= ("<td></td>" * level).html_safe %>
6 <td class="name"><%= h(format_criteria_value(@report.available_criteria[criterias[level]], value)) %></td>
7 <%= ("<td></td>" * (criterias.length - level - 1)).html_safe -%>
8 <% total = 0 -%>
9 <% @report.periods.each do |period| -%>
10 <% sum = sum_hours(select_hours(hours_for_value, @report.columns, period.to_s)); total += sum -%>
11 <td class="hours"><%= html_hours("%.2f" % sum) if sum > 0 %></td>
12 <% end -%>
13 <td class="hours"><%= html_hours("%.2f" % total) if total > 0 %></td>
14 </tr>
15 <% if criterias.length > level+1 -%>
16 <%= render(:partial => 'report_criteria', :locals => {:criterias => criterias, :hours => hours_for_value, :level => (level + 1)}) %>
17 <% end -%>
18
19 <% end %>