2014-12-09 14:39:27 +01:00
|
|
|
<div class="col-md-3">
|
2015-02-12 16:14:11 +01:00
|
|
|
<div class="thumbnail pic">
|
2014-12-09 14:39:27 +01:00
|
|
|
<%= image_tag product.avatar %>
|
|
|
|
<div class="caption">
|
2015-02-12 16:14:11 +01:00
|
|
|
<h4><%= product.name %></h4>
|
|
|
|
<h3><%= euro(product.price) %></h3>
|
|
|
|
<h6>(In stock: <%= product.stock %>)</h6>
|
2015-02-10 07:15:25 +01:00
|
|
|
<% if current_user && current_user.admin? %>
|
2015-01-15 00:39:34 +01:00
|
|
|
<p>
|
|
|
|
<%= link_to "Edit", edit_product_path(product), class: "btn btn-default" %>
|
|
|
|
<%= link_to "Delete", product_path(product), method: :delete, class: "btn btn-danger", data: {confirm: 'Are you sure?'} %>
|
|
|
|
</p>
|
|
|
|
<% end %>
|
2014-12-09 14:39:27 +01:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|