From dd0d3bdc5935026af2d76bd437c2446be8657665 Mon Sep 17 00:00:00 2001 From: erdgeist Date: Tue, 28 Jul 2026 00:04:54 +0200 Subject: add partial for menu_item titles in both locales --- app/views/menu_items/_title_fields.html.erb | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 app/views/menu_items/_title_fields.html.erb (limited to 'app/views/menu_items/_title_fields.html.erb') diff --git a/app/views/menu_items/_title_fields.html.erb b/app/views/menu_items/_title_fields.html.erb new file mode 100644 index 00000000..81ec4ad6 --- /dev/null +++ b/app/views/menu_items/_title_fields.html.erb @@ -0,0 +1,10 @@ +<% (I18n.available_locales - [:root]).each do |locale| %> +
+ <%= MenuItem.human_attribute_name(:title) %> <%= locale.to_s.upcase %> +
+
+ <%= text_field_tag "menu_item[titles][#{locale}]", + menu_item.translations.find_by(:locale => locale)&.title, + :placeholder => (locale == I18n.default_locale ? nil : t(".falls_back")) %> +
+<% end %> -- cgit v1.3