Sha256: 49e427c804879bc3d1c99cb5ef99cece5d645ec5b113b814a1e99c2677acc499
Contents?: true
Size: 1.14 KB
Versions: 2
Compression:
Stored size: 1.14 KB
Contents
- default_locale = Settings.i18n_locales.first .field.type_textarea.i18n{ :'data-name' => name } - Settings.i18n_locales.each_with_index do |locale, i| - translation = f.object.translations.find_or_initialize_by_locale(locale) - is_default_locale = locale == default_locale .localization{:"data-locale" => locale, :style => is_default_locale ? nil : 'display:none'} = f.fields_for :"translations", translation, :child_index => i do |ff| .label_wrap = ff.label name, name.to_s.humanize + ':' .value - unless translation.new_record? = ff.hidden_field :id = ff.hidden_field :locale - if is_default_locale = f.hidden_field name, :class => :sync_field = ff.text_area name, :rows => 5, :cols => 75, :class => "sync_field" - else = ff.text_area name, :rows => 5, :cols => 75 .clear .localization_buttons - Settings.i18n_locales.each_with_index do |locale, i| - is_default_locale = locale == default_locale %button{:type => :button, :"data-locale" => locale, :class => is_default_locale ? :active : nil}= locale
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
releaf-0.1.2 | app/views/releaf/base/_edit.field_type_textarea_i18n.html.haml |
releaf-0.1.1 | app/views/releaf/base/_edit.field.type_textarea_i18n.haml |