% @available_criterias[criterias[level]][:values].each do |value| %>
<%= ' | ' * level %>
<%= value.name %> |
<%= ' | ' * (criterias.length - level - 1) %>
<% hours_for_value = select_hours(hours, criterias[level], value.id) %>
<% @periods.each do |period| %>
<% sum = sum_hours(select_hours(hours_for_value, @columns, period.to_s)) %>
<%= sum > 0 ? "%.2f" % sum : "-" %> |
<% end %>
<% if criterias.length > level+1 %>
<%= render(:partial => 'report_criteria', :locals => {:criterias => criterias, :hours => hours_for_value, :level => (level + 1)}) %>
<% end %>
<% end %>
<% reset_cycle %>