globalize3-inputs-bootstrap 0.1 → 0.1.1
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.
- data/lib/active_admin/globalize_attributes_table.rb +21 -20
- data/lib/version.rb +1 -1
- metadata +2 -2
@@ -1,35 +1,36 @@
|
|
1
1
|
module ActiveAdmin
|
2
2
|
module Views
|
3
|
-
|
4
|
-
|
3
|
+
if defined?(::ActiveAdmin::Views::AttributesTable)
|
4
|
+
class GlobalizeAttributesTable < ActiveAdmin::Views::AttributesTable
|
5
|
+
builder_method :globalize_attributes_table_for
|
5
6
|
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
7
|
+
def row(attr, &block)
|
8
|
+
I18n.available_locales.each_with_index do |locale, index|
|
9
|
+
@table << tr do
|
10
|
+
if index == 0
|
11
|
+
th :rowspan => I18n.available_locales.length do
|
12
|
+
header_content_for(attr)
|
13
|
+
end
|
12
14
|
end
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
15
|
+
td do
|
16
|
+
I18n.with_locale locale do
|
17
|
+
content_for(block || attr)
|
18
|
+
end
|
17
19
|
end
|
18
20
|
end
|
19
21
|
end
|
20
22
|
end
|
21
|
-
end
|
22
23
|
|
23
|
-
|
24
|
+
protected
|
24
25
|
|
25
|
-
|
26
|
-
|
27
|
-
|
26
|
+
def default_id_for_prefix
|
27
|
+
'attributes_table'
|
28
|
+
end
|
28
29
|
|
29
|
-
|
30
|
-
|
30
|
+
def default_class_name
|
31
|
+
'attributes_table'
|
32
|
+
end
|
31
33
|
end
|
32
|
-
|
33
34
|
end
|
34
35
|
end
|
35
36
|
end
|
data/lib/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: globalize3-inputs-bootstrap
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 0.1.1
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-11-
|
12
|
+
date: 2012-11-03 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: globalize3
|