<%= f.select :kind, [[l(:label_cost_based_deliverable), CostBasedDeliverable.name], [l(:label_fixed_deliverable), FixedDeliverable.name]], {:required => true, :prompt => true }, :autocomplete => 'off' %>
<%= observe_field :deliverable_kind, :url => { :action => :new }, :update => :content, :with => "Form.serialize('deliverable-form')" %><%= f.text_field :subject, :size => 80, :required => true %>
<%= f.text_area :description, :cols => 60, :rows => (@deliverable.description.blank? ? 10 : [[10, @deliverable.description.length / 50].max, 100].min), :accesskey => accesskey(:edit), :class => 'wiki-edit' %>
<% if @deliverable.kind == "CostBasedDeliverable" -%><%= l(:caption_cost_unit_plural)%> | <%= l(:caption_cost_type) %> | <% if User.current.allowed_to?(:view_unit_price, @project)%><%= l(:caption_overall_costs) %> | <%end%>|
---|---|---|---|
<%= text_field c, :units, :value => c.units, :size => 3, :id => "deliverable_costs_#{c.id}_units", :name => "deliverable_costs[#{c.id}][units]" %> "><%=h c.units.to_s == '1.0' ? c.cost_type.unit : c.cost_type.unit_plural %> | <%= select c.cost_type, :id, cost_types_collection_for_select_options, {}, :name => "deliverable_costs[#{c.id}][cost_type_id]", :id => "deliverable_costs_#{c.id}_cost_type_id" %> <%= observe_field( "deliverable_costs_#{c.id}_cost_type_id", :url => {:action => :update_deliverable_costs_row}, :with => "'cost_type_id=' + encodeURIComponent(value) + '&units=' + encodeURIComponent(document.getElementById('deliverable_costs_#{c.id}_units').value) + '&element_id=deliverable_costs_#{c.id}'") %> | <% if User.current.allowed_to?(:view_unit_price, @project)%>"><%= number_to_currency(c.costs) if c.costs > 0 %> <%= observe_field( "deliverable_costs_#{c.id}_units", :frequency => 1, :url => {:action => :update_deliverable_costs_row}, :with => "'cost_type_id=' + encodeURIComponent(document.getElementById('deliverable_costs_#{c.id}_cost_type_id').value) + '&units=' + encodeURIComponent(value) + '&element_id=deliverable_costs_#{c.id}'") %> | <% end %><%= image_to_function 'delete.png', "deleteDeliverableCostsEntry('deliverable_costs_#{c.id}')" %> |
<%= l(:field_hours)%> | <%= l(:label_user) %> | <% if User.current.allowed_to?(:view_all_rates, @project) || (user == User.current && User.current.allowed_to?(:view_own_rate, @project)) %><%= l(:caption_overall_costs) %> | <% end %>|
---|---|---|---|
<%= text_field c, :units, :value => c.hours, :size => 3, :id => "deliverable_hours_#{c.id}_hours", :name => "deliverable_hours[#{c.id}][hours]" %> | <%= select c.user, :id, user_collection_for_select_options (:generic_user => true), {}, :name => "deliverable_hours[#{c.id}][user_id]", :id => "deliverable_hours_#{c.id}_user_id" %> <%= observe_field( "deliverable_hours_#{c.id}_cost_type_id", :url => {:action => :update_deliverable_hours_row}, :with => "'user_id=' + encodeURIComponent(value) + '&hours=' + encodeURIComponent(document.getElementById('deliverable_hours_#{c.id}_hours').value) + '&element_id=deliverable_hours_#{c.id}'") %> | <% if User.current.allowed_to?(:view_unit_price, @project)%>"><%= number_to_currency(c.costs) if c.costs > 0 %> <%= observe_field( "deliverable_hours_#{c.id}_hours", :frequency => 1, :url => {:action => :update_deliverable_hours_row}, :with => "'user_id=' + encodeURIComponent(document.getElementById('deliverable_hours_#{c.id}_user_id').value) + '&hours=' + encodeURIComponent(value) + '&element_id=deliverable_hours_#{c.id}'") %> | <% end %><%= image_to_function 'delete.png', "deleteDeliverableHoursEntry('deliverable_hours_#{c.id}')" %> |
<%= f.check_box(:project_manager_signoff) %>
<%= f.check_box(:client_signoff) %>
<%= f.text_field :due_date, :size => 10 %><%= calendar_for('deliverable_due') %>