[#5417] Show the deliverable type on the edit form.

This commit is contained in:
Eric Davis
2011-02-04 09:45:27 -08:00
parent 39073905c3
commit 75680e5a49
2 changed files with 8 additions and 0 deletions

View File

@@ -42,6 +42,10 @@ class Deliverable < ActiveRecord::Base
''
end
def humanize_type
type.to_s.sub('Deliverable','')
end
# Deliverable's aren't dated. Subclasses may override this for period behavior.
def current_date
nil

View File

@@ -13,6 +13,10 @@
<%= form.select(:type, Deliverable.valid_types_to_select, {:include_blank => false}, {:class => 'type'}) %>
</li>
<% else %>
<li class="string" id="deliverable_type_input">
<%= form.label(:type, l(:field_type)) %>
<span style="padding:3px"><%= h(resource.humanize_type) %></span>
</li>
<%= form.input :type, :as => :hidden, :class => 'type' %>
<% end %>
<%= form.input :manager, :required => true, :collection => @project.users.sort %>