[#4182] Hooked up nested attributes for Deliverable -> LaborExpense

This commit is contained in:
Eric Davis committed 2010-07-02 15:39:40 -07:00
1 parent a8452a834f
commit 2dd3331f66
11 files changed
+65 -10

No files matched your search

+11
View File
@@ -22,7 +22,18 @@
<% end %>
<%= form.input :total, :input_html => {:size => 10}, :wrapper_html => {:class => 'deliverable_total_input'} %>
<% form.inputs :name => l(:text_deliverable_finances) do %>
<% form.semantic_fields_for :labor_expenses do |labor_expense| %>
<% labor_expense.inputs :name => l(:field_labor) do %>
<%= labor_expense.input :hours, :label => l(:text_short_hours), :input_html => {:size => 10} %>
<%= labor_expense.input :budget, :label => l(:text_dollar_sign), :input_html => {:size => 10} %>
<% end %>
<% end %>
<% end %>
<% end %>
<% form.buttons do %>
<%= form.commit_button :label => l(:button_save) %>
<%= link_to(l(:button_cancel), cancel_path) %>
+1 -1
View File
@@ -1,5 +1,5 @@
<%= content_tag(:h2, h(resource.title)) %>
<% semantic_form_for [@project, @contract, resource], :url => contract_deliverable_path(@project, @contract, resource), :html => {:class => 'deliverable tabular'} do |form| %>
<% semantic_form_for [@project, @contract, setup_nested_deliverable_records(resource)], :url => contract_deliverable_path(@project, @contract, resource), :html => {:class => 'deliverable tabular'} do |form| %>
<%= render :partial => 'form', :object => form, :locals => {:cancel_path => contract_path(@project, @contract)} %>
<% end %>
+1 -1
View File
@@ -1,5 +1,5 @@
<%= content_tag(:h2, l(:text_new_deliverable)) %>
<% semantic_form_for [@project, @contract, resource], :url => contract_deliverables_path(@project, @contract), :html => {:class => 'deliverable tabular'} do |form| %>
<% semantic_form_for [@project, @contract, setup_nested_deliverable_records(resource)], :url => contract_deliverables_path(@project, @contract), :html => {:class => 'deliverable tabular'} do |form| %>
<%= render :partial => 'form', :object => form, :locals => {:cancel_path => contract_path(@project, @contract)} %>
<% end %>