diff --git a/app/views/ps_admin/product/partials/_basic_information.html.erb b/app/views/ps_admin/product/partials/_basic_information.html.erb new file mode 100644 index 0000000..96e846e --- /dev/null +++ b/app/views/ps_admin/product/partials/_basic_information.html.erb @@ -0,0 +1,42 @@ +
| Kategoria | <%= link_to raw(' Dodaj'), '#', class: "btn btn-success btn-xs" %> |
|---|---|
| + <% if cat.id == @product.default_category_id %> + + <% end %> + <% cat.ancestors.reverse!.each do |c| %> + <%= c.name %> > + <% end %> + <%= cat.name %> + <% if cat.id == @product.default_category_id %> + + <% end %> + | ++ <%= link_to raw(' Usuń'), {controller: '/ps_admin/product', action: 'destroy', id: @product.id, category_id: cat.id}, + class: "btn btn-danger btn-xs", method: :delete, data: { confirm: cat.id == @product.default_category_id ? "Czy na pewno usunąć produkt?\nUWAGA: Ta operacja usunie produkt ze wszystkich kategorii" : "Czy napewno usunąć produkt z tej kategorii?" }, remote: true %> + | +