five-two-nw-olivander 0.1.2.5 → 0.1.2.7
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: 1b489861cd3f93d004b29e2d2748b070c6853b4ecceac386484857feb34fcc36
|
4
|
+
data.tar.gz: 8c95fc16ca20a716fe779cc3c9be95505ab6f2ef0b02d064be6dd928cf20743a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 53ac199d454b63de8430392693c8e0bb34df97ce76401c1bcd49dfc62bb3ede1b675dc44689cc110b87e449a0b80938cb17d025662101a0225c82d37b7366da2
|
7
|
+
data.tar.gz: 2bb18d88fdf0ac9ae99bd344a434e7eef01b7635abe7296d59f8845bce95aefcbb58bc7f8d0accce8e8eb83f03fd7747e2919e754dc9e692f67b6f3b08651ba1
|
@@ -21,8 +21,8 @@ module Olivander
|
|
21
21
|
plural_name = resource.is_a?(Class) ? resource.table_name : resource.class.table_name
|
22
22
|
routed_resource = route_builder.resources[plural_name.to_sym]
|
23
23
|
actions = resource.is_a?(Class) ?
|
24
|
-
(routed_resource.unpersisted_crud_actions | routed_resource.collection_actions) :
|
25
|
-
(resource.persisted? ? (routed_resource.persisted_crud_actions | routed_resource.member_actions): [])
|
24
|
+
(routed_resource.unpersisted_crud_actions | routed_resource.collection_actions.select{ |x| !x.crud_action }) :
|
25
|
+
(resource.persisted? ? (routed_resource.persisted_crud_actions | routed_resource.member_actions.select{ |x| !x.crud_action }): [])
|
26
26
|
actions.reject{ |a| a.sym == for_action }
|
27
27
|
end
|
28
28
|
|
@@ -1,5 +1,26 @@
|
|
1
1
|
- resource = (@_effective_resource || Effective::Resource.new(controller_path))
|
2
2
|
|
3
|
+
- if @datatable
|
4
|
+
- content_for :datatable do
|
5
|
+
= render_datatable(@datatable, charts: false)
|
6
|
+
- content_for :datatable_charts do
|
7
|
+
- keys = @datatable._charts.keys
|
8
|
+
- ks = keys.size
|
9
|
+
- if ks.positive?
|
10
|
+
.row
|
11
|
+
- @datatable._charts.keys.each do |k|
|
12
|
+
%div{ class: "#{col_class_num('xl', ks, 3)} #{col_class_num('lg', ks, 2)} #{col_class_num('md', ks, 6)} #{col_class_num('sm', ks, 6)}"}
|
13
|
+
.card.card-secondary
|
14
|
+
.card-header
|
15
|
+
%h3.card-title= I18n.t([@datatable.class.name.underscore, 'charts', k].join('.'))
|
16
|
+
.card-tools.text-right
|
17
|
+
%button.btn.btn-tool{ type: :button, 'data-card-widget': :maximize }
|
18
|
+
%i.fas.fa-expand
|
19
|
+
.card-body
|
20
|
+
= render_datatable_chart(@datatable, k)
|
21
|
+
|
22
|
+
- if @datatable
|
23
|
+
= content_for :datatable_charts
|
3
24
|
.row
|
4
25
|
.col-12
|
5
26
|
.card
|
@@ -9,7 +30,7 @@
|
|
9
30
|
= resource_form_actions(@context.route_builder, resource.klass, for_action: :index)
|
10
31
|
.card-body
|
11
32
|
- if @datatable
|
12
|
-
=
|
33
|
+
= content_for :datatable
|
13
34
|
|
14
35
|
- elsif instance_variable_get('@' + resource.plural_name).respond_to?(:to_partial_path)
|
15
36
|
= render instance_variable_get('@' + resource.plural_name)
|
data/lib/olivander/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: five-two-nw-olivander
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.2.
|
4
|
+
version: 0.1.2.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Eric Dennis
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-07-
|
11
|
+
date: 2023-07-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: chartkick
|