2015-03-19 17:38:59 +01:00
|
|
|
<%- if controller_name == 'products' && current_user && current_user.admin? %>
|
|
|
|
<%= 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?'} %>
|
|
|
|
<% end -%>
|
|
|
|
|
|
|
|
<%- if controller_name == 'users' %>
|
|
|
|
<div class="product_dagschotel">
|
|
|
|
<% if current_user.dagschotel != product %>
|
2015-09-14 17:52:25 +02:00
|
|
|
<%= link_to "Make dagschotel", dagschotel_user_path(current_user, product), class: "btn btn-default" %>
|
2015-03-19 17:38:59 +01:00
|
|
|
<% else %>
|
2015-09-14 17:52:25 +02:00
|
|
|
<%= link_to "Huidige dagschotel", dagschotel_user_path(current_user, product), class: "btn btn-success", disabled: true %>
|
2015-03-19 17:38:59 +01:00
|
|
|
<% end %>
|
|
|
|
</div>
|
|
|
|
<% end -%>
|