cm-admin 3.0.4 → 3.0.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/lib/cm_admin/version.rb +1 -1
- data/lib/cm_admin/view_helpers/page_info_helper.rb +4 -3
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ccdee9067f16c0163a29773911a644dc8aa6db619a424941d249c772baaa965e
|
4
|
+
data.tar.gz: 928bdb9b4043d03a99873bd436d54be57ff55b3bd9b728e1b016fcdfe184e02d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 669c963c009987392eed2454e7168368b939e4ed76b9e47692e3b53221035fab221bf2ec1c743e2434d26a3e1d80323e81c7771098c5d538a7e923bff5162161
|
7
|
+
data.tar.gz: 11d176b610d4ee0992cb0bb6dbbe02838ea9ee8fda42c35e85b133b734dbdd2a2a6792b2cde710d3aed73dd79fc29392bb09787a44109481a275838a190bbfa5
|
data/Gemfile.lock
CHANGED
data/lib/cm_admin/version.rb
CHANGED
@@ -38,7 +38,8 @@ module CmAdmin
|
|
38
38
|
end
|
39
39
|
|
40
40
|
def custom_action_items(custom_action, current_action_name)
|
41
|
-
|
41
|
+
action_name = "#{custom_action.name}?".to_sym
|
42
|
+
return unless custom_action.name.present? && policy([:cm_admin, @model.name.classify.constantize]).respond_to?(action_name) && policy([:cm_admin, @model.name.classify.constantize]).send(action_name)
|
42
43
|
|
43
44
|
scoped_model = "CmAdmin::#{@model.name}Policy::#{custom_action.name.classify}Scope".constantize.new(Current.user, @model.name.constantize).resolve
|
44
45
|
has_scoped_record = if current_action_name == 'index'
|
@@ -125,7 +126,7 @@ module CmAdmin
|
|
125
126
|
|
126
127
|
def bulk_action_button(bulk_action)
|
127
128
|
concat(content_tag(:li, class: 'bulk-action-item', data: { action: bulk_action.name }) do
|
128
|
-
button_to cm_admin.send("#{
|
129
|
+
button_to cm_admin.send("cm_#{bulk_action.name}_#{@model.name.underscore}_path"), method: :post, params: { selected_ids: '' }, class: 'bulk-action-button dropdown-item' do
|
129
130
|
concat(content_tag(:div, class: 'bulk-action-icon') do
|
130
131
|
concat(content_tag(:i, '', class: bulk_action.icon_name))
|
131
132
|
end)
|
@@ -147,7 +148,7 @@ module CmAdmin
|
|
147
148
|
|
148
149
|
def bulk_action_page(bulk_action)
|
149
150
|
concat(content_tag(:li, class: 'bulk-action-item', data: { action: bulk_action.name }) do
|
150
|
-
link_to cm_admin.send("#{
|
151
|
+
link_to cm_admin.send("cm_#{bulk_action.name}_#{@model.name.underscore}_path", @ar_object, bulk_action.url_params), class: 'dropdown-item' do
|
151
152
|
concat(content_tag(:div, class: 'bulk-action-icon') do
|
152
153
|
concat(content_tag(:i, '', class: bulk_action.icon_name))
|
153
154
|
end)
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cm-admin
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.0.
|
4
|
+
version: 3.0.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Michael
|
@@ -14,7 +14,7 @@ authors:
|
|
14
14
|
autorequire:
|
15
15
|
bindir: exe
|
16
16
|
cert_chain: []
|
17
|
-
date: 2024-10-
|
17
|
+
date: 2024-10-28 00:00:00.000000000 Z
|
18
18
|
dependencies:
|
19
19
|
- !ruby/object:Gem::Dependency
|
20
20
|
name: caxlsx_rails
|