<%= t :'spotlight.exhibits.languages.selection_instructions' %>

<%= bootstrap_form_for [current_exhibit, Spotlight::Language.new], layout: :horizontal, html: { class: 'row' }, label_col: "col-sm-3", control_col: "col-sm-9" do |f| %>
<%= f.select('locale', add_exhibit_language_dropdown_options, prompt: t('.selection_prompt')) %> <%= hidden_field_tag :tab, 'language' %>
<%= f.submit nil, class: 'btn btn-primary' %>
<% end %>

<%= t :'spotlight.exhibits.languages.current_header' %>

<% if current_exhibit.languages.any? && current_exhibit.languages.last.persisted? %>

<%= t :'spotlight.exhibits.languages.current_instructions' %>

<%= bootstrap_form_for current_exhibit, layout: :horizontal do |f| %>
<% current_exhibit.languages.each do |language| %> <%= f.fields_for :languages, language do |languages| %> <% end %> <% end %>
<%= t('.table_heading.language') %> <%= t('.table_heading.public') %> <%= t('.table_heading.action') %>
<%= t("locales.#{language.locale}") %>
<%= languages.label :public, class: 'sr-only' %> <%= languages.check_box_without_bootstrap :public %>
<%= link_to t('.remove'), exhibit_language_path(current_exhibit, language), method: :delete, data: { confirm: t('.modal.confirm') }, class: 'btn btn-sm btn-danger' %>
<%= hidden_field_tag :tab, 'language' %> <%= f.submit nil, class: 'btn btn-primary' %>
<% end %> <% else %>

<%= t('.no_languages_help_text') %>

<% end %>