cm-admin 1.4.7 → 1.4.9
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: f3bdeb9aab9e5eb7d88bfa184cf5fdd2282650bbc065e1f5139b3c417f3fed34
|
4
|
+
data.tar.gz: 228f5e430f7066eb1c1db1a83ddd21700e9ca7030bffef76cbd45c87ac543680
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 50a43eb5dbc704f6b7018260d3d844ba6f7ba9cf2d465cfc16b72d594b879883a90615ef5985df225d6db54315b449cb2edfbebb4c26392770ca7864a8dfbf47
|
7
|
+
data.tar.gz: c91fc2f56e355271d49009e991e00156b29e5d8ccab21d64b0fe787595c88d12a0a1eb8b83ea874014b1f7c6a5f8a4d4199b87ecac6bec26dc74c9bdf7efee0a
|
data/Gemfile.lock
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
- custom_action_with_modals = @model.available_actions.select{ |act| act if act.display_type == :modal && act.action_type == :custom }
|
2
2
|
- bulk_action_with_modals = @model.available_actions.select{ |act| act if act.display_type == :modal && act.action_type == :bulk_action }
|
3
|
-
- destroy_action = available_actions(@model, @ar_object, 'destroy')
|
3
|
+
- destroy_action = @ar_object ? available_actions(@model, @ar_object, 'destroy') : nil
|
4
4
|
- if @associated_model
|
5
5
|
- custom_action_with_modals += @associated_model.available_actions.select{ |act| act if act.display_type == :modal }
|
6
6
|
- if @current_action&.name == 'index'
|
@@ -7,7 +7,7 @@
|
|
7
7
|
.modal-body
|
8
8
|
.custom-modal-body
|
9
9
|
.modal-info data-section="bulk-action"
|
10
|
-
| Are you sure you want to delete this #{@model.name.classify}
|
10
|
+
| Are you sure you want to delete this #{@model.name.classify}?
|
11
11
|
.modal-footer
|
12
12
|
= button_to cm_admin.send("#{@model.name.underscore}_destroy_path", ar_object), method: :delete, class: "btn btn-primary" do
|
13
13
|
span
|
data/lib/cm_admin/version.rb
CHANGED
@@ -65,7 +65,7 @@ module CmAdmin
|
|
65
65
|
}
|
66
66
|
end
|
67
67
|
|
68
|
-
def cm_custom_single_select_field(form_obj, cm_field, value, required_class, target_action)
|
68
|
+
def cm_custom_single_select_field(form_obj, cm_field, value, required_class, target_action, _ajax_url)
|
69
69
|
select_tag cm_field.html_attr[:name] || cm_field.field_name,
|
70
70
|
options_for_select(select_collection_value(form_obj.object, cm_field)),
|
71
71
|
{
|
@@ -81,7 +81,7 @@ module CmAdmin
|
|
81
81
|
}
|
82
82
|
end
|
83
83
|
|
84
|
-
def cm_multi_select_field(form_obj, cm_field, value, required_class, target_action)
|
84
|
+
def cm_multi_select_field(form_obj, cm_field, value, required_class, target_action, _ajax_url)
|
85
85
|
form_obj.select cm_field.field_name,
|
86
86
|
options_for_select(select_collection_value(form_obj.object, cm_field), form_obj.object.send(cm_field.field_name)),
|
87
87
|
{ include_blank: cm_field.placeholder },
|
@@ -98,7 +98,7 @@ module CmAdmin
|
|
98
98
|
data: { behaviour: 'date-only' }
|
99
99
|
end
|
100
100
|
|
101
|
-
def cm_custom_date_field(form_obj, cm_field, value, required_class, _target_action)
|
101
|
+
def cm_custom_date_field(form_obj, cm_field, value, required_class, _target_action, _ajax_url)
|
102
102
|
text_field_tag cm_field.html_attr[:name] || cm_field.field_name, value&.strftime('%d-%m-%Y'),
|
103
103
|
class: "field-control #{required_class}",
|
104
104
|
disabled: cm_field.disabled.call(form_obj.object),
|
@@ -128,14 +128,14 @@ module CmAdmin
|
|
128
128
|
placeholder: cm_field.placeholder
|
129
129
|
end
|
130
130
|
|
131
|
-
def cm_single_file_upload_field(form_obj, cm_field, _value, required_class, _target_action)
|
131
|
+
def cm_single_file_upload_field(form_obj, cm_field, _value, required_class, _target_action, _ajax_url)
|
132
132
|
content_tag(:div) do
|
133
133
|
concat form_obj.file_field cm_field.field_name, class: "field-control #{required_class}", disabled: cm_field.disabled.call(form_obj.object)
|
134
134
|
concat attachment_list(form_obj, cm_field, _value, required_class, _target_action)
|
135
135
|
end
|
136
136
|
end
|
137
137
|
|
138
|
-
def cm_multi_file_upload_field(form_obj, cm_field, _value, required_class, _target_action)
|
138
|
+
def cm_multi_file_upload_field(form_obj, cm_field, _value, required_class, _target_action, _ajax_url)
|
139
139
|
content_tag(:div) do
|
140
140
|
concat form_obj.file_field cm_field.field_name, multiple: true, class: "field-control #{required_class}", disabled: cm_field.disabled.call(form_obj.object)
|
141
141
|
concat attachment_list(form_obj, cm_field, _value, required_class, _target_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.4.
|
4
|
+
version: 1.4.9
|
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: 2024-04-
|
13
|
+
date: 2024-04-05 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: caxlsx_rails
|
@@ -498,7 +498,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
498
498
|
- !ruby/object:Gem::Version
|
499
499
|
version: '0'
|
500
500
|
requirements: []
|
501
|
-
rubygems_version: 3.
|
501
|
+
rubygems_version: 3.5.4
|
502
502
|
signing_key:
|
503
503
|
specification_version: 4
|
504
504
|
summary: CmAdmin is a robust gem designed to assist in creating admin panels for Rails
|