Separate actions for new StockArticle
This commit is contained in:
parent
69060a6da6
commit
4a208c83c0
6 changed files with 32 additions and 14 deletions
|
|
@ -52,7 +52,7 @@
|
|||
}
|
||||
if('' != selectedArticle.id) {
|
||||
$.ajax({
|
||||
url: '#{new_stock_article_supplier_deliveries_path(@supplier)}',
|
||||
url: '#{derive_stock_article_supplier_deliveries_path(@supplier)}',
|
||||
type: 'get',
|
||||
data: {old_article_id: selectedArticle.id},
|
||||
contentType: 'application/json; charset=UTF-8'
|
||||
|
|
|
|||
|
|
@ -6,6 +6,6 @@
|
|||
%td
|
||||
.btn-group
|
||||
= link_to t('.action_edit'), edit_stock_article_supplier_deliveries_path(@supplier, :stock_article_id => article.id), remote: true, class: 'btn btn-mini'
|
||||
= link_to t('.action_other_price'), new_stock_article_supplier_deliveries_path(@supplier, :old_stock_article_id => article.id), remote: true, class: 'btn btn-mini'
|
||||
= link_to t('.action_other_price'), copy_stock_article_supplier_deliveries_path(@supplier, :old_stock_article_id => article.id), remote: true, class: 'btn btn-mini'
|
||||
- deliver_button_disabled = ( @delivery and @delivery.includes_article? article ) ? ( 'disabled' ) : ( false )
|
||||
= link_to t('.action_add_to_delivery'), add_stock_change_supplier_deliveries_path(@supplier, :stock_article_id => article.id), :method => :post, remote: true, class: 'button-add-stock-change btn btn-mini btn-primary', disabled: deliver_button_disabled
|
||||
|
|
|
|||
5
app/views/deliveries/copy_stock_article.js.erb
Normal file
5
app/views/deliveries/copy_stock_article.js.erb
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
$('#modalContainer').html(
|
||||
'<%= j(render(:partial => "stock_article_form", :locals => {:stock_article => @stock_article})) %>'
|
||||
);
|
||||
|
||||
$('#modalContainer').modal();
|
||||
5
app/views/deliveries/derive_stock_article.js.erb
Normal file
5
app/views/deliveries/derive_stock_article.js.erb
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
$('#modalContainer').html(
|
||||
'<%= j(render(:partial => "stock_article_form", :locals => {:stock_article => @stock_article})) %>'
|
||||
);
|
||||
|
||||
$('#modalContainer').modal();
|
||||
Loading…
Add table
Add a link
Reference in a new issue