OSDN Git Service

add estimated hours support
authorAkira Saito <akrstjp@users.sourceforge.jp>
Fri, 5 Jun 2015 14:38:18 +0000 (23:38 +0900)
committerAkira Saito <akrstjp@users.sourceforge.jp>
Fri, 5 Jun 2015 14:38:18 +0000 (23:38 +0900)
app/helpers/application_helper.rb
app/views/hooks/_quick_edit_context.html.erb

index c92ba00..28f630e 100644 (file)
@@ -86,6 +86,8 @@ module ApplicationHelper
         l(:field_start_date)
      when :due_date
         l(:field_due_date)
+     when :estimated_hours
+        l(:field_estimated_hours)
      end
   end
 
@@ -102,6 +104,8 @@ module ApplicationHelper
         :date
      when :due_date
         :date
+     when :estimated_hours
+        :float
      end
   end
 
index 52d1671..9031ef2 100644 (file)
       <%= quick_edit_link_to(@issue_ids, get_attribute_caption(:due_date), :due_date, nil, back_url, !editable(:due_date,@can,readonly_fields)) %>
       <% end %>
 
+      <% unless @issues.any? {|issue| issue.disabled_core_fields.include?('estimated_hours') } %>
+      <%= quick_edit_link_to(@issue_ids, get_attribute_caption(:estimated_hours), :estimated_hours, nil, back_url, !editable(:estimated_hours,@can,readonly_fields)) %>
+      <% end %>
+
       <% custom_fields.each do |f| %>
       <%= quick_edit_link_to(@issue_ids, f.name, 'custom_field_values', f.id, back_url, !editable_custom_field(f,@can,readonly_fields)) %>
       <% end %>