2018-02-26 21:42:02 +00:00
|
|
|
.row
|
|
|
|
.col
|
|
|
|
= form_tag site_i18n_edit_path(@site), method: :get, class: 'form-inline' do
|
|
|
|
%h1
|
|
|
|
- if @lang_from == @lang_to
|
|
|
|
= t('i18n.edit_same')
|
|
|
|
= select_tag 'from',
|
|
|
|
options_for_select(@options, @lang_from),
|
|
|
|
class: 'form-control'
|
|
|
|
= t('i18n.translate_into')
|
|
|
|
= select_tag 'to',
|
|
|
|
options_for_select(@options, @lang_to),
|
|
|
|
class: 'form-control'
|
|
|
|
= submit_tag t('i18n.translate'), class: 'btn btn-info', name: nil
|
|
|
|
- else
|
|
|
|
= t('i18n.translating.from')
|
|
|
|
= select_tag 'from',
|
|
|
|
options_for_select(@options, @lang_from),
|
|
|
|
class: 'form-control'
|
|
|
|
= t('i18n.translating.to')
|
|
|
|
= select_tag 'to',
|
|
|
|
options_for_select(@options, @lang_to),
|
|
|
|
class: 'form-control'
|
|
|
|
= submit_tag t('i18n.change'), class: 'btn btn-info', name: nil
|
2018-02-26 20:32:33 +00:00
|
|
|
|
2018-02-26 21:42:02 +00:00
|
|
|
= render 'layouts/help', help: t('help.i18n.index')
|
2018-02-19 20:00:21 +00:00
|
|
|
|
2018-02-09 21:28:27 +00:00
|
|
|
|
2018-04-16 17:20:45 +00:00
|
|
|
#top.row
|
2018-02-26 21:42:02 +00:00
|
|
|
.col
|
2018-02-26 20:32:33 +00:00
|
|
|
|
2018-02-26 21:42:02 +00:00
|
|
|
= form_tag site_i18n_path(@site), method: :post, class: 'form' do
|
|
|
|
= hidden_field 'i18n', 'lang_to', value: @lang_to
|
|
|
|
.form-group
|
2018-04-16 17:20:45 +00:00
|
|
|
.dropdown.inline
|
|
|
|
%button.btn.btn-info.dropdown-toggle{type: 'button',
|
|
|
|
data: { toggle: 'dropdown' },
|
|
|
|
aria: { haspopup: 'true', expanded: 'false' }}
|
|
|
|
= t('i18n.jump')
|
|
|
|
.dropdown-menu{aria: { labelledby: t('i18n.jump') }}
|
|
|
|
- @site.data.dig(@lang_from).each_pair do |section, content|
|
|
|
|
%a.dropdown-item{href: "##{section}"}= t("help.i18n.#{section}")
|
2018-02-26 21:42:02 +00:00
|
|
|
= submit_tag t('i18n.save'), class: 'btn btn-success'
|
|
|
|
|
|
|
|
= render 'i18n/recursive', data: @site.data.dig(@lang_from), superkeys: []
|
|
|
|
|
|
|
|
.form-group
|
|
|
|
= submit_tag t('i18n.save'), class: 'btn btn-success'
|