diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index 16b5b53..0b39fd8 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -2,10 +2,10 @@ module ApplicationHelper def menu_builder ret = start_menu - ret += menu_element('Strona głowna', '/', "fa fa-dashboard fa-fw") - ret += menu_level_open('Konfiguracja', "fa fa-wrench fa-fw") - ret += menu_element('Grupy produktow', '/product_groups', '') - ret += menu_element('Produkty', '/products', '') + ret += menu_element('Strona głowna', '/', "fa fa-dashboard fa-fw", 'welcome') + ret += menu_level_open('Konfiguracja', "fa fa-wrench fa-fw", ['product_groups','products']) + ret += menu_element('Grupy produktow', '/product_groups', '', 'product_groups') + ret += menu_element('Produkty', '/products', '', 'products') ret += menu_level_close ret += close_menu return raw(ret) @@ -15,20 +15,25 @@ module ApplicationHelper '
diff --git a/app/views/products/index.html.erb b/app/views/products/index.html.erb index 75fe95a..b69818a 100644 --- a/app/views/products/index.html.erb +++ b/app/views/products/index.html.erb @@ -1,33 +1,49 @@ -

<%= notice %>

+
+
+

Produkty

+
+ +
+
+
+
+
+ Listing Products (<%= link_to 'New Product', new_product_path %>) +
+ +
+
+

<%= notice %>

+ + + + + + + + + + + + <% @products.each do |product| %> + + + + + + + + + + <% end %> + +
NameProduct groupKcalMeasure
<%= product.name %><%= product.product_group.name %><%= product.kcal %><%= product.measure %><%= link_to raw(' Pokaz'), product, :class => "btn btn-success btn-xs" %><%= link_to raw(' Edytuj'), edit_product_path(product), :class => "btn btn-info btn-xs" %><%= link_to raw(' Usuń'), product, method: :delete, data: { confirm: 'Are you sure?' }, :class => "btn btn-danger btn-xs" %>
+
-

Listing Products

- - - - - - - - - - - - - - <% @products.each do |product| %> - - - - - - - - - - <% end %> - -
NameProduct groupKcalMeasure
<%= product.name %><%= product.product_group.name %><%= product.kcal %><%= product.measure %><%= link_to 'Show', product %><%= link_to 'Edit', edit_product_path(product) %><%= link_to 'Destroy', product, method: :delete, data: { confirm: 'Are you sure?' } %>
- -
- -<%= link_to 'New Product', new_product_path %> +
+ +
+ +
+ +