mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-01-24 20:36:49 +00:00
Split sidebar into parts
This commit is contained in:
@@ -1,61 +1,3 @@
|
||||
.sidebar_item.four.columns.alpha#payment_methods{ ng: { show: 'Enterprise.is_distributor' } }
|
||||
.four.columns.alpha.header{ ng: { class: "paymentMethodsColor()" } }
|
||||
%span.four.columns.alpha.centered Payment Methods
|
||||
.four.columns.alpha.list{ ng: { class: "paymentMethodsColor()" } }
|
||||
- if @payment_methods.count > 0
|
||||
-# = hidden_field_tag "enterprise[payment_method_ids][]", []
|
||||
- @payment_methods.each do |payment_method|
|
||||
%span.four.columns.alpha.list-item{ class: "#{cycle('odd','even')}", ng: { controller: 'paymentMethodCtrl', init: "findPaymentMethodByID(#{payment_method.id})" } }
|
||||
%a.three.columns.alpha{ href: "#{edit_admin_payment_method_path(payment_method)}" }
|
||||
= payment_method.name
|
||||
%span.one.column.omega
|
||||
= f.check_box :payment_method_ids, { multiple: true, 'ng-model' => 'PaymentMethod.selected' }, payment_method.id, nil
|
||||
- else
|
||||
.four.columns.alpha.list-item
|
||||
%span.three.columns.alpha None Available
|
||||
%span.one.column.omega
|
||||
%span.icon-remove-sign
|
||||
%a.four.columns.alpha.button{ href: "#{new_admin_payment_method_path}", ng: { class: "paymentMethodsColor()" } }
|
||||
CREATE NEW
|
||||
%span.icon-arrow-right
|
||||
|
||||
.sidebar_item.four.columns.alpha#shipping_methods{ ng: { show: 'Enterprise.is_distributor' } }
|
||||
.four.columns.alpha.header{ ng: { class: "shippingMethodsColor()" } }
|
||||
%span.four.columns.alpha.centered Shipping Methods
|
||||
.four.columns.alpha.list{ ng: { class: "shippingMethodsColor()" } }
|
||||
- if @shipping_methods.count > 0
|
||||
- @shipping_methods.each do |shipping_method|
|
||||
%span.four.columns.alpha.list-item{ class: "#{cycle('odd','even')}", ng: { controller: 'shippingMethodCtrl', init: "findShippingMethodByID(#{shipping_method.id})" } }
|
||||
%a.three.columns.alpha{ href: "#{edit_admin_shipping_method_path(shipping_method)}" }
|
||||
= shipping_method.name
|
||||
%span.one.column.omega
|
||||
= f.check_box :shipping_method_ids, { :multiple => true, 'ng-model' => 'ShippingMethod.selected' }, shipping_method.id, nil
|
||||
- else
|
||||
.four.columns.alpha.list-item
|
||||
%span.three.columns.alpha None Available
|
||||
%span.one.column.omega
|
||||
%span.icon-remove-sign
|
||||
%a.four.columns.alpha.button{ href: "#{new_admin_shipping_method_path}", ng: { class: "shippingMethodsColor()" } }
|
||||
CREATE NEW
|
||||
%span.icon-arrow-right
|
||||
|
||||
- enterprise_fees_color = @enterprise_fees.count > 0 ? "blue" : "red"
|
||||
.sidebar_item.four.columns.alpha#enterprise_fees{ ng: { show: 'Enterprise.is_distributor' } }
|
||||
.four.columns.alpha.header{ class: "#{enterprise_fees_color}" }
|
||||
%span.four.columns.alpha.centered Enterprise Fees
|
||||
.four.columns.alpha.list{ class: "#{enterprise_fees_color}" }
|
||||
- if @enterprise_fees.count > 0
|
||||
- @enterprise_fees.each do |enterprise_fee|
|
||||
%a.four.columns.alpha.list-item{ class: "#{cycle('odd','even')}", href: "#{main_app.admin_enterprise_fees_path}" }
|
||||
%span.three.columns.alpha
|
||||
= enterprise_fee.name
|
||||
%span.one.column.omega
|
||||
|
||||
- else
|
||||
.four.columns.alpha.list-item.red
|
||||
%span.three.columns.alpha None Available
|
||||
%span.one.column.omega
|
||||
%span.icon-remove-sign
|
||||
%a.four.columns.alpha.button{ href: "#{main_app.admin_enterprise_fees_path}", class: "#{enterprise_fees_color}" }
|
||||
CREATE NEW
|
||||
%span.icon-arrow-right
|
||||
= render 'sidebar_payment_methods', f: f
|
||||
= render 'sidebar_shipping_methods', f: f
|
||||
= render 'sidebar_enterprise_fees', f: f
|
||||
|
||||
@@ -0,0 +1,20 @@
|
||||
- enterprise_fees_color = @enterprise_fees.count > 0 ? "blue" : "red"
|
||||
.sidebar_item.four.columns.alpha#enterprise_fees{ ng: { show: 'Enterprise.is_distributor' } }
|
||||
.four.columns.alpha.header{ class: "#{enterprise_fees_color}" }
|
||||
%span.four.columns.alpha.centered Enterprise Fees
|
||||
.four.columns.alpha.list{ class: "#{enterprise_fees_color}" }
|
||||
- if @enterprise_fees.count > 0
|
||||
- @enterprise_fees.each do |enterprise_fee|
|
||||
%a.four.columns.alpha.list-item{ class: "#{cycle('odd','even')}", href: "#{main_app.admin_enterprise_fees_path}" }
|
||||
%span.three.columns.alpha
|
||||
= enterprise_fee.name
|
||||
%span.one.column.omega
|
||||
|
||||
- else
|
||||
.four.columns.alpha.list-item.red
|
||||
%span.three.columns.alpha None Available
|
||||
%span.one.column.omega
|
||||
%span.icon-remove-sign
|
||||
%a.four.columns.alpha.button{ href: "#{main_app.admin_enterprise_fees_path}", class: "#{enterprise_fees_color}" }
|
||||
CREATE NEW
|
||||
%span.icon-arrow-right
|
||||
@@ -0,0 +1,21 @@
|
||||
.sidebar_item.four.columns.alpha#payment_methods{ ng: { show: 'Enterprise.is_distributor' } }
|
||||
.four.columns.alpha.header{ ng: { class: "paymentMethodsColor()" } }
|
||||
%span.four.columns.alpha.centered Payment Methods
|
||||
.four.columns.alpha.list{ ng: { class: "paymentMethodsColor()" } }
|
||||
- if @payment_methods.count > 0
|
||||
-# = hidden_field_tag "enterprise[payment_method_ids][]", []
|
||||
- @payment_methods.each do |payment_method|
|
||||
%span.four.columns.alpha.list-item{ class: "#{cycle('odd','even')}", ng: { controller: 'paymentMethodCtrl', init: "findPaymentMethodByID(#{payment_method.id})" } }
|
||||
%a.three.columns.alpha{ href: "#{edit_admin_payment_method_path(payment_method)}" }
|
||||
= payment_method.name
|
||||
%span.one.column.omega
|
||||
= f.check_box :payment_method_ids, { multiple: true, 'ng-model' => 'PaymentMethod.selected' }, payment_method.id, nil
|
||||
- else
|
||||
.four.columns.alpha.list-item
|
||||
%span.three.columns.alpha None Available
|
||||
%span.one.column.omega
|
||||
%span.icon-remove-sign
|
||||
%a.four.columns.alpha.button{ href: "#{new_admin_payment_method_path}", ng: { class: "paymentMethodsColor()" } }
|
||||
CREATE NEW
|
||||
%span.icon-arrow-right
|
||||
|
||||
@@ -0,0 +1,20 @@
|
||||
.sidebar_item.four.columns.alpha#shipping_methods{ ng: { show: 'Enterprise.is_distributor' } }
|
||||
.four.columns.alpha.header{ ng: { class: "shippingMethodsColor()" } }
|
||||
%span.four.columns.alpha.centered Shipping Methods
|
||||
.four.columns.alpha.list{ ng: { class: "shippingMethodsColor()" } }
|
||||
- if @shipping_methods.count > 0
|
||||
- @shipping_methods.each do |shipping_method|
|
||||
%span.four.columns.alpha.list-item{ class: "#{cycle('odd','even')}", ng: { controller: 'shippingMethodCtrl', init: "findShippingMethodByID(#{shipping_method.id})" } }
|
||||
%a.three.columns.alpha{ href: "#{edit_admin_shipping_method_path(shipping_method)}" }
|
||||
= shipping_method.name
|
||||
%span.one.column.omega
|
||||
= f.check_box :shipping_method_ids, { :multiple => true, 'ng-model' => 'ShippingMethod.selected' }, shipping_method.id, nil
|
||||
- else
|
||||
.four.columns.alpha.list-item
|
||||
%span.three.columns.alpha None Available
|
||||
%span.one.column.omega
|
||||
%span.icon-remove-sign
|
||||
%a.four.columns.alpha.button{ href: "#{new_admin_shipping_method_path}", ng: { class: "shippingMethodsColor()" } }
|
||||
CREATE NEW
|
||||
%span.icon-arrow-right
|
||||
|
||||
Reference in New Issue
Block a user