Fixes for displaying categories
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
- content_for :head do
|
||||
/- content_for :head do
|
||||
= javascript_include_tag 'https://maps.googleapis.com/maps/api/js?v=3.exp&sensor=false'
|
||||
|
||||
= form_for @supplier, url: supplier_update_settings_path, html: {class: 'form-horizontal'} do |f|
|
||||
|
||||
@@ -5,9 +5,9 @@
|
||||
= hidden_field_tag 'product_category[product_ids][]', ''
|
||||
= label_tag nil, Product.model_name.human_plural, class: 'control-label'
|
||||
.controls
|
||||
- for product in current_supplier.products
|
||||
- for product in ProductDecorator.decorate_collection(current_supplier.products)
|
||||
= check_box_tag "product_category[product_ids][]", product.id, @product_category.product_ids.to_a.include?(product.id), id: "product-checker-#{product.id}"
|
||||
= label_tag "product-checker-#{product.id}", product.name
|
||||
= label_tag "product-checker-#{product.id}", product.display
|
||||
br
|
||||
.control-group
|
||||
#week_days-group.btn-group data-toggle="buttons-checkbox"
|
||||
|
||||
@@ -14,5 +14,5 @@ dl.dl-horizontal.show-list
|
||||
'
|
||||
= link_to t("helpers.links.destroy"), [:suppliers, @product_category], method: :delete, data: {confirm: are_you_sure? }, class: 'btn btn-danger'
|
||||
- content_for :row do
|
||||
- @products = ProductDecorator.decorate(@product_category.products)
|
||||
- @products = ProductDecorator.decorate_collection(@product_category.products)
|
||||
= render template: 'suppliers/products/index'
|
||||
|
||||
Reference in New Issue
Block a user