annotate app/views/time_entry_reports/_report_criteria.rhtml @ 507:0c939c159af4
redmine-1.2
Update to Redmine 1.2.1 on 1.2-stable branch (Redmine SVN rev 6270)
author |
Chris Cannam |
date |
Thu, 14 Jul 2011 10:32:19 +0100 |
parents |
94944d00e43c |
children |
|
rev |
line source |
chris@37
|
1 <% @hours.collect {|h| h[criterias[level]].to_s}.uniq.each do |value| %>
|
chris@37
|
2 <% hours_for_value = select_hours(hours, criterias[level], value) -%>
|
chris@37
|
3 <% next if hours_for_value.empty? -%>
|
chris@37
|
4 <tr class="<%= cycle('odd', 'even') %> <%= 'last-level' unless criterias.length > level+1 %>">
|
chris@37
|
5 <%= '<td></td>' * level %>
|
chris@37
|
6 <td><%= h(format_criteria_value(criterias[level], value)) %></td>
|
chris@37
|
7 <%= '<td></td>' * (criterias.length - level - 1) -%>
|
chris@37
|
8 <% total = 0 -%>
|
chris@37
|
9 <% @periods.each do |period| -%>
|
chris@37
|
10 <% sum = sum_hours(select_hours(hours_for_value, @columns, period.to_s)); total += sum -%>
|
chris@37
|
11 <td class="hours"><%= html_hours("%.2f" % sum) if sum > 0 %></td>
|
chris@37
|
12 <% end -%>
|
chris@37
|
13 <td class="hours"><%= html_hours("%.2f" % total) if total > 0 %></td>
|
chris@37
|
14 </tr>
|
chris@37
|
15 <% if criterias.length > level+1 -%>
|
chris@37
|
16 <%= render(:partial => 'report_criteria', :locals => {:criterias => criterias, :hours => hours_for_value, :level => (level + 1)}) %>
|
chris@37
|
17 <% end -%>
|
chris@37
|
18
|
chris@37
|
19 <% end %>
|