tap/app/views/stocks/new.html.erb

21 lines
632 B
Text
Raw Normal View History

<div class="row">
<div class="col-md-6 col-md-offset-3">
<h2>Add stock</h2>
<%= f_form_for @stock do |f| %>
<%= f.error_messages %>
<%= 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>