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 @@ +
+
+
+ + + + +
+
+
+
+ + + +
+ Ilość + + <%= @product.quantity %> + +
+
+
+
+ <%= render '/ps_admin/product/partials/set_active' %> +
+
+ <%= render '/ps_admin/product/partials/set_chk_quantity' %> +
+
+
+
+ <%= render '/ps_admin/image/partials/images' %> +
+
+ <%= render '/ps_admin/image/partials/form' %> +
+
diff --git a/app/views/ps_admin/product/partials/_categories.html.erb b/app/views/ps_admin/product/partials/_categories.html.erb new file mode 100644 index 0000000..1fe2d44 --- /dev/null +++ b/app/views/ps_admin/product/partials/_categories.html.erb @@ -0,0 +1,31 @@ +
+
+ + + + + + <% @product.categories.each do |cat| %> + + + + + <% end %> + +
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 %> +
+
+
diff --git a/app/views/ps_admin/product/partials/_show.html.erb b/app/views/ps_admin/product/partials/_show.html.erb index 921d2d7..35613c2 100644 --- a/app/views/ps_admin/product/partials/_show.html.erb +++ b/app/views/ps_admin/product/partials/_show.html.erb @@ -5,47 +5,19 @@

<%= @product.name %>

-
-
-
- - - - +