para-i18n 0.2.1 → 0.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/para/i18n/engine.rb +1 -0
- data/lib/para/i18n/resources_buttons.rb +16 -0
- data/lib/para/i18n/resources_table.rb +0 -11
- data/lib/para/i18n/version.rb +1 -1
- data/lib/para/i18n.rb +1 -0
- data/para-i18n.gemspec +2 -0
- metadata +17 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c6f343cf4b0217efa6c74b1a8f23628eb63be502
|
4
|
+
data.tar.gz: cf8bfc2e42dd4b8d0141749e9ee773db9d3b931d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4a1693c1094bf5ca59997ea8f1df888e1ec5c83f00f17b8ab84d17b7761e05787c6157a8021142e0135f3a4341965ebc5c17db512b32174ce72ada6e71ad7f7f
|
7
|
+
data.tar.gz: '087f86d3e3ff99950faf1c9d3ca8a137add1195365a1b09f8018638f1800b6efc98b5c51f3a10c328d836e36f585165c6c268e6e795f36fc8faf56963b915e19'
|
data/lib/para/i18n/engine.rb
CHANGED
@@ -27,6 +27,7 @@ module Para
|
|
27
27
|
initializer 'para.i18n.extend_para_resources_table' do
|
28
28
|
ActiveSupport.on_load(:action_view) do
|
29
29
|
::Para::Markup::ResourcesTable.send(:include, Para::I18n::ResourcesTable)
|
30
|
+
::Para::Markup::ResourcesButtons.send(:include, Para::I18n::ResourcesButtons)
|
30
31
|
end
|
31
32
|
end
|
32
33
|
|
@@ -0,0 +1,16 @@
|
|
1
|
+
module Para
|
2
|
+
module I18n
|
3
|
+
module ResourcesButtons
|
4
|
+
def translate_button(resource)
|
5
|
+
return unless resource.class.translates?
|
6
|
+
|
7
|
+
path = component.relation_path(resource, :translation, action: :edit)
|
8
|
+
options = { class: 'btn btn-info' }
|
9
|
+
|
10
|
+
view.link_to(path, options) do
|
11
|
+
content_tag(:i, '', class: 'fa fa-globe')
|
12
|
+
end
|
13
|
+
end
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
@@ -8,17 +8,6 @@ module Para
|
|
8
8
|
default_actions << :translate
|
9
9
|
default_actions << last_action
|
10
10
|
end
|
11
|
-
|
12
|
-
def translate_button(resource)
|
13
|
-
return unless resource.class.translates?
|
14
|
-
|
15
|
-
path = component.relation_path(resource, :translation, action: :edit)
|
16
|
-
options = { class: 'btn btn-info' }
|
17
|
-
|
18
|
-
view.link_to(path, options) do
|
19
|
-
content_tag(:i, '', class: 'fa fa-globe')
|
20
|
-
end
|
21
|
-
end
|
22
11
|
end
|
23
12
|
end
|
24
13
|
end
|
data/lib/para/i18n/version.rb
CHANGED
data/lib/para/i18n.rb
CHANGED
data/para-i18n.gemspec
CHANGED
@@ -19,6 +19,8 @@ Gem::Specification.new do |spec|
|
|
19
19
|
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
20
20
|
spec.require_paths = ["lib"]
|
21
21
|
|
22
|
+
spec.add_dependency "para", "~> 0.8"
|
23
|
+
|
22
24
|
spec.add_development_dependency "bundler", "~> 1.11"
|
23
25
|
spec.add_development_dependency "rake", "~> 10.0"
|
24
26
|
spec.add_development_dependency "rspec", "~> 3.0"
|
metadata
CHANGED
@@ -1,15 +1,29 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: para-i18n
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Valentin Ballestrino
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-
|
11
|
+
date: 2019-04-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: para
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - "~>"
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '0.8'
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - "~>"
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '0.8'
|
13
27
|
- !ruby/object:Gem::Dependency
|
14
28
|
name: bundler
|
15
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -88,6 +102,7 @@ files:
|
|
88
102
|
- lib/para/i18n/helpers/translations_helper.rb
|
89
103
|
- lib/para/i18n/i18n_input.rb
|
90
104
|
- lib/para/i18n/model.rb
|
105
|
+
- lib/para/i18n/resources_buttons.rb
|
91
106
|
- lib/para/i18n/resources_table.rb
|
92
107
|
- lib/para/i18n/version.rb
|
93
108
|
- para-i18n.gemspec
|