effective_datatables 3.3.14 → 3.4.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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 619baaf788e1e0e7522bc2327fef27a997dba06e
|
4
|
+
data.tar.gz: 61e406f431079e6d251fd4d9ad55a76fd5a77da0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: fac7b347fac1755ca7a49780d038c561b7588bcd8955192cdd7af37f1ff29549758fbfcc4d92d35fc5c4b7b77e1f750d16c048e35317ffbbc32e960e82742306
|
7
|
+
data.tar.gz: 3683794e47ae401d6313213bd4ccad4d139fd250f8667cf17e71664853b28ed0756e071914e17f7005b27b516558a0215689e891daa33193ba7f3844b34f2512
|
@@ -18,7 +18,7 @@ module EffectiveDatatablesHelper
|
|
18
18
|
|
19
19
|
effective_datatable_params = {
|
20
20
|
id: datatable.to_param,
|
21
|
-
class: Array(datatable.table_html_class).join(' '),
|
21
|
+
class: ('effective-datatable ' + Array(datatable.table_html_class).join(' ')),
|
22
22
|
data: {
|
23
23
|
'effective-form-inputs' => defined?(EffectiveFormInputs),
|
24
24
|
'bulk-actions' => datatable_bulk_actions(datatable),
|
@@ -59,6 +59,26 @@ module EffectiveDatatablesHelper
|
|
59
59
|
end
|
60
60
|
end
|
61
61
|
|
62
|
+
def render_simple_datatable(datatable)
|
63
|
+
raise 'expected datatable to be present' unless datatable
|
64
|
+
|
65
|
+
datatable.view ||= self
|
66
|
+
|
67
|
+
unless EffectiveDatatables.authorized?(controller, :index, datatable.collection_class)
|
68
|
+
return content_tag(:p, "You are not authorized to view this datatable. (cannot :index, #{datatable.collection_class})")
|
69
|
+
end
|
70
|
+
|
71
|
+
effective_datatable_params = {
|
72
|
+
id: datatable.to_param,
|
73
|
+
class: Array(datatable.table_html_class).join(' '),
|
74
|
+
data: {}
|
75
|
+
}
|
76
|
+
|
77
|
+
render(partial: 'effective/datatables/datatable',
|
78
|
+
locals: { datatable: datatable, effective_datatable_params: effective_datatable_params }
|
79
|
+
)
|
80
|
+
end
|
81
|
+
|
62
82
|
def render_datatable_filters(datatable)
|
63
83
|
raise 'expected datatable to be present' unless datatable
|
64
84
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: effective_datatables
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.
|
4
|
+
version: 3.4.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Code and Effect
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-
|
11
|
+
date: 2018-02-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|