summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
Diffstat (limited to 'app')
-rw-r--r--app/views/menu_items/_title_fields.html.erb10
1 files changed, 10 insertions, 0 deletions
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 @@
1<% (I18n.available_locales - [:root]).each do |locale| %>
2 <div class="layout_row_label">
3 <%= MenuItem.human_attribute_name(:title) %> <%= locale.to_s.upcase %>
4 </div>
5 <div class="layout_row_content">
6 <%= text_field_tag "menu_item[titles][#{locale}]",
7 menu_item.translations.find_by(:locale => locale)&.title,
8 :placeholder => (locale == I18n.default_locale ? nil : t(".falls_back")) %>
9 </div>
10<% end %>