rails_admin_mydash 0.1.2 → 0.1.4

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: d816fa52e0c3107c71641c2b20e10375a6f3226a
4
- data.tar.gz: 0a10768f139fba74cee1f68bcfdcc90220cbd35a
3
+ metadata.gz: 839d3ed157454dbdd9f5a5a0688a0c4749ba3eeb
4
+ data.tar.gz: 59d0dde27c0e3bb9545cfc1aa014b4198a1915f8
5
5
  SHA512:
6
- metadata.gz: adfc73bb5bb8c64aa3db8967a78bf8a9bbac29398a492e0b8e8f8bb65acdff746263c4169cf3cc534803dce79f67873e7a2b703bba8e6695457b9c7545f3cd12
7
- data.tar.gz: a1846340a15bdba7a574045afb806c3bd0ef3cccb4d2c93dffc92b1f7e574a44884da83fbfc9cd04ea0d1594ec66b2594f377787398bbd124379c7cf71ed31f9
6
+ metadata.gz: 2ef35867dcaea3ac2e49461a72ad708d23b03af08bd22592819a619e396d0a12c3a1cb3a230f0b504d8c9e15b3673e3e1f33af032a311d048d6b3becad23b1e4
7
+ data.tar.gz: f80438352e1a0ced6fed4d0df0436f9b32cab8b2fb4914bd18d44438a2ca2cfd834b92122be78956d61c37ae3e13fce4f1539999f787e123a3931b1a4f6a4a9f
data/README.md CHANGED
@@ -8,6 +8,8 @@ Features:
8
8
 
9
9
  - show optionally admin notices (to show informations to the users)
10
10
 
11
+ - auditing / history table
12
+
11
13
  - disabled default progress bars with statistics (minor performance improvement)
12
14
 
13
15
  ## Installation
@@ -0,0 +1,21 @@
1
+ %table.table.table-condensed.table-striped
2
+ %thead
3
+ %tr
4
+ %th.shrink.user= t("admin.table_headers.username")
5
+ %th.shrink.items= t("admin.table_headers.item")
6
+ %th.changes= t("admin.table_headers.changes")
7
+ %tbody
8
+ - @history.each do |t|
9
+ - abstract_model = RailsAdmin.config(t.table).abstract_model
10
+ %tr
11
+ %td= t.try :username
12
+ - if o = abstract_model.try(:get, t.item)
13
+ - label = o.send(abstract_model.config.object_label_method)
14
+ - if show_action = action(:show, abstract_model, o)
15
+ %td= link_to(label, url_for(action: show_action.action_name, model_name: abstract_model.to_param, id: o.id), class: 'pjax')
16
+ - else
17
+ %td= label
18
+ - else
19
+ - label = Object.const_defined?(t.table) ? t.table.constantize.model_name.human : t.table
20
+ %td= "#{label} ##{t.item}"
21
+ %td= t.message
@@ -1,5 +1,3 @@
1
- / TODO: show audit ?
2
-
3
1
  - if @admin_notices
4
2
  %div.panel.panel-info
5
3
  %div.panel-heading
@@ -38,8 +36,8 @@
38
36
  %td.c4.links
39
37
  %ul.inline.list-inline= menu_for :collection, abstract_model, nil, true
40
38
 
41
- / - if @auditing_adapter && authorized?(:history_index)
42
- / #block-tables.block
43
- / .content
44
- / %h2= t("admin.actions.history_index.menu")
45
- / = render partial: 'rails_admin/main/dashboard_history'
39
+ - if @auditing_adapter && authorized?(:history_index)
40
+ #block-tables.block
41
+ .content
42
+ %h2= t("admin.actions.history_index.menu")
43
+ = render partial: 'mydashboard_history'
@@ -11,7 +11,7 @@ RailsAdmin::Config::Actions::Dashboard.class_eval do
11
11
 
12
12
  register_instance_option :controller do
13
13
  proc do
14
- # @history = @auditing_adapter && @auditing_adapter.latest || []
14
+ @history = @auditing_adapter && @auditing_adapter.latest || []
15
15
  @count = {}
16
16
  @last_rows = {}
17
17
  @abstract_models = RailsAdmin::Config.visible_models(controller: self).collect(&:abstract_model)
@@ -1,3 +1,3 @@
1
1
  module RailsAdminMydash
2
- VERSION = '0.1.2'
2
+ VERSION = '0.1.4'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rails_admin_mydash
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.1.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mattia Roccoberton
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-01-29 00:00:00.000000000 Z
11
+ date: 2017-01-31 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: An alternative dashboard for rails_admin
14
14
  email:
@@ -20,6 +20,7 @@ files:
20
20
  - MIT-LICENSE
21
21
  - README.md
22
22
  - Rakefile
23
+ - app/views/rails_admin/main/_mydashboard_history.html.haml
23
24
  - app/views/rails_admin/main/dashboard.html.haml
24
25
  - lib/rails_admin_mydash.rb
25
26
  - lib/rails_admin_mydash/config/actions/dashboard.rb
@@ -45,7 +46,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
45
46
  version: '0'
46
47
  requirements: []
47
48
  rubyforge_project:
48
- rubygems_version: 2.6.8
49
+ rubygems_version: 2.5.1
49
50
  signing_key:
50
51
  specification_version: 4
51
52
  summary: Rails Admin Mydash