active_list 6.2.0 → 6.2.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.
- checksums.yaml +7 -0
- data/lib/active_list.rb +0 -1
- data/lib/active_list/definition/action_column.rb +5 -5
- data/lib/active_list/definition/table.rb +1 -1
- data/lib/active_list/rails/engine.rb +1 -3
- data/lib/active_list/version.rb +1 -1
- data/test/dummy/Gemfile.lock +10 -10
- metadata +19 -33
- data/locales/eng.yml +0 -26
- data/locales/fra.yml +0 -26
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 63c30efd24bc0da00cb562eae544b9c789675e36
|
4
|
+
data.tar.gz: bd68dc84832acfd12a000b985a869e719844623f
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: a8798375c0ef7aa377d987e4e594b4efe1de1cd5e230fbb194f5a2c34c3cce1ac2baf8809810baca6023f2dced4da150b09501689b0249018f8ad0ce3027696a
|
7
|
+
data.tar.gz: e63de4626bc4ec92a8965142a8c139d16d6cf301500e9b2f9ed16fe8b00f6841f4ea438553c1f947f04371e3d29d1fba73f1c7946047fd395159003864cab96f
|
data/lib/active_list.rb
CHANGED
@@ -96,21 +96,21 @@ module ActiveList
|
|
96
96
|
for expected, url in @options[:actions]
|
97
97
|
cases << record+"."+@name.to_s+" == " + expected.inspect + "\nlink_to(content_tag(:i) + h(#{url[:action].inspect}.t(scope: 'rest.actions'))"+
|
98
98
|
", {"+(url[:controller] ? 'controller: :'+url[:controller].to_s+', ' : '')+"action: '"+url[:action].to_s+"', id: "+record+".id"+format+"}"+
|
99
|
-
", {:
|
99
|
+
", {class: '#{@name}'"+link_options+"}"+
|
100
100
|
")\n"
|
101
101
|
end
|
102
102
|
|
103
103
|
code = "if "+cases.join("elsif ")+"end"
|
104
104
|
else
|
105
105
|
url = @options[:url] ||= {}
|
106
|
-
url[:controller] ||= (@options[:controller] || "RECORD.class.name.tableize".c)
|
106
|
+
url[:controller] ||= (@options[:controller] || "RECORD.class.name.tableize".c)
|
107
107
|
url[:action] ||= @name.to_s
|
108
108
|
url[:id] ||= "RECORD.id".c
|
109
109
|
url[:id] = "RECORD.id".c if url[:id] == ID_PLACEHOLDER
|
110
110
|
url.delete_if{|k, v| v.nil?}
|
111
|
-
url = "{" + url.collect{|k, v| "#{k}: " + urlify(v, record)}.join(", ")+format+"}"
|
112
|
-
code = "{class: '#{@name}'" + link_options+"}"
|
113
|
-
code = "link_to(content_tag(:i) + h(' ' +
|
111
|
+
url = "{" + url.collect{|k, v| "#{k}: " + urlify(v, record)}.join(", ") + format + "}"
|
112
|
+
code = "{class: '#{@name}'" + link_options + "}"
|
113
|
+
code = "link_to(content_tag(:i) + h(' ' + :#{action}.t(scope: 'rest.actions')), " + url + ", " + code + ")"
|
114
114
|
end
|
115
115
|
if @options[:if]
|
116
116
|
code = "if " + recordify!(@options[:if], record) + "\n" + code.dig + "end"
|
@@ -123,7 +123,7 @@ module ActiveList
|
|
123
123
|
if @model.reflect_on_association(name)
|
124
124
|
options[:through] ||= name
|
125
125
|
add :association, name, options
|
126
|
-
elsif @model.reflect_on_association(options[:through])
|
126
|
+
elsif options[:through] and @model.reflect_on_association(options[:through])
|
127
127
|
options[:label_method] ||= name
|
128
128
|
add :association, name, options
|
129
129
|
else
|
@@ -1,15 +1,13 @@
|
|
1
1
|
module ActiveList
|
2
2
|
module Rails
|
3
|
-
|
4
3
|
class Engine < ::Rails::Engine
|
5
4
|
engine_name "active_list"
|
6
5
|
initializer "active_list.integrate_methods" do |app|
|
7
6
|
::ActionController::Base.send(:include, ActiveList::Rails::Integration::ActionController)
|
8
7
|
::ActionView::Base.send(:include, ActiveList::Rails::Integration::ViewsHelper)
|
9
|
-
files = Dir[File.join(File.dirname(__FILE__), "..", "..", "..", "locales", "*.yml")]
|
8
|
+
files = Dir[File.join(File.dirname(__FILE__), "..", "..", "..", "config", "locales", "*.yml")]
|
10
9
|
::I18n.load_path.concat(files)
|
11
10
|
end
|
12
11
|
end
|
13
|
-
|
14
12
|
end
|
15
13
|
end
|
data/lib/active_list/version.rb
CHANGED
data/test/dummy/Gemfile.lock
CHANGED
@@ -1,10 +1,10 @@
|
|
1
1
|
PATH
|
2
2
|
remote: ../..
|
3
3
|
specs:
|
4
|
-
active_list (6.
|
4
|
+
active_list (6.2.0)
|
5
5
|
code_string (>= 0.0.0)
|
6
6
|
i18n-complements
|
7
|
-
rails (>= 3.2, <
|
7
|
+
rails (>= 3.2, < 5)
|
8
8
|
rubyzip (>= 1.0)
|
9
9
|
|
10
10
|
GEM
|
@@ -48,13 +48,13 @@ GEM
|
|
48
48
|
execjs
|
49
49
|
coffee-script-source (1.7.0)
|
50
50
|
erubis (2.7.0)
|
51
|
-
execjs (2.
|
51
|
+
execjs (2.2.1)
|
52
52
|
hike (1.2.3)
|
53
53
|
i18n (0.6.9)
|
54
54
|
i18n-complements (0.0.10)
|
55
55
|
i18n (>= 0.6)
|
56
56
|
journey (1.0.4)
|
57
|
-
jquery-rails (3.1.
|
57
|
+
jquery-rails (3.1.1)
|
58
58
|
railties (>= 3.0, < 5.0)
|
59
59
|
thor (>= 0.14, < 2.0)
|
60
60
|
json (1.8.1)
|
@@ -63,8 +63,8 @@ GEM
|
|
63
63
|
mime-types (~> 1.16)
|
64
64
|
treetop (~> 1.4.8)
|
65
65
|
mime-types (1.25.1)
|
66
|
-
multi_json (1.
|
67
|
-
polyglot (0.3.
|
66
|
+
multi_json (1.10.1)
|
67
|
+
polyglot (0.3.5)
|
68
68
|
rack (1.4.5)
|
69
69
|
rack-cache (1.2)
|
70
70
|
rack (>= 0.4)
|
@@ -87,12 +87,12 @@ GEM
|
|
87
87
|
rake (>= 0.8.7)
|
88
88
|
rdoc (~> 3.4)
|
89
89
|
thor (>= 0.14.6, < 2.0)
|
90
|
-
rake (10.3.
|
90
|
+
rake (10.3.2)
|
91
91
|
rdoc (3.12.2)
|
92
92
|
json (~> 1.4)
|
93
93
|
ref (1.0.5)
|
94
|
-
rubyzip (1.1.
|
95
|
-
sass (3.3.
|
94
|
+
rubyzip (1.1.6)
|
95
|
+
sass (3.3.9)
|
96
96
|
sass-rails (3.2.6)
|
97
97
|
railties (~> 3.2.0)
|
98
98
|
sass (>= 3.1.10)
|
@@ -112,7 +112,7 @@ GEM
|
|
112
112
|
polyglot
|
113
113
|
polyglot (>= 0.3.1)
|
114
114
|
tzinfo (0.3.39)
|
115
|
-
uglifier (2.5.
|
115
|
+
uglifier (2.5.1)
|
116
116
|
execjs (>= 0.3.0)
|
117
117
|
json (>= 1.8.0)
|
118
118
|
|
metadata
CHANGED
@@ -1,100 +1,89 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: active_list
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 6.2.
|
5
|
-
prerelease:
|
4
|
+
version: 6.2.1
|
6
5
|
platform: ruby
|
7
6
|
authors:
|
8
7
|
- Brice Texier
|
9
8
|
autorequire:
|
10
9
|
bindir: bin
|
11
10
|
cert_chain: []
|
12
|
-
date: 2014-
|
11
|
+
date: 2014-09-16 00:00:00.000000000 Z
|
13
12
|
dependencies:
|
14
13
|
- !ruby/object:Gem::Dependency
|
15
14
|
name: rails
|
16
15
|
requirement: !ruby/object:Gem::Requirement
|
17
|
-
none: false
|
18
16
|
requirements:
|
19
|
-
- -
|
17
|
+
- - ">="
|
20
18
|
- !ruby/object:Gem::Version
|
21
19
|
version: '3.2'
|
22
|
-
- - <
|
20
|
+
- - "<"
|
23
21
|
- !ruby/object:Gem::Version
|
24
22
|
version: '5'
|
25
23
|
type: :runtime
|
26
24
|
prerelease: false
|
27
25
|
version_requirements: !ruby/object:Gem::Requirement
|
28
|
-
none: false
|
29
26
|
requirements:
|
30
|
-
- -
|
27
|
+
- - ">="
|
31
28
|
- !ruby/object:Gem::Version
|
32
29
|
version: '3.2'
|
33
|
-
- - <
|
30
|
+
- - "<"
|
34
31
|
- !ruby/object:Gem::Version
|
35
32
|
version: '5'
|
36
33
|
- !ruby/object:Gem::Dependency
|
37
34
|
name: code_string
|
38
35
|
requirement: !ruby/object:Gem::Requirement
|
39
|
-
none: false
|
40
36
|
requirements:
|
41
|
-
- -
|
37
|
+
- - ">="
|
42
38
|
- !ruby/object:Gem::Version
|
43
39
|
version: 0.0.0
|
44
40
|
type: :runtime
|
45
41
|
prerelease: false
|
46
42
|
version_requirements: !ruby/object:Gem::Requirement
|
47
|
-
none: false
|
48
43
|
requirements:
|
49
|
-
- -
|
44
|
+
- - ">="
|
50
45
|
- !ruby/object:Gem::Version
|
51
46
|
version: 0.0.0
|
52
47
|
- !ruby/object:Gem::Dependency
|
53
48
|
name: rubyzip
|
54
49
|
requirement: !ruby/object:Gem::Requirement
|
55
|
-
none: false
|
56
50
|
requirements:
|
57
|
-
- -
|
51
|
+
- - ">="
|
58
52
|
- !ruby/object:Gem::Version
|
59
53
|
version: '1.0'
|
60
54
|
type: :runtime
|
61
55
|
prerelease: false
|
62
56
|
version_requirements: !ruby/object:Gem::Requirement
|
63
|
-
none: false
|
64
57
|
requirements:
|
65
|
-
- -
|
58
|
+
- - ">="
|
66
59
|
- !ruby/object:Gem::Version
|
67
60
|
version: '1.0'
|
68
61
|
- !ruby/object:Gem::Dependency
|
69
62
|
name: i18n-complements
|
70
63
|
requirement: !ruby/object:Gem::Requirement
|
71
|
-
none: false
|
72
64
|
requirements:
|
73
|
-
- -
|
65
|
+
- - ">="
|
74
66
|
- !ruby/object:Gem::Version
|
75
67
|
version: '0'
|
76
68
|
type: :runtime
|
77
69
|
prerelease: false
|
78
70
|
version_requirements: !ruby/object:Gem::Requirement
|
79
|
-
none: false
|
80
71
|
requirements:
|
81
|
-
- -
|
72
|
+
- - ">="
|
82
73
|
- !ruby/object:Gem::Version
|
83
74
|
version: '0'
|
84
75
|
- !ruby/object:Gem::Dependency
|
85
76
|
name: sqlite3
|
86
77
|
requirement: !ruby/object:Gem::Requirement
|
87
|
-
none: false
|
88
78
|
requirements:
|
89
|
-
- -
|
79
|
+
- - ">="
|
90
80
|
- !ruby/object:Gem::Version
|
91
81
|
version: '0'
|
92
82
|
type: :development
|
93
83
|
prerelease: false
|
94
84
|
version_requirements: !ruby/object:Gem::Requirement
|
95
|
-
none: false
|
96
85
|
requirements:
|
97
|
-
- -
|
86
|
+
- - ">="
|
98
87
|
- !ruby/object:Gem::Version
|
99
88
|
version: '0'
|
100
89
|
description: Generates action methods to provide clean tables.
|
@@ -140,8 +129,6 @@ files:
|
|
140
129
|
- lib/active_list/renderers/abstract_renderer.rb
|
141
130
|
- lib/active_list/renderers/simple_renderer.rb
|
142
131
|
- lib/active_list/version.rb
|
143
|
-
- locales/eng.yml
|
144
|
-
- locales/fra.yml
|
145
132
|
- test/active_list_test.rb
|
146
133
|
- test/code_generation_test.rb
|
147
134
|
- test/dummy/.gitignore
|
@@ -206,27 +193,26 @@ files:
|
|
206
193
|
homepage: http://github.com/ekylibre/active_list
|
207
194
|
licenses:
|
208
195
|
- MIT
|
196
|
+
metadata: {}
|
209
197
|
post_install_message:
|
210
198
|
rdoc_options: []
|
211
199
|
require_paths:
|
212
200
|
- lib
|
213
201
|
required_ruby_version: !ruby/object:Gem::Requirement
|
214
|
-
none: false
|
215
202
|
requirements:
|
216
|
-
- -
|
203
|
+
- - ">="
|
217
204
|
- !ruby/object:Gem::Version
|
218
205
|
version: 1.9.3
|
219
206
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
220
|
-
none: false
|
221
207
|
requirements:
|
222
|
-
- -
|
208
|
+
- - ">="
|
223
209
|
- !ruby/object:Gem::Version
|
224
210
|
version: '0'
|
225
211
|
requirements: []
|
226
212
|
rubyforge_project:
|
227
|
-
rubygems_version:
|
213
|
+
rubygems_version: 2.2.2
|
228
214
|
signing_key:
|
229
|
-
specification_version:
|
215
|
+
specification_version: 4
|
230
216
|
summary: Simple interactive tables for Rails app
|
231
217
|
test_files:
|
232
218
|
- test/active_list_test.rb
|
data/locales/eng.yml
DELETED
@@ -1,26 +0,0 @@
|
|
1
|
-
eng: &eng
|
2
|
-
list:
|
3
|
-
columns: "Columns"
|
4
|
-
export:
|
5
|
-
false_value: "FALSE"
|
6
|
-
formats:
|
7
|
-
csv: "CSV"
|
8
|
-
ods: "Spreadsheet ODF"
|
9
|
-
xcsv: "Excel CSV"
|
10
|
-
title: "Export"
|
11
|
-
true_value: "TRUE"
|
12
|
-
export_as: "Export as %{exported}..."
|
13
|
-
items_per_page: "Items per page"
|
14
|
-
menu: "Menu"
|
15
|
-
no_records: "No records"
|
16
|
-
pagination:
|
17
|
-
first: "First page"
|
18
|
-
last: "Last page"
|
19
|
-
next: "Next page"
|
20
|
-
previous: "Previous page"
|
21
|
-
showing_x_to_y_of_total: "Showing %{x} to %{y} of %{total}"
|
22
|
-
x_to_y_of_total: "%{x}-%{y} of %{total}"
|
23
|
-
x_per_page:
|
24
|
-
one: "%{count} per page"
|
25
|
-
other: "%{count} per page"
|
26
|
-
en: *eng
|
data/locales/fra.yml
DELETED
@@ -1,26 +0,0 @@
|
|
1
|
-
fra: &fra
|
2
|
-
list:
|
3
|
-
columns: "Colonnes"
|
4
|
-
export:
|
5
|
-
false_value: "FAUX"
|
6
|
-
formats:
|
7
|
-
csv: "CSV"
|
8
|
-
ods: "Classeur ODF"
|
9
|
-
xcsv: "CSV Excel"
|
10
|
-
title: "Exporter"
|
11
|
-
true_value: "VRAI"
|
12
|
-
export_as: "Exporter en %{exported}"
|
13
|
-
items_per_page: "Éléments par page"
|
14
|
-
menu: "Menu"
|
15
|
-
no_records: "Aucun enregistrement"
|
16
|
-
pagination:
|
17
|
-
first: "Début"
|
18
|
-
last: "Fin"
|
19
|
-
next: "Suivant"
|
20
|
-
previous: "Précédent"
|
21
|
-
showing_x_to_y_of_total: "Enregistrements %{x} à %{y} sur %{total}"
|
22
|
-
x_to_y_of_total: "%{x}-%{y} sur %{total}"
|
23
|
-
x_per_page:
|
24
|
-
one: "%{count} par page"
|
25
|
-
other: "%{count} par page"
|
26
|
-
fr: *fra
|