activeadmin-localize 0.1.1 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 93a887afdea40530f00d316e271a0912f5b57a691c3226e85c83a2b6962f1fbb
|
|
4
|
+
data.tar.gz: db4a26df90d8b73e30f658e5190cd35ab02576ea9bf8d316de6074d2528b272a
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 230cb4496f0cc339025d5866a550e88ba8ce7136dba2ffcf614714aa5a95caadcac725cabdff5000ff8e0f10acea72bc6d26a1484e3b130803b9623e0bdf11c2
|
|
7
|
+
data.tar.gz: 18034418327ae0778c9f2a436f50fa9cfe85b3d0ba73a98a941b15d57ce36ff55d93da48c436993b92013d01076ec76fb5787a1cf4f9913d17376aa7efd3399b
|
|
@@ -12,27 +12,27 @@ module ActiveAdmin
|
|
|
12
12
|
if options[:class]
|
|
13
13
|
classes << options[:class]
|
|
14
14
|
elsif title.present?
|
|
15
|
-
classes << "row-#{
|
|
15
|
+
classes << "row-#{title.to_s.parameterize(separator: "_")}"
|
|
16
16
|
end
|
|
17
17
|
options[:class] = classes.join(' ')
|
|
18
18
|
|
|
19
19
|
_locales.each_with_index do |locale, index|
|
|
20
|
-
@table << tr do
|
|
20
|
+
@table << tr(options) do
|
|
21
21
|
if index == 0
|
|
22
22
|
th :rowspan => _locales.length do
|
|
23
23
|
header_content_for(title)
|
|
24
24
|
end
|
|
25
25
|
end
|
|
26
26
|
@collection.each do |record|
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
).html_safe
|
|
27
|
+
data = nil
|
|
28
|
+
I18n.with_locale locale do
|
|
29
|
+
data = content_tag :div do
|
|
30
|
+
(image_tag("activeadmin-localize/#{locale.to_s}.svg", alt: locale.to_s, title: locale.to_s, width: 20, height: 15) +
|
|
31
|
+
' ' +
|
|
32
|
+
CGI.escapeHTML(record.send(title))).html_safe
|
|
34
33
|
end
|
|
35
34
|
end
|
|
35
|
+
td data
|
|
36
36
|
end
|
|
37
37
|
end
|
|
38
38
|
end
|
metadata
CHANGED
|
@@ -1,29 +1,29 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: activeadmin-localize
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.2.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Gleb Tv
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date:
|
|
11
|
+
date: 2019-11-05 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: activeadmin
|
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
|
16
16
|
requirements:
|
|
17
|
-
- - "
|
|
17
|
+
- - "~>"
|
|
18
18
|
- !ruby/object:Gem::Version
|
|
19
|
-
version:
|
|
19
|
+
version: 2.4.0
|
|
20
20
|
type: :runtime
|
|
21
21
|
prerelease: false
|
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
|
23
23
|
requirements:
|
|
24
|
-
- - "
|
|
24
|
+
- - "~>"
|
|
25
25
|
- !ruby/object:Gem::Version
|
|
26
|
-
version:
|
|
26
|
+
version: 2.4.0
|
|
27
27
|
description: Easily edit localized fields in ActiveAdmin (all locales on one page)
|
|
28
28
|
email:
|
|
29
29
|
- glebtv@gmail.com
|
|
@@ -325,8 +325,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
325
325
|
- !ruby/object:Gem::Version
|
|
326
326
|
version: '0'
|
|
327
327
|
requirements: []
|
|
328
|
-
|
|
329
|
-
rubygems_version: 2.7.3
|
|
328
|
+
rubygems_version: 3.0.6
|
|
330
329
|
signing_key:
|
|
331
330
|
specification_version: 4
|
|
332
331
|
summary: Localized fields for active admin
|