activeadmin-mongoid-localize 0.0.1 → 0.0.2

Sign up to get free protection for your applications and to get access to all the features.
@@ -42,8 +42,15 @@ module Formtastic
42
42
  ::I18n.available_locales.each do |locale|
43
43
  args[:value] = (t.nil? || t[locale.to_s].nil?) ? '' : t[locale.to_s]
44
44
  # locale.to_s
45
- args[:label] = CGI.escapeHTML(self.object.class.human_attribute_name(name)) + " #{template.image_tag "aml/flags/#{locale.to_s}.png", alt: locale.to_s, title: locale.to_s}"
46
- args[:label] = args[:label].html_safe
45
+
46
+ label = CGI.escapeHTML(self.object.class.human_attribute_name(name)) + " #{template.image_tag "aml/flags/#{locale.to_s}.png", alt: locale.to_s, title: locale.to_s}"
47
+ if args[:as] == :ckeditor
48
+ form_buffers.last << "<h3 style='margin: 10px 0px 0px 10px;'>#{label}</h3>".html_safe
49
+ args[:label] = false
50
+ else
51
+ args[:label] = label.html_safe
52
+ end
53
+
47
54
  form_buffers.last << lf.input(locale, args)
48
55
  form_buffers.last
49
56
  end
@@ -1,7 +1,7 @@
1
1
  module ActiveAdmin
2
2
  module Mongoid
3
3
  module Localize
4
- VERSION = "0.0.1"
4
+ VERSION = "0.0.2"
5
5
  end
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: activeadmin-mongoid-localize
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: