]> source.dussan.org Git - redmine.git/commitdiff
rename .rhtml to .html.erb of app/views/time_entry_reports/_report_criteria.rhtml.
authorToshi MARUYAMA <marutosijp2@yahoo.co.jp>
Fri, 26 Aug 2011 04:57:37 +0000 (04:57 +0000)
committerToshi MARUYAMA <marutosijp2@yahoo.co.jp>
Fri, 26 Aug 2011 04:57:37 +0000 (04:57 +0000)
: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

app/views/time_entry_reports/_report_criteria.html.erb [new file with mode: 0644]
app/views/time_entry_reports/_report_criteria.rhtml [deleted file]

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 (file)
index 0000000..c9a1cfb
--- /dev/null
@@ -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? -%>
+<tr class="<%= cycle('odd', 'even') %> <%= 'last-level' unless criterias.length > level+1 %>">
+<%= '<td></td>' * level %>
+<td><%= h(format_criteria_value(criterias[level], value)) %></td>
+<%= '<td></td>' * (criterias.length - level - 1) -%>
+  <% total = 0 -%>
+  <% @periods.each do |period| -%>
+    <% sum = sum_hours(select_hours(hours_for_value, @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 %>
diff --git a/app/views/time_entry_reports/_report_criteria.rhtml b/app/views/time_entry_reports/_report_criteria.rhtml
deleted file mode 100644 (file)
index c9a1cfb..0000000
+++ /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? -%>
-<tr class="<%= cycle('odd', 'even') %> <%= 'last-level' unless criterias.length > level+1 %>">
-<%= '<td></td>' * level %>
-<td><%= h(format_criteria_value(criterias[level], value)) %></td>
-<%= '<td></td>' * (criterias.length - level - 1) -%>
-  <% total = 0 -%>
-  <% @periods.each do |period| -%>
-    <% sum = sum_hours(select_hours(hours_for_value, @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 %>