effective_logging 1.2.2 → 1.2.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/models/effective/datatables/logs.rb +26 -25
- data/lib/effective_logging/version.rb +1 -1
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 00722263c1f4a6f4354ed1367ad85b41e2b2ad83
|
4
|
+
data.tar.gz: 3f2430009e0340a134893597ab3b0aea685ff3e4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 573cf13ff1e36531d1c32faefb106f8806aa9c16dbe8b72a889e75ab31c51bac255521db6ed274a98ac77a725fb3a9bba215df169b55976d23b1d2a7c7abffe7
|
7
|
+
data.tar.gz: 4cf439ffeb22d41a96061813df04826d68b2c20a4016f69507eb9f8e0782a56bd31cf7fb255d2fdc5f475abfe7ceabf32e29271c0770419b4ab784d9d4395e03
|
@@ -4,41 +4,42 @@ if defined?(EffectiveDatatables)
|
|
4
4
|
class Logs < Effective::Datatable
|
5
5
|
include EffectiveLoggingHelper
|
6
6
|
|
7
|
-
|
7
|
+
datatable do
|
8
|
+
default_order :created_at, :desc
|
8
9
|
|
9
|
-
|
10
|
+
table_column :created_at
|
11
|
+
table_column :id, visible: false
|
10
12
|
|
11
|
-
|
13
|
+
table_column :parent_id, visible: false
|
14
|
+
table_column :user, :if => proc { attributes[:user_id].blank? }
|
12
15
|
|
13
|
-
|
14
|
-
table_column :user, :if => proc { attributes[:user_id].blank? }
|
16
|
+
table_column :status, filter: { type: :select, values: EffectiveLogging.statuses }
|
15
17
|
|
16
|
-
|
18
|
+
table_column :message, width: '50%', sortable: false
|
19
|
+
table_column :logs_count, visible: false
|
17
20
|
|
18
|
-
|
19
|
-
|
21
|
+
table_column :details, visible: false, sortable: false do |log|
|
22
|
+
log.details.delete(:email)
|
23
|
+
tableize_hash(log.details, th: true, sub_th: false, width: '100%')
|
24
|
+
end
|
20
25
|
|
21
|
-
|
22
|
-
log.details.delete(:email)
|
23
|
-
tableize_hash(log.details, th: true, sub_th: false, width: '100%')
|
24
|
-
end
|
26
|
+
table_column :updated_at, visible: false
|
25
27
|
|
26
|
-
|
28
|
+
table_column :actions, sortable: false, filter: false do |log|
|
29
|
+
show_path =
|
30
|
+
if datatables_active_admin_path?
|
31
|
+
admin_effective_log_path(log)
|
32
|
+
elsif datatables_admin_path?
|
33
|
+
effective_logging.admin_log_path(log)
|
34
|
+
else
|
35
|
+
effective_logging.log_path(log)
|
36
|
+
end
|
27
37
|
|
28
|
-
|
29
|
-
|
30
|
-
if datatables_active_admin_path?
|
31
|
-
admin_effective_log_path(log)
|
32
|
-
elsif datatables_admin_path?
|
33
|
-
effective_logging.admin_log_path(log)
|
38
|
+
if log.logs_count.to_i > 0
|
39
|
+
link_to "View (#{log.logs_count} more)".html_safe, show_path
|
34
40
|
else
|
35
|
-
|
41
|
+
link_to 'View', show_path
|
36
42
|
end
|
37
|
-
|
38
|
-
if log.logs_count.to_i > 0
|
39
|
-
link_to "View (#{log.logs_count} more)".html_safe, show_path
|
40
|
-
else
|
41
|
-
link_to 'View', show_path
|
42
43
|
end
|
43
44
|
end
|
44
45
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: effective_logging
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.2.
|
4
|
+
version: 1.2.3
|
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: 2015-
|
11
|
+
date: 2015-07-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -30,14 +30,14 @@ dependencies:
|
|
30
30
|
requirements:
|
31
31
|
- - ">="
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version:
|
33
|
+
version: 2.0.0
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
38
|
- - ">="
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version:
|
40
|
+
version: 2.0.0
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: coffee-rails
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|