Mercurial > hg > soundsoftware-site
view .svn/pristine/f5/f57cbb444e8429b644080691a858bff0638c3c62.svn-base @ 1543:05d639e5d59b feature_1136
First cut of a git export script
author | Chris Cannam |
---|---|
date | Tue, 12 Jan 2016 15:15:02 +0000 |
parents | 261b3d9a4903 |
children |
line wrap: on
line source
<% @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 class="name"><%= 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 %>