From: Toshi MARUYAMA Date: Fri, 26 Aug 2011 04:57:37 +0000 (+0000) Subject: rename .rhtml to .html.erb of app/views/time_entry_reports/_report_criteria.rhtml. X-Git-Tag: 1.3.0~1329 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=e3430cb5571f46c4d2f5efccb934e852f67fe812;p=redmine.git rename .rhtml to .html.erb of app/views/time_entry_reports/_report_criteria.rhtml. :rhtml and :rxml were finally removed as template handlers at Rails 3.1 RC4. git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@6633 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- diff --git a/app/views/time_entry_reports/_report_criteria.html.erb b/app/views/time_entry_reports/_report_criteria.html.erb new file mode 100644 index 000000000..c9a1cfb45 --- /dev/null +++ b/app/views/time_entry_reports/_report_criteria.html.erb @@ -0,0 +1,19 @@ +<% @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? -%> + +<%= '' * level %> +<%= h(format_criteria_value(criterias[level], value)) %> +<%= '' * (criterias.length - level - 1) -%> + <% total = 0 -%> + <% @periods.each do |period| -%> + <% sum = sum_hours(select_hours(hours_for_value, @columns, period.to_s)); total += sum -%> + <%= html_hours("%.2f" % sum) if sum > 0 %> + <% end -%> + <%= html_hours("%.2f" % total) if total > 0 %> + +<% if criterias.length > level+1 -%> + <%= render(:partial => 'report_criteria', :locals => {:criterias => criterias, :hours => hours_for_value, :level => (level + 1)}) %> +<% end -%> + +<% end %> diff --git a/app/views/time_entry_reports/_report_criteria.rhtml b/app/views/time_entry_reports/_report_criteria.rhtml deleted file mode 100644 index c9a1cfb45..000000000 --- a/app/views/time_entry_reports/_report_criteria.rhtml +++ /dev/null @@ -1,19 +0,0 @@ -<% @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? -%> - -<%= '' * level %> -<%= h(format_criteria_value(criterias[level], value)) %> -<%= '' * (criterias.length - level - 1) -%> - <% total = 0 -%> - <% @periods.each do |period| -%> - <% sum = sum_hours(select_hours(hours_for_value, @columns, period.to_s)); total += sum -%> - <%= html_hours("%.2f" % sum) if sum > 0 %> - <% end -%> - <%= html_hours("%.2f" % total) if total > 0 %> - -<% if criterias.length > level+1 -%> - <%= render(:partial => 'report_criteria', :locals => {:criterias => criterias, :hours => hours_for_value, :level => (level + 1)}) %> -<% end -%> - -<% end %>