[#4181] Hooked up the Edit and Update actions for FixedDeliverables.
This commit is contained in:
@@ -16,6 +16,12 @@ class DeliverablesController < InheritedResources::Base
|
||||
create! { contract_url(@project, @contract) }
|
||||
end
|
||||
|
||||
def update
|
||||
@deliverable = begin_of_association_chain.deliverables.find_by_id(params[:id])
|
||||
@deliverable.attributes = params[:fixed_deliverable] # TODO: hardcoded
|
||||
update! { contract_url(@project, @contract) }
|
||||
end
|
||||
|
||||
def show
|
||||
redirect_to contract_url(@project, @contract)
|
||||
end
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
<th><%= l(:field_labor) %></th>
|
||||
<th><%= l(:field_overhead) %></th>
|
||||
<th><%= l(:field_fixed) %></th>
|
||||
<th> </th>
|
||||
<th><%= l(:button_edit) %></th>
|
||||
<th><%= l(:button_delete) %></th>
|
||||
</thead>
|
||||
<tbody>
|
||||
@@ -46,7 +46,7 @@
|
||||
<td class="labor">---</td>
|
||||
<td class="overhead">---</td>
|
||||
<td class="fixed">---</td>
|
||||
<td> </td>
|
||||
<td><%= link_to(l(:button_edit), edit_contract_deliverable_path(@project, resource, deliverable), :class => 'icon icon-edit') %></td>
|
||||
<td><%= link_to(l(:button_delete), contract_deliverable_path(@project, resource, deliverable), :method => :delete, :confirm => l(:text_are_you_sure), :class => 'icon icon-del') %></td>
|
||||
|
||||
<% end %>
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
<%= content_tag(:h2, h(resource.title)) %>
|
||||
|
||||
<% semantic_form_for [@project, @contract, resource], :url => contract_deliverable_path(@project, @contract, resource), :html => {:class => 'tabular'} do |form| %>
|
||||
<%= render :partial => 'form', :object => form, :locals => {:cancel_path => contract_path(@project, resource)} %>
|
||||
<% end %>
|
||||
|
||||
<% content_for(:header_tags) do %>
|
||||
<%= stylesheet_link_tag "redmine_contracts", :plugin => "redmine_contracts", :media => "screen" %>
|
||||
<% end %>
|
||||
Reference in New Issue
Block a user