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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 104537a529924bef3f9c708314a568c72d8c9f0b
4
- data.tar.gz: 4508e2afbe3804f117a654b23fc20b4f4fb37cae
3
+ metadata.gz: c6f343cf4b0217efa6c74b1a8f23628eb63be502
4
+ data.tar.gz: cf8bfc2e42dd4b8d0141749e9ee773db9d3b931d
5
5
  SHA512:
6
- metadata.gz: 63a6e793d7f8d857708a93036a7af5c57a2203598295a627aeae0ba3d8813b876e09434e3a1c4a71f20d5263b2056accbba8c39da2cb24d4dd093cf964ecbbb8
7
- data.tar.gz: b9001dcc1a7901b3d600b445089f585c12a2357945bc57e2475c2e317796ea60d04cc09c1953d2198963524816faf4dcf3cbd6b997565f8d4944964bbe185a0f
6
+ metadata.gz: 4a1693c1094bf5ca59997ea8f1df888e1ec5c83f00f17b8ab84d17b7761e05787c6157a8021142e0135f3a4341965ebc5c17db512b32174ce72ada6e71ad7f7f
7
+ data.tar.gz: '087f86d3e3ff99950faf1c9d3ca8a137add1195365a1b09f8018638f1800b6efc98b5c51f3a10c328d836e36f585165c6c268e6e795f36fc8faf56963b915e19'
@@ -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
@@ -1,5 +1,5 @@
1
1
  module Para
2
2
  module I18n
3
- VERSION = "0.2.1"
3
+ VERSION = "0.3.0"
4
4
  end
5
5
  end
data/lib/para/i18n.rb CHANGED
@@ -6,6 +6,7 @@ require 'para/i18n/fallbacks'
6
6
 
7
7
  require 'para/i18n/model'
8
8
  require 'para/i18n/resources_table'
9
+ require 'para/i18n/resources_buttons'
9
10
 
10
11
  require 'para/i18n/friendly_id'
11
12
 
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.2.1
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-03-18 00:00:00.000000000 Z
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