mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-02-10 23:07:47 +00:00
More structured layout for Tag Rules UI
This commit is contained in:
@@ -1,4 +0,0 @@
|
||||
angular.module("admin.tagRules").directive "discountOrder", ->
|
||||
restrict: "E"
|
||||
replace: true
|
||||
templateUrl: "admin/tag_rules/discount_order.html"
|
||||
@@ -1,4 +0,0 @@
|
||||
angular.module("admin.tagRules").directive "filterOrderCycles", ->
|
||||
restrict: "E"
|
||||
replace: true
|
||||
templateUrl: "admin/tag_rules/filter_order_cycles.html"
|
||||
@@ -1,4 +0,0 @@
|
||||
angular.module("admin.tagRules").directive "filterPaymentMethods", ->
|
||||
restrict: "E"
|
||||
replace: true
|
||||
templateUrl: "admin/tag_rules/filter_payment_methods.html"
|
||||
@@ -1,4 +0,0 @@
|
||||
angular.module("admin.tagRules").directive "filterProducts", ->
|
||||
restrict: "E"
|
||||
replace: true
|
||||
templateUrl: "admin/tag_rules/filter_products.html"
|
||||
@@ -1,4 +0,0 @@
|
||||
angular.module("admin.tagRules").directive "filterShippingMethods", ->
|
||||
restrict: "E"
|
||||
replace: true
|
||||
templateUrl: "admin/tag_rules/filter_shipping_methods.html"
|
||||
@@ -0,0 +1,41 @@
|
||||
angular.module("admin.tagRules").directive "tagRule", ->
|
||||
restrict: "C"
|
||||
templateUrl: "admin/tag_rules/tag_rule.html"
|
||||
link: (scope, element, attrs) ->
|
||||
scope.opt =
|
||||
"TagRule::FilterShippingMethods":
|
||||
textTop: "Shipping methods tagged"
|
||||
textBottom: "are:"
|
||||
taggable: "shipping_method"
|
||||
tagsAttr: "shipping_method_tags"
|
||||
tagListAttr: "preferred_shipping_method_tags"
|
||||
inputTemplate: "admin/tag_rules/filter_shipping_methods_input.html"
|
||||
tagListFor: (rule) ->
|
||||
rule.preferred_shipping_method_tags
|
||||
"TagRule::FilterPaymentMethods":
|
||||
textTop: "Payment methods tagged"
|
||||
textBottom: "are:"
|
||||
taggable: "payment_method"
|
||||
tagsAttr: "payment_method_tags"
|
||||
tagListAttr: "preferred_payment_method_tags"
|
||||
inputTemplate: "admin/tag_rules/filter_payment_methods_input.html"
|
||||
tagListFor: (rule) ->
|
||||
rule.preferred_payment_method_tags
|
||||
"TagRule::FilterOrderCycles":
|
||||
textTop: "Order Cycles tagged"
|
||||
textBottom: "are:"
|
||||
taggable: "exchange"
|
||||
tagsAttr: "exchange_tags"
|
||||
tagListAttr: "preferred_exchange_tags"
|
||||
inputTemplate: "admin/tag_rules/filter_order_cycles_input.html"
|
||||
tagListFor: (rule) ->
|
||||
rule.preferred_exchange_tags
|
||||
"TagRule::FilterProducts":
|
||||
textTop: "Inventory variants tagged"
|
||||
textBottom: "are:"
|
||||
taggable: "variant"
|
||||
tagsAttr: "variant_tags"
|
||||
tagListAttr: "preferred_variant_tags"
|
||||
inputTemplate: "admin/tag_rules/filter_products_input.html"
|
||||
tagListFor: (rule) ->
|
||||
rule.preferred_variant_tags
|
||||
Reference in New Issue
Block a user