2015-02-09 16:06:24 +00:00
|
|
|
<div class="col-md-3 form_products">
|
2015-07-08 15:06:02 +00:00
|
|
|
<div class="thumbnail<%= ' out-of-stock' if product.stock.zero? %>">
|
2015-02-09 16:06:24 +00:00
|
|
|
<div class="form_row center">
|
2015-02-19 17:07:34 +00:00
|
|
|
<div class="form_row_image">
|
|
|
|
<%= image_tag product.avatar %>
|
|
|
|
</div>
|
2015-02-09 16:06:24 +00:00
|
|
|
<div class="caption">
|
2015-07-07 18:13:37 +00:00
|
|
|
<h6>
|
2015-07-08 15:38:51 +00:00
|
|
|
<%= kcal_tag product.calories %>
|
2015-07-07 18:13:37 +00:00
|
|
|
</h6>
|
2015-07-01 14:19:36 +00:00
|
|
|
<h4 class="text-nowrap">
|
|
|
|
<%= content_tag :span, product.name %>
|
|
|
|
<%= content_tag :small, euro(product.price) %>
|
|
|
|
</h4>
|
2015-07-08 11:37:19 +00:00
|
|
|
<%= f.counter :count, min: 0, max: product.stock, skip_label: true, wrapper_class: "input-group", class: "row_counter" %>
|
2015-02-09 16:06:24 +00:00
|
|
|
<%= f.fields_for :product do |product| %>
|
|
|
|
<%= product.hidden_field :price_cents, class: :price %>
|
|
|
|
<%= product.hidden_field :stock, class: :stock %>
|
|
|
|
<% end %>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|