rails_admin_boolean_toggle 1.0.0 → 1.1.0
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
ZDBmZDJkYTQ3MzQzMmE3MjFmNjAxNWFjYTA1MmE1YzcxZGZkZDc2Mg==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
ZTc4Y2E3MzNhYzg5MDc0ODcxZjljYTQ1NjJhZDJiZDliZGY0ZjRlOA==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
ZDU1MWFiZDg3ZWJjMjM3YzZmMzFiMzkyMTliNzQwY2Y5N2NlZTdmMjVlMzNl
|
10
|
+
ZTkxOWU0YmZjZjA5YzI3Y2I1MzAwZGE0NWU2NGZkMmRlMTVkMDQ3OGMwYTg0
|
11
|
+
NWU0ZjE0ODE4ZDcwZWZiYjQ1ZGM4ZjNlN2M1OGUyZDk3NTI2OGQ=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
ZTUwNjZmNGQwYjJhOWQ5NjUyZmQxZDhmNGI2ZGJlNTgwNDk1YTU3ZjZmMzQx
|
14
|
+
MThkNWI3ZTliZDYwZDE0ZTFiZTcwMjczMTM3MjE1OTExZWQwOTcyOWUwZWM1
|
15
|
+
ZTM1ZjJkMDk0MmI0ZWI0ODE0NWI2N2Y1ODY4MDA1ZTBiNjYyM2M=
|
@@ -18,16 +18,33 @@ module RailsAdminBooleanToggle
|
|
18
18
|
)
|
19
19
|
end
|
20
20
|
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
21
|
+
def out
|
22
|
+
if read_only?
|
23
|
+
return case value
|
24
|
+
when nil
|
25
|
+
I18n.t('admin.toggle.pretty_undef')
|
26
|
+
when false
|
27
|
+
I18n.t('admin.toggle.pretty_no')
|
28
|
+
when true
|
29
|
+
I18n.t('admin.toggle.pretty_yes')
|
30
|
+
else
|
31
|
+
value
|
32
|
+
end
|
33
|
+
end
|
34
|
+
|
35
|
+
case value
|
36
|
+
when nil
|
37
|
+
g_link('✘', 0, 'badge-important') + g_link('✓', 1, 'badge-success')
|
38
|
+
when false
|
39
|
+
g_link('✘', 1, 'badge-important')
|
40
|
+
when true
|
41
|
+
g_link('✓', 0, 'badge-success')
|
42
|
+
else
|
43
|
+
%{<span class="badge">-</span>}
|
44
|
+
end
|
45
|
+
end
|
46
|
+
|
47
|
+
out.html_safe
|
31
48
|
end
|
32
49
|
|
33
50
|
register_instance_option :export_value do
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rails_admin_boolean_toggle
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Sergey Malykh
|
@@ -50,6 +50,8 @@ files:
|
|
50
50
|
- LICENSE.txt
|
51
51
|
- README.md
|
52
52
|
- Rakefile
|
53
|
+
- config/locales/en.rails_admin_boolean_toggle.yml
|
54
|
+
- config/locales/ru.rails_admin_boolean_toggle.yml
|
53
55
|
- lib/rails_admin_boolean_toggle.rb
|
54
56
|
- lib/rails_admin_boolean_toggle/engine.rb
|
55
57
|
- lib/rails_admin_boolean_toggle/version.rb
|