effective_datatables 4.25.2 → 4.26.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
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e6af5d5e2542f1b4b587ad472f4be837fe81cf57cad38edf272986ba358710ae
|
4
|
+
data.tar.gz: ada5f3e65dd9c40eedf6acda70db0e5955dc0b693fb1604392a1fbd5e7e98bba
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6833350b97bb37061602f756c291b7fb30af237b0895952f6ac41ac4e4b565e03d7ce1ab5503e1ef4adc2fca3574edb325b81d5d3a9818515be2b039f3d580f0
|
7
|
+
data.tar.gz: '0859ffbe2c11c23c58d2743d76bd99f23af3c67d28f3b888ab3ecd9f68e0a9b9c181b37ad7e93b406e7bde949c04566dd4b7d0bf7b1a183cb6fb0df7e13dbb22'
|
@@ -76,11 +76,21 @@ module Effective
|
|
76
76
|
end
|
77
77
|
)
|
78
78
|
|
79
|
-
if csv && (opts[:format] || opts[:partial])
|
80
|
-
formatted
|
81
|
-
|
82
|
-
formatted.gsub!("
|
83
|
-
formatted.gsub!("
|
79
|
+
if csv && (opts[:format] || opts[:partial]) && !formatted.frozen?
|
80
|
+
formatted.gsub!("<br>\n", ' ')
|
81
|
+
formatted.gsub!("<br> ", ' ')
|
82
|
+
formatted.gsub!("<br>", ' ')
|
83
|
+
formatted.gsub!("<br/>", ' ')
|
84
|
+
formatted.gsub!("<br />", ' ')
|
85
|
+
formatted.gsub!("\n\n", ' ')
|
86
|
+
formatted.gsub!("\n", ' ') unless formatted.include?('<')
|
87
|
+
|
88
|
+
if formatted.include?('<')
|
89
|
+
formatted.gsub!("\n", '')
|
90
|
+
formatted.gsub!("<div class='col-resource_item'>", ' ')
|
91
|
+
|
92
|
+
formatted = view.strip_tags(formatted).strip
|
93
|
+
end
|
84
94
|
end
|
85
95
|
|
86
96
|
row[index] = formatted
|
@@ -124,7 +134,7 @@ module Effective
|
|
124
134
|
when :effective_obfuscation
|
125
135
|
value.to_s
|
126
136
|
when :effective_roles
|
127
|
-
value.join(', ')
|
137
|
+
csv ? value.join(', ') : view.roles_badges(value)
|
128
138
|
when :email
|
129
139
|
csv ? value : view.mail_to(value)
|
130
140
|
when :integer
|
@@ -214,6 +224,7 @@ module Effective
|
|
214
224
|
resource_name: resource_name,
|
215
225
|
resource_to_s: resource_to_s,
|
216
226
|
effective_resource: associated_resource,
|
227
|
+
format_each: opts[:format_each],
|
217
228
|
show_action: false,
|
218
229
|
edit_action: false
|
219
230
|
}
|
@@ -1,5 +1,7 @@
|
|
1
1
|
- Array(local_assigns[:resource_name] ? resource.public_send(resource_name) : resource).each do |resource|
|
2
|
-
- resource_to_s = (
|
2
|
+
- resource_to_s = (resource.public_send(resource_to_s) if local_assigns[:resource_to_s])
|
3
|
+
- resource_to_s ||= (instance_exec(resource, datatable, &format_each).html_safe if local_assigns[:format_each])
|
4
|
+
- resource_to_s ||= resource.to_s
|
3
5
|
|
4
6
|
- if resource_to_s.present?
|
5
7
|
.col-resource_item
|
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: 4.
|
4
|
+
version: 4.26.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: 2024-
|
11
|
+
date: 2024-04-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|