effective_logging 3.5.0 → 3.5.2

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: b21edfec95b3f6878025e153f44ebb09bc798ac01d3a117aecfc85b341586078
4
- data.tar.gz: 8c14b70a56c35b492b19d00fae30b786d871cd3ac95c7c61a34ca133b4533f9d
3
+ metadata.gz: b81776db6f7702a3fedb2be7363c9a1ffd97ccc5656a3f5dd57c1c35801c7150
4
+ data.tar.gz: 6446b273934c9c481bb537e68381c61bb4751c46433b726f0666f5cc5fbbd1ee
5
5
  SHA512:
6
- metadata.gz: 82a1e987a4642e855ab022c2b81a258fdcf95ad55edea9698e7f2f3766773c0b9f78f8b932c965e64df1c4c8cb6821600dee97063dcfd65c2785f75059e01c52
7
- data.tar.gz: 33699371abdac488fc0953ba85ab7117076a2b94cb07ce7c7744d86ab90b7d389d1df6a27b33e2920005e3f3406853a3d38a53cd5eb377de090550a0f5e9bfb2
6
+ metadata.gz: 05f8f12e77b0b430e78a8d2345e99e458bd298b48fb3aa43043aead349d3cc61a012a54f0d29a303fa4fb3a1e8f80a5c7b52a01b4432db94e46f9210bbaf938a
7
+ data.tar.gz: ea74b3b8b19c3539ea73c966df52d677a768e552ff468e7cf8fcb049a22c9a3d24df2bdee4c0a5ad8d65b1e08e11a99652f46d1007295c392e41337122334348
@@ -8,26 +8,30 @@ class EffectiveLogsDatatable < Effective::Datatable
8
8
  if attributes[:user] == false
9
9
  # Do not include
10
10
  else
11
- col :user, search: :string, sort: false
11
+ col(:user, search: :string).search do |collection, term, column, sql_column|
12
+ klass = current_user.class
13
+ users = Effective::Resource.new(klass).search_any(term, columns: [:first_name, :middle_name, :last_name, :name, :email])
14
+ collection.where(user_type: klass.name, user_id: users)
15
+ end.sort do |collection, direction, column, sql_column|
16
+ collection.order(user_id: direction)
17
+ end
12
18
  end
13
19
 
14
20
  unless attributes[:status] == false
15
- col :status, search: { collection: EffectiveLogging.statuses }
21
+ col :status, search: { collection: EffectiveLogging.statuses, fuzzy: false }
16
22
  end
17
23
 
18
- col :changes_to_type, visible: false
19
- col :changes_to_id, visible: false
24
+ col :changes_to_type, visible: false, sort: false
25
+ col :changes_to_id, visible: false, sort: false
20
26
 
21
- col :associated_type, visible: false
22
- col :associated_id, visible: false, label: 'Associated Id'
27
+ col :associated_type, visible: false, sort: false
28
+ col :associated_id, visible: false, label: 'Associated Id', sort: false
23
29
  col :associated_to_s, label: 'Associated'
24
30
 
25
- col :message do |log|
31
+ col :message, sort: false do |log|
26
32
  (log.message || '').gsub("\n", '<br>')
27
33
  end
28
34
 
29
- col :logs_count, visible: false
30
-
31
35
  col :details, visible: false, sort: false do |log|
32
36
  tableize_hash(log.details.except(:email))
33
37
  end
@@ -0,0 +1,2 @@
1
+ .effective-logs
2
+ = yield
@@ -1,3 +1,4 @@
1
- %h1.effective-admin-heading= @page_title
1
+ = render 'layout' do
2
+ %h1.effective-admin-heading= @page_title
2
3
 
3
- = render_datatable(@datatable)
4
+ = render_datatable(@datatable)
@@ -1,4 +1,4 @@
1
- %h1.effective-admin-heading= @page_title
2
-
3
- = render_log(@log)
1
+ = render 'layout' do
2
+ %h1.effective-admin-heading= @page_title
4
3
 
4
+ = render_log(@log)
@@ -0,0 +1,2 @@
1
+ .effective-logs
2
+ = yield
@@ -1,3 +1,4 @@
1
- %h1.effective-heading= @page_title
1
+ = render 'layout' do
2
+ %h1.effective-heading= @page_title
2
3
 
3
- = render_datatable(@datatable)
4
+ = render_datatable(@datatable)
@@ -1,3 +1,4 @@
1
- %h1.effective-heading= @page_title
1
+ = render 'layout' do
2
+ %h1.effective-heading= @page_title
2
3
 
3
- = render_log(@log)
4
+ = render_log(@log)
@@ -1,3 +1,3 @@
1
1
  module EffectiveLogging
2
- VERSION = '3.5.0'.freeze
2
+ VERSION = '3.5.2'.freeze
3
3
  end
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: 3.5.0
4
+ version: 3.5.2
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: 2022-10-26 00:00:00.000000000 Z
11
+ date: 2022-11-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -100,8 +100,10 @@ files:
100
100
  - app/models/concerns/acts_as_loggable.rb
101
101
  - app/models/effective/log.rb
102
102
  - app/models/effective_logger.rb
103
+ - app/views/admin/logs/_layout.html.haml
103
104
  - app/views/admin/logs/index.html.haml
104
105
  - app/views/admin/logs/show.html.haml
106
+ - app/views/effective/logs/_layout.html.haml
105
107
  - app/views/effective/logs/_log.html.haml
106
108
  - app/views/effective/logs/index.html.haml
107
109
  - app/views/effective/logs/show.html.haml