cm-admin 1.2.0 → 1.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/app/assets/stylesheets/cm_admin/base/form.scss +5 -0
- data/app/assets/stylesheets/cm_admin/base/navbar.scss +1 -1
- data/app/assets/stylesheets/cm_admin/base/table.scss +18 -46
- data/app/assets/stylesheets/cm_admin/components/_buttons.scss +14 -12
- data/app/assets/stylesheets/cm_admin/components/_input.scss +0 -24
- data/app/assets/stylesheets/cm_admin/components/_status-tag.scss +37 -9
- data/app/views/cm_admin/main/_cm_pagy_nav.html.slim +7 -7
- data/app/views/cm_admin/main/_nested_fields.html.slim +7 -46
- data/app/views/cm_admin/main/_nested_table_form.html.slim +2 -2
- data/app/views/cm_admin/main/_table.html.slim +3 -4
- data/app/views/cm_admin/main/_top_navbar.html.slim +2 -1
- data/lib/cm_admin/version.rb +1 -1
- data/lib/cm_admin/view_helpers/filter_helper.rb +9 -11
- data/lib/cm_admin/view_helpers/form_field_helper.rb +6 -4
- data/lib/cm_admin/view_helpers/form_helper.rb +4 -0
- data/lib/cm_admin/view_helpers/page_info_helper.rb +0 -19
- 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: 86d2406a7cec46cd375fad274561e1545668f65124652803db2e533c48ba9721
|
4
|
+
data.tar.gz: 6a8aa052b4e7264822320a588a95f6aa5187c548383de450a4d287299b818601
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 79dca0f6279868346d75204aff4fa4188778530b2443f87623f0855737b9008032b4661ca82b40c857c29224a084e243d6571c5cbcdfbde84b59ead69f855df6
|
7
|
+
data.tar.gz: 0d5f9f625e5536bed4590f1ec4957bc3b9e4e028beca1be33138972755744b5c6e0f109c295e32f7cd8adfcde18b297968b9b922a5503410a19b42528ba842e9
|
data/Gemfile.lock
CHANGED
@@ -3,7 +3,7 @@
|
|
3
3
|
|
4
4
|
.entity-header {
|
5
5
|
@extend .d-flex.justify-content-between.align-items-start.p-4;
|
6
|
-
min-height: 109px; // Height needs to be removed once all the layouts are revamped
|
6
|
+
// min-height: 109px; // Height needs to be removed once all the layouts are revamped
|
7
7
|
background-color: var(--bs-white);
|
8
8
|
&__info {
|
9
9
|
.breadcrumb {
|
@@ -252,58 +252,30 @@
|
|
252
252
|
}
|
253
253
|
}
|
254
254
|
|
255
|
-
.
|
256
|
-
position
|
255
|
+
.pagination-bar {
|
256
|
+
@extend .position-sticky,
|
257
|
+
.bottom-0,
|
258
|
+
.start-0,
|
259
|
+
.d-flex,
|
260
|
+
.justify-content-between,
|
261
|
+
.align-items-center,
|
262
|
+
.w-100,
|
263
|
+
.py-2,
|
264
|
+
.px-4,
|
265
|
+
.bg-white !optional;
|
257
266
|
bottom: 0;
|
258
267
|
left: 0;
|
259
|
-
display: flex;
|
260
|
-
justify-content: space-between;
|
261
|
-
align-items: center;
|
262
|
-
width: 100%;
|
263
|
-
padding: 16px 24px;
|
264
|
-
background-color: $white;
|
265
268
|
border: 1px solid $grey-lighter-clr;
|
266
269
|
box-shadow: inset 0px 1px 0px rgba(148, 151, 155, 0.3);
|
267
270
|
z-index: 2;
|
268
|
-
|
269
|
-
@include font($size: $t4-text, $color:
|
270
|
-
line-height: 22px;
|
271
|
+
.count-text {
|
272
|
+
@include font($size: $t4-text, $color: var(--bs-body-color));
|
271
273
|
}
|
272
|
-
|
273
|
-
|
274
|
-
|
275
|
-
|
276
|
-
@
|
277
|
-
line-height: 12px;
|
278
|
-
padding: 10px 11px;
|
279
|
-
cursor: pointer;
|
280
|
-
&.disabled {
|
281
|
-
color: $disabled-clr;
|
282
|
-
cursor: initial;
|
283
|
-
pointer-events: none;
|
284
|
-
}
|
285
|
-
}
|
286
|
-
.page-num-btn {
|
287
|
-
@include font($size: $t4-text, $color: $primary-text-clr, $weight: bold);
|
288
|
-
display: inline-flex;
|
289
|
-
justify-content: center;
|
290
|
-
align-items: center;
|
291
|
-
width: 32px;
|
292
|
-
height: 32px;
|
293
|
-
margin: 0 8px;
|
294
|
-
border-radius: 4px;
|
295
|
-
cursor: pointer;
|
296
|
-
&:hover {
|
297
|
-
border: 1px solid $grey-light-clr;
|
298
|
-
}
|
299
|
-
&.active {
|
300
|
-
color: $primary-text-clr;
|
301
|
-
background-color: $grey-lightest-clr;
|
302
|
-
border: 1px solid $grey-light-clr;
|
303
|
-
border-radius: $radius-4;
|
304
|
-
cursor: initial;
|
305
|
-
pointer-events: none;
|
306
|
-
}
|
274
|
+
.pagination-actions {
|
275
|
+
@extend .pagination;
|
276
|
+
gap: 4px;
|
277
|
+
span {
|
278
|
+
@extend .d-inline-flex;
|
307
279
|
}
|
308
280
|
}
|
309
281
|
}
|
@@ -1,37 +1,39 @@
|
|
1
1
|
@import "../helpers/index.scss";
|
2
2
|
@import "../dependency/bootstrap/scss/bootstrap";
|
3
3
|
|
4
|
-
|
5
|
-
.
|
6
|
-
|
7
|
-
margin-right: 4px;
|
8
|
-
}
|
4
|
+
.btn-icon-spacing {
|
5
|
+
@extend .d-inline-flex, .align-items-center, .justify-content-center;
|
6
|
+
gap: 4px;
|
9
7
|
}
|
10
8
|
|
11
9
|
// New buttons with bootstrap button styles
|
12
10
|
.cm-admin .btn-cta {
|
13
|
-
|
14
|
-
|
11
|
+
--bs-btn-color: var(--bs-white) !important;
|
12
|
+
--bs-btn-bg: var(--bs-primary) !important;
|
13
|
+
--bs-btn-border-color: var(--bs-primary);
|
14
|
+
--bs-btn-hover-color: var(--bs-white);
|
15
|
+
--bs-btn-hover-bg: #{shade-color($primary, 10%)};
|
16
|
+
@extend .btn, .btn-sm, .btn-icon-spacing;
|
15
17
|
}
|
16
18
|
|
17
19
|
.cm-admin .btn-primary {
|
18
|
-
@extend .btn.btn-outline-primary.btn-sm.btn-icon;
|
20
|
+
@extend .btn, .btn-outline-primary, .btn-sm, .btn-icon-spacing;
|
19
21
|
}
|
20
22
|
|
21
23
|
.cm-admin .btn-secondary {
|
22
|
-
@extend .btn.btn-outline-secondary.btn-sm.btn-icon;
|
24
|
+
@extend .btn, .btn-outline-secondary, .btn-sm, .btn-icon-spacing;
|
23
25
|
}
|
24
26
|
|
25
27
|
.cm-admin .btn-ghost {
|
26
|
-
@extend .btn.btn-light.btn-sm.btn-icon;
|
28
|
+
@extend .btn, .btn-light, .btn-sm, .btn-icon-spacing;
|
27
29
|
}
|
28
30
|
|
29
31
|
.cm-admin .btn-danger {
|
30
|
-
@extend .btn.btn-outline-danger.btn-sm.btn-icon;
|
32
|
+
@extend .btn, .btn-outline-danger, .btn-sm, .btn-icon-spacing;
|
31
33
|
}
|
32
34
|
|
33
35
|
.cm-admin .btn-link {
|
34
|
-
@extend .btn.btn-link.btn-sm.btn-icon;
|
36
|
+
@extend .btn, .btn-link, .btn-sm, .btn-icon-spacing;
|
35
37
|
text-decoration: underline;
|
36
38
|
}
|
37
39
|
|
@@ -34,30 +34,6 @@
|
|
34
34
|
}
|
35
35
|
}
|
36
36
|
|
37
|
-
//Search input styles
|
38
|
-
.search-input {
|
39
|
-
position: relative;
|
40
|
-
width: 100%;
|
41
|
-
padding: 5px 0 5px 38px;
|
42
|
-
@include font($size: $t4-text, $color: $primary-text-clr);
|
43
|
-
line-height: 22px;
|
44
|
-
background-color: $white;
|
45
|
-
border: 1px solid $grey-light-clr;
|
46
|
-
border-radius: $radius-4;
|
47
|
-
&::placeholder {
|
48
|
-
color: $ink-lightest-clr;
|
49
|
-
}
|
50
|
-
&:focus {
|
51
|
-
outline: 3px auto rgba(47, 128, 237, 0.3);
|
52
|
-
}
|
53
|
-
}
|
54
|
-
.search-input-icon {
|
55
|
-
position: absolute;
|
56
|
-
top: 8px;
|
57
|
-
left: 16px;
|
58
|
-
@include font($size: $t4-text, $color: $ink-lightest-clr);
|
59
|
-
}
|
60
|
-
|
61
37
|
//Normal input styles
|
62
38
|
.normal-input {
|
63
39
|
width: 100%;
|
@@ -1,15 +1,43 @@
|
|
1
1
|
@import "../helpers/index.scss";
|
2
|
+
@import "../dependency/bootstrap/scss/bootstrap";
|
2
3
|
|
3
4
|
.status-tag {
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
color:
|
12
|
-
|
5
|
+
@extend .badge;
|
6
|
+
&.active {
|
7
|
+
background: var(--blue-100, #e7f1ff);
|
8
|
+
color: var(--blue-700, #084298);
|
9
|
+
}
|
10
|
+
&.active-one {
|
11
|
+
background: var(--Blue-100, #e7f1ff);
|
12
|
+
color: var(--Blue-700, #084298);
|
13
|
+
}
|
14
|
+
&.active-two {
|
15
|
+
background: var(--Yellow-100, #fff3cd);
|
16
|
+
color: var(--Yellow-700, #997404);
|
17
|
+
}
|
18
|
+
&.active-three {
|
19
|
+
background: var(--Orange-100, #ffe5d0);
|
20
|
+
color: var(--Orange-700, #984c0c);
|
21
|
+
}
|
22
|
+
&.active-four {
|
23
|
+
background: var(--Indigo-100, #e0cffc);
|
24
|
+
color: var(--Indigo-700, #3d0a91);
|
25
|
+
}
|
26
|
+
&.active-five {
|
27
|
+
background: var(--Cyan-100, #cff4fc);
|
28
|
+
color: var(--Cyan-700, #087990);
|
29
|
+
}
|
30
|
+
&.completed {
|
31
|
+
background: var(--green-100, #d1e7dd);
|
32
|
+
color: var(--green-700, #0f5132);
|
33
|
+
}
|
34
|
+
&.neutral {
|
35
|
+
background: var(--bs-gray-300);
|
36
|
+
color: var(--bs-gray-700);
|
37
|
+
}
|
38
|
+
&.danger {
|
39
|
+
background: var(--red-100, #f8d7da);
|
40
|
+
color: var(--red-700, #842029);
|
13
41
|
}
|
14
42
|
}
|
15
43
|
|
@@ -1,23 +1,23 @@
|
|
1
1
|
- link = pagy_link_proc(pagy)
|
2
2
|
|
3
|
-
nav.
|
3
|
+
nav.pagination-actions role="navigation" aria-label="pager"
|
4
4
|
|
5
5
|
- if pagy.prev
|
6
|
-
span ==> link.call(pagy.prev, '<', 'aria-label="previous" class="
|
6
|
+
span ==> link.call(pagy.prev, '<i class="fas fa-chevron-left"></i>'.html_safe, 'aria-label="previous" class="btn-ghost"')
|
7
7
|
- else
|
8
|
-
span ==> link.call('#', '<', 'class="
|
8
|
+
span ==> link.call('#', '<i class="fas fa-chevron-left"></i>'.html_safe, 'class="btn-ghost disabled"')
|
9
9
|
|
10
10
|
- pagy.series.each do |item| # series example: [1, :gap, 7, 8, "9", 10, 11, :gap, 36]
|
11
11
|
- if item.is_a?(Integer) # page link
|
12
|
-
span ==> link.call(item, item, 'class="
|
12
|
+
span ==> link.call(item, item, 'class="btn-ghost"')
|
13
13
|
|
14
14
|
- elsif item.is_a?(String) # current page
|
15
|
-
span ==> link.call(item, item, 'class="
|
15
|
+
span ==> link.call(item, item, 'class="btn-ghost active"')
|
16
16
|
|
17
17
|
- elsif item == :gap # page gap
|
18
18
|
span.page.gap ==> pagy_t('pagy.nav.gap')
|
19
19
|
|
20
20
|
- if pagy.next
|
21
|
-
span == link.call(pagy.next, '>', 'aria-label="next" class="
|
21
|
+
span == link.call(pagy.next, '<i class="fas fa-chevron-right"></i>'.html_safe, 'aria-label="next" class="btn-ghost"')
|
22
22
|
- else
|
23
|
-
span ==> link.call('#', '>', 'class="
|
23
|
+
span ==> link.call('#', '<i class="fas fa-chevron-right"></i>'.html_safe, 'class="btn-ghost disabled"')
|
@@ -1,46 +1,7 @@
|
|
1
|
-
-
|
2
|
-
.
|
3
|
-
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
- if @reflections.select {|x| x if x.name == assoc_name}.first.macro == :has_many
|
9
|
-
= link_to_remove_association "", f, class: 'fa fa-times'
|
10
|
-
- else
|
11
|
-
tr
|
12
|
-
td.item-delete-cell
|
13
|
-
- if @reflections.select {|x| x if x.name == assoc_name}.first.macro == :has_many
|
14
|
-
= link_to_remove_association "", f, class: 'fa fa-trash btn-ghost'
|
15
|
-
- fields.each do |field|
|
16
|
-
td
|
17
|
-
= input_field_for_column(f, field)
|
18
|
-
|
19
|
-
|
20
|
-
/ .field-remove-action
|
21
|
-
/ - if @reflections.select {|x| x if x.name == assoc_name}.first.macro == :has_many
|
22
|
-
/ .accordion-delete-btn
|
23
|
-
/ = link_to_remove_association "", f, class: 'fa fa-trash btn-ghost'
|
24
|
-
/ - fields.each do |field|
|
25
|
-
/ .form-field
|
26
|
-
/ .field-label-wrapper
|
27
|
-
/ label.field-label = field.field_name.to_s.titleize
|
28
|
-
/ .field-input-wrapper
|
29
|
-
/ = input_field_for_column(f, field)
|
30
|
-
|
31
|
-
/ .accordion-item.nested-fields
|
32
|
-
/ h2#headingOne.accordion-header
|
33
|
-
/ button.accordion-button[type="button" data-bs-toggle="collapse" data-bs-target="##{assoc_name}-#{f.object.id}" aria-expanded="true" aria-controls="collapseOne"]
|
34
|
-
/ | Chapter 1
|
35
|
-
/ .field-remove-action
|
36
|
-
/ - if @reflections.select {|x| x if x.name == assoc_name}.first.macro == :has_many
|
37
|
-
/ .accordion-delete-btn
|
38
|
-
/ = link_to_remove_association "", f, class: 'fa fa-trash btn-ghost'
|
39
|
-
/ div.accordion-collapse.collapse.show[aria-labelledby="headingOne" id="#{assoc_name}-#{f.object.id}"]
|
40
|
-
/ .accordion-body
|
41
|
-
/ - fields.each do |field|
|
42
|
-
/ .form-field
|
43
|
-
/ .field-label-wrapper
|
44
|
-
/ label.field-label = field.field_name.to_s.titleize
|
45
|
-
/ .field-input-wrapper
|
46
|
-
/ = input_field_for_column(f, field)
|
1
|
+
tr.nested-fields
|
2
|
+
td.item-delete-cell
|
3
|
+
- if @reflections.select {|x| x if x.name == assoc_name}.first.macro == :has_many
|
4
|
+
= link_to_remove_association "", f, class: 'fa-regular fa-trash-can btn-ghost'
|
5
|
+
- fields.each do |field|
|
6
|
+
td
|
7
|
+
= input_field_for_column(f, field)
|
@@ -12,8 +12,8 @@
|
|
12
12
|
= field.field_name.to_s.titleize
|
13
13
|
tbody.insert-cocoon-position
|
14
14
|
= f.fields_for table_name do |record|
|
15
|
-
- if record.object.persisted?
|
15
|
+
- if record.object.persisted? || @ar_object.errors.present?
|
16
16
|
= render partial: '/cm_admin/main/nested_fields', locals: { f: record, assoc_name: assoc_name, section: section, fields: fields }
|
17
17
|
- if @reflections.select {|x| x if x.name == assoc_name}.first.macro == :has_many
|
18
18
|
.links
|
19
|
-
= link_to_add_association "+ Add #{assoc_name.to_s.titleize}", f, table_name, partial: '/cm_admin/main/nested_fields', render_options: {locals: { assoc_name: assoc_name, section: section, fields: fields }}, data: { association_insertion_node: '.insert-cocoon-position', association_insertion_method: 'append' }, class: 'btn-
|
19
|
+
= link_to_add_association "+ Add #{assoc_name.to_s.titleize}", f, table_name, partial: '/cm_admin/main/nested_fields', render_options: {locals: { assoc_name: assoc_name, section: section, fields: fields }}, data: { association_insertion_node: '.insert-cocoon-position', association_insertion_method: 'append' }, class: 'btn-primary'
|
@@ -49,9 +49,8 @@
|
|
49
49
|
- if @model
|
50
50
|
== render partial: 'cm_admin/main/actions_dropdown', locals: { cm_model: @model, ar_object: ar_object }
|
51
51
|
|
52
|
-
.
|
53
|
-
.
|
54
|
-
.
|
55
|
-
== render partial: 'cm_admin/main/cm_pagy_nav', locals: { pagy: @ar_object.pagy }
|
52
|
+
.pagination-bar
|
53
|
+
p.count-text.m-0 Showing #{@ar_object.pagy.from} to #{@ar_object.pagy.to} out of #{@ar_object.pagy.count}
|
54
|
+
== render partial: 'cm_admin/main/cm_pagy_nav', locals: { pagy: @ar_object.pagy }
|
56
55
|
|
57
56
|
/ = render partial: 'cm_admin/main/member_custom_action_modal', locals: { cm_model: @model, ar_collection: @ar_object }
|
@@ -4,7 +4,8 @@
|
|
4
4
|
.breadcrumb
|
5
5
|
= link_to "#{@model.name.titleize.pluralize} /", cm_admin.send(:"#{@model.name.underscore}_index_path"), class: 'text-reset'
|
6
6
|
h4 = action_title
|
7
|
-
|
7
|
+
- if @model.current_action.page_description
|
8
|
+
p.mb-0.text-body-secondary = @model.current_action.page_description
|
8
9
|
.entity-header__actions
|
9
10
|
- if @model.current_action.name == 'index'
|
10
11
|
- if has_valid_policy(@model.name, :exportable)
|
data/lib/cm_admin/version.rb
CHANGED
@@ -19,8 +19,9 @@ module CmAdmin
|
|
19
19
|
end
|
20
20
|
|
21
21
|
def add_filters_dropdown(filters)
|
22
|
-
concat(content_tag(:
|
23
|
-
tag.
|
22
|
+
concat(content_tag(:button, class: 'dropdown btn-ghost', data: {bs_toggle: 'dropdown'}) do
|
23
|
+
concat tag.i(class: 'fas fa-filter')
|
24
|
+
concat tag.span 'Filter'
|
24
25
|
end)
|
25
26
|
|
26
27
|
concat(content_tag(:div, class: 'dropdown-menu dropdown-popup') do
|
@@ -86,15 +87,12 @@ module CmAdmin
|
|
86
87
|
|
87
88
|
def add_search_filter(filter)
|
88
89
|
tag.div class: 'filter-search mr-3' do
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
end)
|
96
|
-
end
|
97
|
-
end
|
90
|
+
concat(content_tag(:div, class: 'input-group input-group-sm') do
|
91
|
+
concat(content_tag(:span, class: 'input-group-text') do
|
92
|
+
tag.i class: 'fa fa-search'
|
93
|
+
end)
|
94
|
+
concat tag.input type: 'string', class: 'form-control', value: "#{params.dig(:filters, :search)}", placeholder: "#{filter.placeholder}", data: {behaviour: 'input-search'}
|
95
|
+
end)
|
98
96
|
end
|
99
97
|
end
|
100
98
|
|
@@ -90,14 +90,14 @@ module CmAdmin
|
|
90
90
|
|
91
91
|
def cm_single_file_upload_field(form_obj, cm_field, _value, required_class, _target_action)
|
92
92
|
content_tag(:div) do
|
93
|
-
concat form_obj.file_field cm_field.field_name, class: "
|
93
|
+
concat form_obj.file_field cm_field.field_name, class: "form-control #{required_class}"
|
94
94
|
concat attachment_list(form_obj, cm_field, _value, required_class, _target_action)
|
95
95
|
end
|
96
96
|
end
|
97
97
|
|
98
98
|
def cm_multi_file_upload_field(form_obj, cm_field, _value, required_class, _target_action)
|
99
99
|
content_tag(:div) do
|
100
|
-
concat form_obj.file_field cm_field.field_name, multiple: true, class: "
|
100
|
+
concat form_obj.file_field cm_field.field_name, multiple: true, class: "form-control #{required_class}"
|
101
101
|
concat attachment_list(form_obj, cm_field, _value, required_class, _target_action)
|
102
102
|
end
|
103
103
|
end
|
@@ -117,8 +117,10 @@ module CmAdmin
|
|
117
117
|
|
118
118
|
def attachment_with_icon(attachment)
|
119
119
|
content_tag(:div, class: 'destroy-attachment', data: { ar_id: attachment.id}) do
|
120
|
-
concat
|
121
|
-
|
120
|
+
concat(content_tag(:button, '', class: 'btn-ghost') do
|
121
|
+
concat tag.i(class: 'fa-regular fa-trash-can')
|
122
|
+
end)
|
123
|
+
concat content_tag(:span, attachment.filename.to_s, class: 'btn-link')
|
122
124
|
end
|
123
125
|
end
|
124
126
|
|
@@ -42,6 +42,8 @@ module CmAdmin
|
|
42
42
|
if entity.class == CmAdmin::Models::Row
|
43
43
|
concat create_rows(resource, form_obj, entity)
|
44
44
|
elsif entity.class == CmAdmin::Models::Section
|
45
|
+
next unless entity.display_if.call(form_obj.object)
|
46
|
+
|
45
47
|
concat(content_tag(:div, class: 'row') do
|
46
48
|
concat create_sections(resource, form_obj, entity)
|
47
49
|
end)
|
@@ -53,6 +55,8 @@ module CmAdmin
|
|
53
55
|
def create_rows(resource, form_obj, row)
|
54
56
|
content_tag :div, class: 'row' do
|
55
57
|
row.sections.each do |section|
|
58
|
+
next unless section.display_if.call(form_obj.object)
|
59
|
+
|
56
60
|
concat create_sections(resource, form_obj, section)
|
57
61
|
end
|
58
62
|
end
|
@@ -23,25 +23,6 @@ module CmAdmin
|
|
23
23
|
end
|
24
24
|
end
|
25
25
|
|
26
|
-
def action_description
|
27
|
-
show_action = CmAdmin::Models::Action.find_by(@model, name: 'show')
|
28
|
-
if @model.current_action.page_description
|
29
|
-
title = @model.current_action.page_description
|
30
|
-
elsif show_action.page_description
|
31
|
-
title = show_action.page_description
|
32
|
-
else
|
33
|
-
title = "#{@model.name}"
|
34
|
-
case action_name
|
35
|
-
when 'index'
|
36
|
-
title + " list record"
|
37
|
-
when 'new'
|
38
|
-
title + " new record"
|
39
|
-
when 'edit'
|
40
|
-
title + " edit record"
|
41
|
-
end
|
42
|
-
end
|
43
|
-
end
|
44
|
-
|
45
26
|
def page_url(action_name=@action.name, ar_object=nil)
|
46
27
|
base_path = CmAdmin::Engine.mount_path + '/' + @model.name.downcase.pluralize
|
47
28
|
case action_name
|
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.1
|
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-09-
|
13
|
+
date: 2023-09-25 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: rails
|