Moves the locale switcher to its own shared view
This commit is contained in:
@@ -1,15 +1,7 @@
|
|||||||
<header class="<%= header_css %>">
|
<header class="<%= header_css %>">
|
||||||
<section class="top-links">
|
<section class="top-links">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="language">
|
<%= render 'shared/locale_switcher' %>
|
||||||
<span id="locale-switcher">
|
|
||||||
<%= t("layouts.header.language") %>
|
|
||||||
[
|
|
||||||
<% available_locales_to_switch.each do |locale| %>
|
|
||||||
<%= link_to(locale, params.merge(locale: locale), id: "locale-link-#{locale}") %>
|
|
||||||
<% end %>
|
|
||||||
]
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
|
|||||||
@@ -1,15 +1,7 @@
|
|||||||
<header class="<%= header_css %>">
|
<header class="<%= header_css %>">
|
||||||
<section class="top-links">
|
<section class="top-links">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="language">
|
<%= render 'shared/locale_switcher' %>
|
||||||
<span id="locale-switcher">
|
|
||||||
<%= t("layouts.header.language") %>
|
|
||||||
[
|
|
||||||
<% available_locales_to_switch.each do |locale| %>
|
|
||||||
<%= link_to(locale, params.merge(locale: locale), id: "locale-link-#{locale}", data: { no_turbolink: true }) %>
|
|
||||||
<% end %>
|
|
||||||
]
|
|
||||||
</div>
|
|
||||||
<div class="external-links">
|
<div class="external-links">
|
||||||
<%= link_to t("layouts.header.participation"), root_path, class: "selected" %> |
|
<%= link_to t("layouts.header.participation"), root_path, class: "selected" %> |
|
||||||
<%= link_to t("layouts.header.external_link_transparency"), "#" %> |
|
<%= link_to t("layouts.header.external_link_transparency"), "#" %> |
|
||||||
|
|||||||
10
app/views/shared/_locale_switcher.html.erb
Normal file
10
app/views/shared/_locale_switcher.html.erb
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
<div class="locale">
|
||||||
|
<span>
|
||||||
|
<%= t("layouts.header.language") %>
|
||||||
|
<form>
|
||||||
|
<select class="js-locale-switcher" name='locale-switcher'>
|
||||||
|
<%= available_locale_options_for_select %>
|
||||||
|
</select>
|
||||||
|
</form>
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
Reference in New Issue
Block a user