%div{class: ('tab-content' if locales.count > 1)} -locales.each do |locale| .tab-pane{class: ["#{locale}_tab", locale == I18n.locale.to_s ? 'active' : nil].compact.join(' ')} -attributes.each do |input_type, attribute_names| -attribute_names = [attribute_names] unless attribute_names.is_a?(Array) -attribute_names.each do |attribute_name| %div{class: "localized_#{attribute_name}"} -if input_type.to_s == 'cktext_area' %br =f.cktext_area "#{attribute_name}_#{locale}", ckeditor: {language: I18n.locale} =f.error "#{attribute_name}_#{locale}" -elsif input_type.to_s == 'text_area' =f.input "#{attribute_name}_#{locale}", as: :text, input_html: {rows: 4}, label: t("attributes.#{attribute_name}") -else =f.send(input_type.to_sym, "#{attribute_name}_#{locale}".to_sym, label: t("attributes.#{attribute_name}"))