cm-admin 1.2.1 → 1.2.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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f2b9f1cf37a3437b3fd5d0c759579d58899c58454294fed88a21bd77c33ff5c1
|
4
|
+
data.tar.gz: 12430d2c8fbee0722d022c7c93a48ade59fc12ea05a2e298e8dfda7c8a29275d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b3585639e36e464ee71b24ad6a9b67ab3c247563df9cd02671bc0e6e8cd79fc792e87622b7137b38e6c99cd2530dbe04c370637e58443b5b544cac1acf2d54f5
|
7
|
+
data.tar.gz: 3a60816b1cc72c53d25290bb338b85b3a7580223bca9137c27678a7da8f95f839e277c0e5dd2f5328415fa73d0029a0090b7b62ed79c5dd0d4959aff28f343cc
|
data/Gemfile.lock
CHANGED
@@ -32,9 +32,12 @@
|
|
32
32
|
- edit_action = @model.available_actions.select{|act| act if act.action_type.eql?(:default) && act.name.eql?('edit')}
|
33
33
|
- destroy_action = available_actions(@model, 'destroy')
|
34
34
|
- if edit_action.any? && policy([:cm_admin, @model.name.classify.constantize]).edit?
|
35
|
-
= link_to
|
35
|
+
= link_to cm_admin.send(:"#{@model.name.underscore}_edit_path", @ar_object), class: 'btn-primary ms-2' do
|
36
|
+
span
|
37
|
+
i.fa.fa-edit
|
38
|
+
| Edit
|
36
39
|
- if destroy_action
|
37
|
-
= link_to '', data: { bs_toggle: 'modal', bs_target: "##{@model.name.classify}DestroyModal-#{@ar_object.id.to_s}" }, class: 'btn-
|
40
|
+
= link_to '', data: { bs_toggle: 'modal', bs_target: "##{@model.name.classify}DestroyModal-#{@ar_object.id.to_s}" }, class: 'btn-danger ms-2' do
|
38
41
|
span
|
39
|
-
i.fa.fa-trash
|
40
|
-
|
|
42
|
+
i.fa-regular.fa-trash-can
|
43
|
+
| Delete
|
data/lib/cm_admin/version.rb
CHANGED
@@ -86,7 +86,7 @@ module CmAdmin
|
|
86
86
|
end
|
87
87
|
|
88
88
|
def add_search_filter(filter)
|
89
|
-
tag.div class: 'filter-search
|
89
|
+
tag.div class: 'filter-search me-3' do
|
90
90
|
concat(content_tag(:div, class: 'input-group input-group-sm') do
|
91
91
|
concat(content_tag(:span, class: 'input-group-text') do
|
92
92
|
tag.i class: 'fa fa-search'
|
@@ -98,7 +98,7 @@ module CmAdmin
|
|
98
98
|
|
99
99
|
def add_range_filter(filter)
|
100
100
|
value = params.dig(:filters, :range, :"#{filter.db_column_name}")
|
101
|
-
concat(content_tag(:div, class: "position-relative
|
101
|
+
concat(content_tag(:div, class: "position-relative me-3 #{value ? '' : 'hidden'}") do
|
102
102
|
concat filter_chip(value, filter)
|
103
103
|
|
104
104
|
concat(content_tag(:div, class: 'position-absolute mt-2 range-container hidden') do
|
@@ -111,7 +111,7 @@ module CmAdmin
|
|
111
111
|
|
112
112
|
def add_date_filter(filter)
|
113
113
|
value = params.dig(:filters, :date, :"#{filter.db_column_name}")
|
114
|
-
concat(content_tag(:div, class: "position-relative
|
114
|
+
concat(content_tag(:div, class: "position-relative me-3 #{value ? '' : 'hidden'}") do
|
115
115
|
concat filter_chip(value, filter)
|
116
116
|
|
117
117
|
concat(content_tag(:div, class: 'date-filter-wrapper w-100') do
|
@@ -123,7 +123,7 @@ module CmAdmin
|
|
123
123
|
|
124
124
|
def add_single_select_filter(filter)
|
125
125
|
value = params.dig(:filters, :"#{filter.filter_type}", :"#{filter.db_column_name}")
|
126
|
-
concat(content_tag(:div, class: "position-relative
|
126
|
+
concat(content_tag(:div, class: "position-relative me-3 #{value ? '' : 'hidden'}") do
|
127
127
|
if value && filter.collection[0].class == Array
|
128
128
|
selected_value_text = filter.collection.map{|collection| collection[0] if collection[1].to_s.eql?(value) }.compact.join(', ')
|
129
129
|
else
|
@@ -168,7 +168,7 @@ module CmAdmin
|
|
168
168
|
value_mapped_text = value
|
169
169
|
end
|
170
170
|
|
171
|
-
concat(content_tag(:div, class: "position-relative
|
171
|
+
concat(content_tag(:div, class: "position-relative me-3 #{value ? '' : 'hidden'}") do
|
172
172
|
concat filter_chip(value_mapped_text, filter)
|
173
173
|
|
174
174
|
concat(content_tag(:div, class: 'position-absolute mt-2 dropdown-popup hidden') do
|
@@ -71,7 +71,12 @@ module CmAdmin
|
|
71
71
|
end
|
72
72
|
|
73
73
|
def custom_modal_button(custom_action)
|
74
|
-
link_to
|
74
|
+
link_to '', class: 'btn-secondary ms-2', data: { bs_toggle: "modal", bs_target: "##{custom_action.name.classify}Modal-#{@ar_object.id}" } do
|
75
|
+
concat(content_tag(:span) do
|
76
|
+
tag.i class: custom_action.icon_name
|
77
|
+
end)
|
78
|
+
concat content_tag(:span, custom_action_title(custom_action))
|
79
|
+
end
|
75
80
|
end
|
76
81
|
|
77
82
|
def custom_action_title(custom_action)
|
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: 1.2.
|
4
|
+
version: 1.2.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- sajinmp
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: exe
|
12
12
|
cert_chain: []
|
13
|
-
date: 2023-
|
13
|
+
date: 2023-10-10 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: rails
|