|
1 |
| -<div role="tabpanel" class="tab-pane <%= 'active' if @tab == 'language' %>" id="language"> |
2 |
| - <p class="instructions"><%= t :'spotlight.exhibits.languages.selection_instructions' %></p> |
| 1 | +<p class="instructions"><%= t :'spotlight.exhibits.languages.selection_instructions' %></p> |
3 | 2 |
|
4 |
| - <%= 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| %> |
5 |
| - <div class='col-sm-6'> |
6 |
| - <%= f.select('locale', add_exhibit_language_dropdown_options, prompt: t('.selection_prompt')) %> |
7 |
| - <%= hidden_field_tag :tab, 'language' %> |
8 |
| - </div> |
9 |
| - <div class='col-sm-6'> |
10 |
| - <%= f.submit nil, class: 'btn btn-primary' %> |
11 |
| - </div> |
12 |
| - <% end %> |
| 3 | +<%= 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| %> |
| 4 | + <div class='col-sm-6'> |
| 5 | + <%= f.select('locale', add_exhibit_language_dropdown_options, prompt: t('.selection_prompt')) %> |
| 6 | + <%= hidden_field_tag :tab, 'language' %> |
| 7 | + </div> |
| 8 | + <div class='col-sm-6'> |
| 9 | + <%= f.submit nil, class: 'btn btn-primary' %> |
| 10 | + </div> |
| 11 | +<% end %> |
13 | 12 |
|
14 |
| - <h2 class="mt-4"><%= t :'spotlight.exhibits.languages.current_header' %></h2> |
| 13 | +<h2 class="mt-4"><%= t :'spotlight.exhibits.languages.current_header' %></h2> |
15 | 14 |
|
16 |
| - <% if current_exhibit.languages.any? && current_exhibit.languages.last.persisted? %> |
17 |
| - <p class="instructions"><%= t :'spotlight.exhibits.languages.current_instructions' %></p> |
| 15 | +<% if current_exhibit.languages.any? && current_exhibit.languages.last.persisted? %> |
| 16 | + <p class="instructions"><%= t :'spotlight.exhibits.languages.current_instructions' %></p> |
18 | 17 |
|
19 |
| - <%= bootstrap_form_for current_exhibit, layout: :horizontal do |f| %> |
20 |
| - <div class="row"> |
21 |
| - <div class="col-md-8"> |
22 |
| - <table class="table table-striped"> |
23 |
| - <thead> |
24 |
| - <tr> |
25 |
| - <th scope="col"><%= t('.table_heading.language') %></th> |
26 |
| - <th scope="col" class='text-center'><%= t('.table_heading.public') %></th> |
27 |
| - <th scope="col" class='text-center'><%= t('.table_heading.action') %></th> |
28 |
| - </tr> |
29 |
| - </thead> |
30 |
| - <tbody> |
31 |
| - <% current_exhibit.languages.each do |language| %> |
32 |
| - <%= f.fields_for :languages, language do |languages| %> |
33 |
| - <tr> |
34 |
| - <td><%= t("locales.#{language.locale}") %></td> |
35 |
| - <td class='text-center'> |
36 |
| - <div class='checkbox'> |
37 |
| - <%= languages.label :public, class: 'sr-only' %> |
38 |
| - <%= languages.check_box_without_bootstrap :public %> |
39 |
| - </div> |
40 |
| - </td> |
41 |
| - <td class='text-center'><%= link_to t('.remove'), exhibit_language_path(current_exhibit, language), method: :delete, data: { confirm: t('.modal.confirm') }, class: 'btn btn-sm btn-danger' %></td> |
42 |
| - </tr> |
43 |
| - <% end %> |
| 18 | + <%= bootstrap_form_for current_exhibit, layout: :horizontal do |f| %> |
| 19 | + <div class="row"> |
| 20 | + <div class="col-md-8"> |
| 21 | + <table class="table table-striped"> |
| 22 | + <thead> |
| 23 | + <tr> |
| 24 | + <th scope="col"><%= t('.table_heading.language') %></th> |
| 25 | + <th scope="col" class='text-center'><%= t('.table_heading.public') %></th> |
| 26 | + <th scope="col" class='text-center'><%= t('.table_heading.action') %></th> |
| 27 | + </tr> |
| 28 | + </thead> |
| 29 | + <tbody> |
| 30 | + <% current_exhibit.languages.each do |language| %> |
| 31 | + <%= f.fields_for :languages, language do |languages| %> |
| 32 | + <tr> |
| 33 | + <td><%= t("locales.#{language.locale}") %></td> |
| 34 | + <td class='text-center'> |
| 35 | + <div class='checkbox'> |
| 36 | + <%= languages.label :public, class: 'sr-only' %> |
| 37 | + <%= languages.check_box_without_bootstrap :public %> |
| 38 | + </div> |
| 39 | + </td> |
| 40 | + <td class='text-center'><%= link_to t('.remove'), exhibit_language_path(current_exhibit, language), method: :delete, data: { confirm: t('.modal.confirm') }, class: 'btn btn-sm btn-danger' %></td> |
| 41 | + </tr> |
44 | 42 | <% end %>
|
45 |
| - </tbody> |
46 |
| - </table> |
47 |
| - </div> |
| 43 | + <% end %> |
| 44 | + </tbody> |
| 45 | + </table> |
48 | 46 | </div>
|
49 |
| - <div class="form-actions"> |
50 |
| - <div class="primary-actions"> |
51 |
| - <%= hidden_field_tag :tab, 'language' %> |
52 |
| - <%= f.submit nil, class: 'btn btn-primary' %> |
53 |
| - </div> |
| 47 | + </div> |
| 48 | + <div class="form-actions"> |
| 49 | + <div class="primary-actions"> |
| 50 | + <%= hidden_field_tag :tab, 'language' %> |
| 51 | + <%= f.submit nil, class: 'btn btn-primary' %> |
54 | 52 | </div>
|
55 |
| - <% end %> |
56 |
| - <% else %> |
57 |
| - <p><%= t('.no_languages_help_text') %></p> |
| 53 | + </div> |
58 | 54 | <% end %>
|
59 |
| -</div> |
| 55 | +<% else %> |
| 56 | + <p><%= t('.no_languages_help_text') %></p> |
| 57 | +<% end %> |
0 commit comments