annotate .svn/pristine/b6/b6a2caf496a03e85c1175dd3619219a219866eff.svn-base @ 1519:afce8026aaeb redmine-2.4-integration

Merge from branch "live"
author Chris Cannam
date Tue, 09 Sep 2014 09:34:53 +0100
parents cbb26bc654de
children
rev   line source
Chris@909 1 <% @hours.collect {|h| h[criterias[level]].to_s}.uniq.each do |value| %>
Chris@909 2 <% hours_for_value = select_hours(hours, criterias[level], value) -%>
Chris@909 3 <% next if hours_for_value.empty? -%>
Chris@909 4 <tr class="<%= cycle('odd', 'even') %> <%= 'last-level' unless criterias.length > level+1 %>">
Chris@909 5 <%= '<td></td>' * level %>
Chris@909 6 <td><%= h(format_criteria_value(criterias[level], value)) %></td>
Chris@909 7 <%= '<td></td>' * (criterias.length - level - 1) -%>
Chris@909 8 <% total = 0 -%>
Chris@909 9 <% @periods.each do |period| -%>
Chris@909 10 <% sum = sum_hours(select_hours(hours_for_value, @columns, period.to_s)); total += sum -%>
Chris@909 11 <td class="hours"><%= html_hours("%.2f" % sum) if sum > 0 %></td>
Chris@909 12 <% end -%>
Chris@909 13 <td class="hours"><%= html_hours("%.2f" % total) if total > 0 %></td>
Chris@909 14 </tr>
Chris@909 15 <% if criterias.length > level+1 -%>
Chris@909 16 <%= render(:partial => 'report_criteria', :locals => {:criterias => criterias, :hours => hours_for_value, :level => (level + 1)}) %>
Chris@909 17 <% end -%>
Chris@909 18
Chris@909 19 <% end %>