tap/app/views/stocks/new.html.erb
2015-09-02 12:57:41 +02:00

20 lines
638 B
Text

<div class="row">
<div class="col-md-6 col-md-offset-3">
<h2>Add stock</h2>
<%= f_form_for @stock do |f| %>
<%= render 'stocks/errors' %>
<%= f.fields_for :stock_entries do |se_field| %>
<div class="row">
<div class="col-sm-3">
<%= image_tag se_field.object.product.avatar %>
</div>
<div class="col-sm-9">
<%= se_field.hidden_field :product_id %>
<%= se_field.number_field :count, skip_label: true %>
</div>
</div>
<% end %>
<%= f.submit "Insert stock", class: 'btn btn-primary' %>
<% end %>
</div>
</div>