tap/app/views/products/_product.html.erb
2015-01-15 00:39:34 +01:00

14 lines
497 B
Text

<div class="col-md-3">
<div class="thumbnail">
<%= image_tag product.avatar %>
<div class="caption">
<h3><%= product.name %> - <%= euro(product.price) %></h3>
<% if current_user.admin? %>
<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 %>
</div>
</div>
</div>