Files
nairobi/app/views/shared/_common_globalize_locales.html.erb
Senén Rodero Rodríguez 01bb0b9c6b Move translation interface to views root shared folder
As we are going to call this partial from any application view it will
have more sense to place it at `app/views/shared`.
2019-07-01 14:49:43 +02:00

36 lines
1.5 KiB
Plaintext

<div class="row globalize-languages column padding-top <%= highlight_translation_html_class %>"
data-zero-languages-description="<%= t("shared.translations.languages_in_use", count: 0) %>"
data-one-languages-description="<%= t("shared.translations.languages_in_use", count: 1) %>"
data-other-languages-description="<%= t("shared.translations.languages_in_use", count: 2) %>">
<div class="small-6 large-3 column">
<small>
<strong>
<div class="inline"><%= active_languages_text(resource) %></div>
</strong>
</small>
<%= select_tag :select_language,
active_languages(resource),
prompt: "Choose language",
class: "js-select-language" %>
<div class="margin-bottom">
<% if manage_languages %>
<% I18n.available_locales.each do |locale| %>
<%= link_to t("admin.translations.remove_language"), "#",
style: display_destroy_locale_style(resource, locale),
class: "delete js-delete-language js-delete-#{locale}",
data: { locale: locale } %>
<% end %>
<% end %>
</div>
</div>
<div class="small-6 large-3 column margin-top end">
<% if manage_languages %>
<%= select_tag :add_language,
options_for_locale_select,
prompt: t("admin.translations.add_language"),
class: "js-add-language" %>
<% end %>
</div>
</div>