[#4181] Added link to delete a deliverable.

This commit is contained in:
Eric Davis
2010-06-23 16:35:46 -07:00
parent 78a04c04bd
commit d53f6bc021
4 changed files with 32 additions and 1 deletions
@@ -12,6 +12,10 @@ class DeliverablesController < InheritedResources::Base
create! { contract_url(@project, @contract) }
end
def destroy
destroy! { contract_url(@project, @contract) }
end
protected
def begin_of_association_chain
+5
View File
@@ -31,6 +31,8 @@
<th><%= l(:field_labor) %></th>
<th><%= l(:field_overhead) %></th>
<th><%= l(:field_fixed) %></th>
<th>&nbsp;</th>
<th><%= l(:button_delete) %></th>
</thead>
<tbody>
<% resource.deliverables.each do |deliverable| %>
@@ -44,6 +46,9 @@
<td class="labor">---</td>
<td class="overhead">---</td>
<td class="fixed">---</td>
<td>&nbsp;</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 %>
<% end %>
</tbody>