cm-admin 1.1.2 → 1.1.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +1 -0
- data/.reek.yml +9 -0
- data/.rubocop.yml +2 -0
- data/Gemfile.lock +1 -1
- data/app/assets/stylesheets/cm_admin/base/table.scss +7 -0
- data/app/assets/stylesheets/cm_admin/components/_input.scss +2 -2
- data/app/controllers/cm_admin/resource_controller.rb +2 -2
- data/app/views/cm_admin/main/_actions_dropdown.html.slim +2 -2
- data/lib/cm_admin/version.rb +1 -1
- data/lib/cm_admin/view_helpers/form_helper.rb +1 -1
- data/lib/cm_admin/view_helpers/navigation_helper.rb +1 -1
- metadata +4 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 83a83ffbffcaca0ce298a3e4c2289ce3ef7bdef0e89eb1e821ced475af51a07c
|
4
|
+
data.tar.gz: 2283aabc7bb87f551c08c930b46a8b7bae3b6eefb3b914bc02536744a6209479
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c3ac960fa37e0e6dde3835f430a4eb569604d5cb364dfbbe02129063145e7c22509d17ca91be39bdb234751b6fb29a7a453fbb577d9ff758b0e026467077de90
|
7
|
+
data.tar.gz: 4fb78962250c9b5e76a67b9aebcf0e0b3e7141750fa07893ba0d0f7a7cb0c42a1ab0cbceaf2712ce8e0b097d0b2c8571902f886b20680f3778266a7c8e6a1a07
|
data/.gitignore
CHANGED
data/.reek.yml
ADDED
data/.rubocop.yml
ADDED
data/Gemfile.lock
CHANGED
@@ -161,7 +161,7 @@ input.cm-checkbox[type="checkbox"] {
|
|
161
161
|
}
|
162
162
|
&:checked:after {
|
163
163
|
background: $brand-color;
|
164
|
-
content: "\
|
164
|
+
content: "\2713";
|
165
165
|
font-family: FontAwesome !important;
|
166
166
|
color: $white;
|
167
167
|
border: none;
|
@@ -173,7 +173,7 @@ input.cm-checkbox[type="checkbox"] {
|
|
173
173
|
}
|
174
174
|
&:checked:after {
|
175
175
|
background: $grey-light-clr;
|
176
|
-
content: "\
|
176
|
+
content: "\2713";
|
177
177
|
font-family: FontAwesome !important;
|
178
178
|
color: $white;
|
179
179
|
border: none;
|
@@ -238,9 +238,9 @@ module CmAdmin
|
|
238
238
|
nested_tables = @model.available_fields[:new].map(&:nested_table_fields).map(&:keys).flatten
|
239
239
|
nested_tables += @model.available_fields[:edit].map(&:nested_table_fields).map(&:keys).flatten
|
240
240
|
nested_fields = nested_tables.uniq.map {|assoc_name|
|
241
|
-
table_name = @
|
241
|
+
table_name = @model.ar_model.reflections[assoc_name.to_s].klass.table_name
|
242
242
|
Hash[
|
243
|
-
table_name
|
243
|
+
"#{table_name}_attributes",
|
244
244
|
table_name.to_s.classify.constantize.column_names.reject { |i| CmAdmin::REJECTABLE_FIELDS.include?(i) }.map(&:to_sym) + [:id, :_destroy]
|
245
245
|
]
|
246
246
|
}
|
@@ -19,13 +19,13 @@
|
|
19
19
|
| Edit
|
20
20
|
- if destroy_action.present?
|
21
21
|
- if @associated_model
|
22
|
-
=
|
22
|
+
= button_to cm_admin.send("#{current_model.name.underscore}_destroy_path", ar_object.id, referrer: request.path), method: :delete, form: { data: { turbo_confirm: 'Are you sure?' } } do
|
23
23
|
.popup-option
|
24
24
|
span
|
25
25
|
i.fa.fa-trash
|
26
26
|
| Destroy
|
27
27
|
- else
|
28
|
-
=
|
28
|
+
= button_to cm_admin.send("#{current_model.name.underscore}_destroy_path", ar_object.id), method: :delete, form: { data: { turbo_confirm: 'Are you sure?' } } do
|
29
29
|
.popup-option
|
30
30
|
span
|
31
31
|
i.fa.fa-trash
|
data/lib/cm_admin/version.rb
CHANGED
@@ -76,7 +76,7 @@ module CmAdmin
|
|
76
76
|
def set_nested_form_fields(form_obj, section)
|
77
77
|
content_tag(:div) do
|
78
78
|
section.nested_table_fields.keys.each do |key|
|
79
|
-
concat(render partial: '/cm_admin/main/nested_table_form', locals: {f: form_obj, assoc_name: key, section: section})
|
79
|
+
concat(render partial: '/cm_admin/main/nested_table_form', locals: { f: form_obj, assoc_name: key, section: section })
|
80
80
|
end
|
81
81
|
end
|
82
82
|
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: 1.1.
|
4
|
+
version: 1.1.4
|
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-07-
|
13
|
+
date: 2023-07-14 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: rails
|
@@ -166,7 +166,9 @@ files:
|
|
166
166
|
- ".github/ISSUE_TEMPLATE/feature_request.md"
|
167
167
|
- ".github/workflows/linters.yml"
|
168
168
|
- ".gitignore"
|
169
|
+
- ".reek.yml"
|
169
170
|
- ".rspec"
|
171
|
+
- ".rubocop.yml"
|
170
172
|
- ".stylelintrc.json"
|
171
173
|
- ".travis.yml"
|
172
174
|
- CODE_OF_CONDUCT.md
|