Skip to content

Commit bb39b3f

Browse files
authored
Merge pull request #5593 from solidusio/elia/admin/table-keys
[admin] Consistently use `label` for providing text for table scopes, batch actions and filters
2 parents 36a78e7 + e717cdb commit bb39b3f

File tree

24 files changed

+41
-41
lines changed

24 files changed

+41
-41
lines changed

admin/app/components/solidus_admin/adjustment_reasons/index/component.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ def row_url(adjustment_reason)
2020
def batch_actions
2121
[
2222
{
23-
display_name: t('.batch_actions.delete'),
23+
label: t('.batch_actions.delete'),
2424
action: solidus_admin.adjustment_reasons_path,
2525
method: :delete,
2626
icon: 'delete-bin-7-line',

admin/app/components/solidus_admin/option_types/index/component.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ def next_page_path
3636
def batch_actions
3737
[
3838
{
39-
display_name: t('.batch_actions.delete'),
39+
label: t('.batch_actions.delete'),
4040
action: solidus_admin.option_types_path,
4141
method: :delete,
4242
icon: 'delete-bin-7-line',

admin/app/components/solidus_admin/orders/index/component.rb

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ def scopes
4343
def filters
4444
[
4545
{
46-
presentation: t('.filters.status'),
46+
label: t('.filters.status'),
4747
combinator: 'or',
4848
attribute: "state",
4949
predicate: "eq",
@@ -55,7 +55,7 @@ def filters
5555
end
5656
},
5757
{
58-
presentation: t('.filters.shipment_state'),
58+
label: t('.filters.shipment_state'),
5959
combinator: 'or',
6060
attribute: "shipment_state",
6161
predicate: "eq",
@@ -67,7 +67,7 @@ def filters
6767
end
6868
},
6969
{
70-
presentation: t('.filters.payment_state'),
70+
label: t('.filters.payment_state'),
7171
combinator: 'or',
7272
attribute: "payment_state",
7373
predicate: "eq",
@@ -79,7 +79,7 @@ def filters
7979
end
8080
},
8181
{
82-
presentation: t('.filters.promotions'),
82+
label: t('.filters.promotions'),
8383
combinator: 'or',
8484
attribute: "promotions_id",
8585
predicate: "in",

admin/app/components/solidus_admin/payment_methods/index/component.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ def page_actions
3636
def batch_actions
3737
[
3838
{
39-
display_name: t('.batch_actions.delete'),
39+
label: t('.batch_actions.delete'),
4040
action: solidus_admin.payment_methods_path,
4141
method: :delete,
4242
icon: 'delete-bin-7-line',

admin/app/components/solidus_admin/products/index/component.rb

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,19 +29,19 @@ def page_actions
2929
def batch_actions
3030
[
3131
{
32-
display_name: t('.batch_actions.delete'),
32+
label: t('.batch_actions.delete'),
3333
action: solidus_admin.products_path,
3434
method: :delete,
3535
icon: 'delete-bin-7-line',
3636
},
3737
{
38-
display_name: t('.batch_actions.discontinue'),
38+
label: t('.batch_actions.discontinue'),
3939
action: solidus_admin.discontinue_products_path,
4040
method: :put,
4141
icon: 'pause-circle-line',
4242
},
4343
{
44-
display_name: t('.batch_actions.activate'),
44+
label: t('.batch_actions.activate'),
4545
action: solidus_admin.activate_products_path,
4646
method: :put,
4747
icon: 'play-circle-line',
@@ -63,7 +63,7 @@ def scopes
6363
def filters
6464
Spree::OptionType.all.map do |option_type|
6565
{
66-
presentation: option_type.presentation,
66+
label: option_type.presentation,
6767
combinator: 'or',
6868
attribute: "variants_option_values",
6969
predicate: "in",

admin/app/components/solidus_admin/promotion_categories/index/component.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ def page_actions
2121
def batch_actions
2222
[
2323
{
24-
display_name: t('.batch_actions.delete'),
24+
label: t('.batch_actions.delete'),
2525
action: solidus_admin.promotion_categories_path,
2626
method: :delete,
2727
icon: 'delete-bin-7-line',

admin/app/components/solidus_admin/promotions/index/component.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ def page_actions
2929
def batch_actions
3030
[
3131
{
32-
display_name: t('.batch_actions.delete'),
32+
label: t('.batch_actions.delete'),
3333
action: solidus_admin.promotions_path,
3434
method: :delete,
3535
icon: 'delete-bin-7-line',
@@ -50,7 +50,7 @@ def scopes
5050
def filters
5151
[
5252
{
53-
presentation: Spree::PromotionCategory.model_name.human.pluralize,
53+
label: Spree::PromotionCategory.model_name.human.pluralize,
5454
attribute: "promotion_category_id",
5555
predicate: "in",
5656
options: Spree::PromotionCategory.pluck(:name, :id)

admin/app/components/solidus_admin/properties/index/component.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ def page_actions
2929
def batch_actions
3030
[
3131
{
32-
display_name: t('.batch_actions.delete'),
32+
label: t('.batch_actions.delete'),
3333
action: solidus_admin.properties_path,
3434
method: :delete,
3535
icon: 'delete-bin-7-line',

admin/app/components/solidus_admin/refund_reasons/index/component.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ def actions
3030
def batch_actions
3131
[
3232
{
33-
display_name: t('.batch_actions.delete'),
33+
label: t('.batch_actions.delete'),
3434
action: solidus_admin.refund_reasons_path,
3535
method: :delete,
3636
icon: 'delete-bin-7-line',

admin/app/components/solidus_admin/return_reasons/index/component.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ def row_url(return_reason)
2020
def batch_actions
2121
[
2222
{
23-
display_name: t('.batch_actions.delete'),
23+
label: t('.batch_actions.delete'),
2424
action: solidus_admin.return_reasons_path,
2525
method: :delete,
2626
icon: 'delete-bin-7-line',

0 commit comments

Comments
 (0)