diff --git a/app/components/admin/widget/cards/table_component.html.erb b/app/components/admin/widget/cards/table_component.html.erb index 01a52aec5..d7fc9e579 100644 --- a/app/components/admin/widget/cards/table_component.html.erb +++ b/app/components/admin/widget/cards/table_component.html.erb @@ -2,9 +2,9 @@ - - - + + + diff --git a/app/components/admin/widget/cards/table_component.rb b/app/components/admin/widget/cards/table_component.rb index 74e2112a3..eba23de30 100644 --- a/app/components/admin/widget/cards/table_component.rb +++ b/app/components/admin/widget/cards/table_component.rb @@ -5,4 +5,10 @@ class Admin::Widget::Cards::TableComponent < ApplicationComponent @cards = cards @no_cards_message = no_cards_message end + + private + + def attribute_name(attribute) + ::Widget::Card.human_attribute_name(attribute) + end end
<%= ::Widget::Card.human_attribute_name(:title) %><%= ::Widget::Card.human_attribute_name(:description) %><%= ::Widget::Card.human_attribute_name(:link_text) %> / <%= ::Widget::Card.human_attribute_name(:link_url) %><%= attribute_name(:title) %><%= attribute_name(:description) %><%= attribute_name(:link_text) %> / <%= attribute_name(:link_url) %> <%= t("admin.shared.image") %> <%= t("admin.shared.actions") %>