diff .svn/pristine/78/78b66567c02155be024cd5394ccc97e2082ea1c1.svn-base @ 1295:622f24f53b42 redmine-2.3

Update to Redmine SVN revision 11972 on 2.3-stable branch
author Chris Cannam
date Fri, 14 Jun 2013 09:02:21 +0100
parents
children
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/.svn/pristine/78/78b66567c02155be024cd5394ccc97e2082ea1c1.svn-base	Fri Jun 14 09:02:21 2013 +0100
@@ -0,0 +1,19 @@
+<% @report.hours.collect {|h| h[criterias[level]].to_s}.uniq.each do |value| %>
+<% hours_for_value = select_hours(hours, criterias[level], value) -%>
+<% next if hours_for_value.empty? -%>
+<tr class="<%= cycle('odd', 'even') %> <%= criterias.length > level+1 ? 'subtotal' : 'last-level' %>">
+<%= ("<td></td>" * level).html_safe %>
+<td><%= h(format_criteria_value(@report.available_criteria[criterias[level]], value)) %></td>
+<%= ("<td></td>" * (criterias.length - level - 1)).html_safe -%>
+  <% total = 0 -%>
+  <% @report.periods.each do |period| -%>
+    <% sum = sum_hours(select_hours(hours_for_value, @report.columns, period.to_s)); total += sum -%>
+    <td class="hours"><%= html_hours("%.2f" % sum) if sum > 0 %></td>
+  <% end -%>
+  <td class="hours"><%= html_hours("%.2f" % total) if total > 0 %></td>
+</tr>
+<% if criterias.length > level+1 -%>
+  <%= render(:partial => 'report_criteria', :locals => {:criterias => criterias, :hours => hours_for_value, :level => (level + 1)}) %>
+<% end -%>
+
+<% end %>