cm-admin 1.1.9 → 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.
Files changed (150) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile.lock +1 -1
  3. data/app/assets/javascripts/cm_admin/scaffolds.js +6 -0
  4. data/app/assets/javascripts/cm_admin/shared_scaffolds.js +97 -81
  5. data/app/assets/stylesheets/cm_admin/base/form.scss +36 -225
  6. data/app/assets/stylesheets/cm_admin/base/navbar.scss +2 -2
  7. data/app/assets/stylesheets/cm_admin/base/scaffold.scss +8 -5
  8. data/app/assets/stylesheets/cm_admin/base/show.scss +15 -22
  9. data/app/assets/stylesheets/cm_admin/base/table.scss +24 -46
  10. data/app/assets/stylesheets/cm_admin/components/_buttons.scss +15 -13
  11. data/app/assets/stylesheets/cm_admin/components/_input.scss +0 -24
  12. data/app/assets/stylesheets/cm_admin/components/_modal.scss +7 -30
  13. data/app/assets/stylesheets/cm_admin/components/_status-tag.scss +37 -9
  14. data/app/assets/stylesheets/cm_admin/dependency/bootstrap/scss/_accordion.scss +158 -0
  15. data/app/assets/stylesheets/cm_admin/dependency/bootstrap/scss/_alert.scss +68 -0
  16. data/app/assets/stylesheets/cm_admin/dependency/bootstrap/scss/_badge.scss +38 -0
  17. data/app/assets/stylesheets/cm_admin/dependency/bootstrap/scss/_breadcrumb.scss +40 -0
  18. data/app/assets/stylesheets/cm_admin/dependency/bootstrap/scss/_button-group.scss +142 -0
  19. data/app/assets/stylesheets/cm_admin/dependency/bootstrap/scss/_buttons.scss +207 -0
  20. data/app/assets/stylesheets/cm_admin/dependency/bootstrap/scss/_card.scss +239 -0
  21. data/app/assets/stylesheets/cm_admin/dependency/bootstrap/scss/_carousel.scss +244 -0
  22. data/app/assets/stylesheets/cm_admin/dependency/bootstrap/scss/_close.scss +63 -0
  23. data/app/assets/stylesheets/cm_admin/dependency/bootstrap/scss/_containers.scss +41 -0
  24. data/app/assets/stylesheets/cm_admin/dependency/bootstrap/scss/_dropdown.scss +250 -0
  25. data/app/assets/stylesheets/cm_admin/dependency/bootstrap/scss/_forms.scss +9 -0
  26. data/app/assets/stylesheets/cm_admin/dependency/bootstrap/scss/_functions.scss +302 -0
  27. data/app/assets/stylesheets/cm_admin/dependency/bootstrap/scss/_grid.scss +39 -0
  28. data/app/assets/stylesheets/cm_admin/dependency/bootstrap/scss/_helpers.scss +12 -0
  29. data/app/assets/stylesheets/cm_admin/dependency/bootstrap/scss/_images.scss +42 -0
  30. data/app/assets/stylesheets/cm_admin/dependency/bootstrap/scss/_list-group.scss +197 -0
  31. data/app/assets/stylesheets/cm_admin/dependency/bootstrap/scss/_maps.scss +174 -0
  32. data/app/assets/stylesheets/cm_admin/dependency/bootstrap/scss/_mixins.scss +42 -0
  33. data/app/assets/stylesheets/cm_admin/dependency/bootstrap/scss/_modal.scss +237 -0
  34. data/app/assets/stylesheets/cm_admin/dependency/bootstrap/scss/_nav.scss +197 -0
  35. data/app/assets/stylesheets/cm_admin/dependency/bootstrap/scss/_navbar.scss +289 -0
  36. data/app/assets/stylesheets/cm_admin/dependency/bootstrap/scss/_offcanvas.scss +146 -0
  37. data/app/assets/stylesheets/cm_admin/dependency/bootstrap/scss/_pagination.scss +109 -0
  38. data/app/assets/stylesheets/cm_admin/dependency/bootstrap/scss/_placeholders.scss +51 -0
  39. data/app/assets/stylesheets/cm_admin/dependency/bootstrap/scss/_popover.scss +196 -0
  40. data/app/assets/stylesheets/cm_admin/dependency/bootstrap/scss/_progress.scss +68 -0
  41. data/app/assets/stylesheets/cm_admin/dependency/bootstrap/scss/_reboot.scss +610 -0
  42. data/app/assets/stylesheets/cm_admin/dependency/bootstrap/scss/_root.scss +184 -0
  43. data/app/assets/stylesheets/cm_admin/dependency/bootstrap/scss/_spinners.scss +85 -0
  44. data/app/assets/stylesheets/cm_admin/dependency/bootstrap/scss/_tables.scss +171 -0
  45. data/app/assets/stylesheets/cm_admin/dependency/bootstrap/scss/_toasts.scss +73 -0
  46. data/app/assets/stylesheets/cm_admin/dependency/bootstrap/scss/_tooltip.scss +119 -0
  47. data/app/assets/stylesheets/cm_admin/dependency/bootstrap/scss/_transitions.scss +27 -0
  48. data/app/assets/stylesheets/cm_admin/dependency/bootstrap/scss/_type.scss +106 -0
  49. data/app/assets/stylesheets/cm_admin/dependency/bootstrap/scss/_utilities.scss +806 -0
  50. data/app/assets/stylesheets/cm_admin/dependency/bootstrap/scss/_variables-dark.scss +85 -0
  51. data/app/assets/stylesheets/cm_admin/dependency/bootstrap/scss/_variables.scss +1745 -0
  52. data/app/assets/stylesheets/cm_admin/dependency/bootstrap/scss/bootstrap-grid.scss +62 -0
  53. data/app/assets/stylesheets/cm_admin/dependency/bootstrap/scss/bootstrap-reboot.scss +10 -0
  54. data/app/assets/stylesheets/cm_admin/dependency/bootstrap/scss/bootstrap-utilities.scss +19 -0
  55. data/app/assets/stylesheets/cm_admin/dependency/bootstrap/scss/bootstrap.scss +52 -0
  56. data/app/assets/stylesheets/cm_admin/dependency/bootstrap/scss/forms/_floating-labels.scss +95 -0
  57. data/app/assets/stylesheets/cm_admin/dependency/bootstrap/scss/forms/_form-check.scss +188 -0
  58. data/app/assets/stylesheets/cm_admin/dependency/bootstrap/scss/forms/_form-control.scss +214 -0
  59. data/app/assets/stylesheets/cm_admin/dependency/bootstrap/scss/forms/_form-range.scss +91 -0
  60. data/app/assets/stylesheets/cm_admin/dependency/bootstrap/scss/forms/_form-select.scss +80 -0
  61. data/app/assets/stylesheets/cm_admin/dependency/bootstrap/scss/forms/_form-text.scss +11 -0
  62. data/app/assets/stylesheets/cm_admin/dependency/bootstrap/scss/forms/_input-group.scss +132 -0
  63. data/app/assets/stylesheets/cm_admin/dependency/bootstrap/scss/forms/_labels.scss +36 -0
  64. data/app/assets/stylesheets/cm_admin/dependency/bootstrap/scss/forms/_validation.scss +12 -0
  65. data/app/assets/stylesheets/cm_admin/dependency/bootstrap/scss/helpers/_clearfix.scss +3 -0
  66. data/app/assets/stylesheets/cm_admin/dependency/bootstrap/scss/helpers/_color-bg.scss +7 -0
  67. data/app/assets/stylesheets/cm_admin/dependency/bootstrap/scss/helpers/_colored-links.scss +30 -0
  68. data/app/assets/stylesheets/cm_admin/dependency/bootstrap/scss/helpers/_focus-ring.scss +5 -0
  69. data/app/assets/stylesheets/cm_admin/dependency/bootstrap/scss/helpers/_icon-link.scss +25 -0
  70. data/app/assets/stylesheets/cm_admin/dependency/bootstrap/scss/helpers/_position.scss +36 -0
  71. data/app/assets/stylesheets/cm_admin/dependency/bootstrap/scss/helpers/_ratio.scss +26 -0
  72. data/app/assets/stylesheets/cm_admin/dependency/bootstrap/scss/helpers/_stacks.scss +15 -0
  73. data/app/assets/stylesheets/cm_admin/dependency/bootstrap/scss/helpers/_stretched-link.scss +15 -0
  74. data/app/assets/stylesheets/cm_admin/dependency/bootstrap/scss/helpers/_text-truncation.scss +7 -0
  75. data/app/assets/stylesheets/cm_admin/dependency/bootstrap/scss/helpers/_visually-hidden.scss +8 -0
  76. data/app/assets/stylesheets/cm_admin/dependency/bootstrap/scss/helpers/_vr.scss +8 -0
  77. data/app/assets/stylesheets/cm_admin/dependency/bootstrap/scss/mixins/_alert.scss +18 -0
  78. data/app/assets/stylesheets/cm_admin/dependency/bootstrap/scss/mixins/_backdrop.scss +14 -0
  79. data/app/assets/stylesheets/cm_admin/dependency/bootstrap/scss/mixins/_banner.scss +7 -0
  80. data/app/assets/stylesheets/cm_admin/dependency/bootstrap/scss/mixins/_border-radius.scss +78 -0
  81. data/app/assets/stylesheets/cm_admin/dependency/bootstrap/scss/mixins/_box-shadow.scss +18 -0
  82. data/app/assets/stylesheets/cm_admin/dependency/bootstrap/scss/mixins/_breakpoints.scss +127 -0
  83. data/app/assets/stylesheets/cm_admin/dependency/bootstrap/scss/mixins/_buttons.scss +70 -0
  84. data/app/assets/stylesheets/cm_admin/dependency/bootstrap/scss/mixins/_caret.scss +69 -0
  85. data/app/assets/stylesheets/cm_admin/dependency/bootstrap/scss/mixins/_clearfix.scss +9 -0
  86. data/app/assets/stylesheets/cm_admin/dependency/bootstrap/scss/mixins/_color-mode.scss +21 -0
  87. data/app/assets/stylesheets/cm_admin/dependency/bootstrap/scss/mixins/_color-scheme.scss +7 -0
  88. data/app/assets/stylesheets/cm_admin/dependency/bootstrap/scss/mixins/_container.scss +11 -0
  89. data/app/assets/stylesheets/cm_admin/dependency/bootstrap/scss/mixins/_deprecate.scss +10 -0
  90. data/app/assets/stylesheets/cm_admin/dependency/bootstrap/scss/mixins/_forms.scss +153 -0
  91. data/app/assets/stylesheets/cm_admin/dependency/bootstrap/scss/mixins/_gradients.scss +47 -0
  92. data/app/assets/stylesheets/cm_admin/dependency/bootstrap/scss/mixins/_grid.scss +151 -0
  93. data/app/assets/stylesheets/cm_admin/dependency/bootstrap/scss/mixins/_image.scss +16 -0
  94. data/app/assets/stylesheets/cm_admin/dependency/bootstrap/scss/mixins/_list-group.scss +26 -0
  95. data/app/assets/stylesheets/cm_admin/dependency/bootstrap/scss/mixins/_lists.scss +7 -0
  96. data/app/assets/stylesheets/cm_admin/dependency/bootstrap/scss/mixins/_pagination.scss +10 -0
  97. data/app/assets/stylesheets/cm_admin/dependency/bootstrap/scss/mixins/_reset-text.scss +17 -0
  98. data/app/assets/stylesheets/cm_admin/dependency/bootstrap/scss/mixins/_resize.scss +6 -0
  99. data/app/assets/stylesheets/cm_admin/dependency/bootstrap/scss/mixins/_table-variants.scss +24 -0
  100. data/app/assets/stylesheets/cm_admin/dependency/bootstrap/scss/mixins/_text-truncate.scss +8 -0
  101. data/app/assets/stylesheets/cm_admin/dependency/bootstrap/scss/mixins/_transition.scss +26 -0
  102. data/app/assets/stylesheets/cm_admin/dependency/bootstrap/scss/mixins/_utilities.scss +97 -0
  103. data/app/assets/stylesheets/cm_admin/dependency/bootstrap/scss/mixins/_visually-hidden.scss +33 -0
  104. data/app/assets/stylesheets/cm_admin/dependency/bootstrap/scss/tests/jasmine.js +16 -0
  105. data/app/assets/stylesheets/cm_admin/dependency/bootstrap/scss/tests/mixins/_color-modes.test.scss +69 -0
  106. data/app/assets/stylesheets/cm_admin/dependency/bootstrap/scss/tests/mixins/_media-query-color-mode-full.test.scss +8 -0
  107. data/app/assets/stylesheets/cm_admin/dependency/bootstrap/scss/tests/mixins/_utilities.test.scss +393 -0
  108. data/app/assets/stylesheets/cm_admin/dependency/bootstrap/scss/tests/sass-true/register.js +14 -0
  109. data/app/assets/stylesheets/cm_admin/dependency/bootstrap/scss/tests/sass-true/runner.js +17 -0
  110. data/app/assets/stylesheets/cm_admin/dependency/bootstrap/scss/tests/utilities/_api.test.scss +75 -0
  111. data/app/assets/stylesheets/cm_admin/dependency/bootstrap/scss/utilities/_api.scss +47 -0
  112. data/app/assets/stylesheets/cm_admin/dependency/bootstrap/scss/vendor/_rfs.scss +348 -0
  113. data/app/controllers/cm_admin/resource_controller.rb +22 -5
  114. data/app/helpers/cm_admin/application_helper.rb +4 -4
  115. data/app/views/cm_admin/main/_actions_dropdown.html.slim +2 -2
  116. data/app/views/cm_admin/main/_cm_pagy_nav.html.slim +7 -7
  117. data/app/views/cm_admin/main/_custom_action_modal_form.html.slim +6 -0
  118. data/app/views/cm_admin/main/_nested_fields.html.slim +7 -27
  119. data/app/views/cm_admin/main/_nested_table_form.html.slim +17 -8
  120. data/app/views/cm_admin/main/_nested_table_section.html.slim +17 -0
  121. data/app/views/cm_admin/main/_show_section.html.slim +10 -0
  122. data/app/views/cm_admin/main/_table.html.slim +3 -4
  123. data/app/views/cm_admin/main/_tabs.html.slim +1 -1
  124. data/app/views/cm_admin/main/_top_navbar.html.slim +11 -4
  125. data/app/views/cm_admin/main/associated_show.html.slim +5 -4
  126. data/app/views/cm_admin/main/edit.html.slim +18 -18
  127. data/app/views/cm_admin/main/history.html.slim +3 -3
  128. data/app/views/cm_admin/main/import_form.html.slim +1 -1
  129. data/app/views/cm_admin/main/new.html.slim +17 -17
  130. data/app/views/cm_admin/main/show.html.slim +10 -10
  131. data/app/views/layouts/_custom_action_modal.html.slim +11 -0
  132. data/app/views/layouts/_custom_action_modals.html.slim +13 -9
  133. data/app/views/layouts/_destroy_action_modal.html.slim +16 -0
  134. data/app/views/layouts/cm_admin.html.slim +5 -5
  135. data/config/routes.rb +1 -3
  136. data/lib/cm_admin/model.rb +1 -0
  137. data/lib/cm_admin/models/custom_action.rb +6 -0
  138. data/lib/cm_admin/models/dsl_method.rb +9 -4
  139. data/lib/cm_admin/models/field.rb +2 -1
  140. data/lib/cm_admin/models/form_field.rb +2 -1
  141. data/lib/cm_admin/models/row.rb +40 -0
  142. data/lib/cm_admin/models/section.rb +20 -3
  143. data/lib/cm_admin/version.rb +1 -1
  144. data/lib/cm_admin/view_helpers/field_display_helper.rb +3 -3
  145. data/lib/cm_admin/view_helpers/filter_helper.rb +9 -11
  146. data/lib/cm_admin/view_helpers/form_field_helper.rb +42 -14
  147. data/lib/cm_admin/view_helpers/form_helper.rb +63 -22
  148. data/lib/cm_admin/view_helpers/page_info_helper.rb +4 -23
  149. data/lib/cm_admin/view_helpers.rb +1 -1
  150. metadata +107 -2
@@ -28,48 +28,89 @@ module CmAdmin
28
28
  set_form_for_fields(resource, columns, url, method)
29
29
  end
30
30
 
31
- def form_with_mentioned_fields(resource, sections_array, method)
31
+ def form_with_mentioned_fields(resource, entities, method)
32
32
  # columns = resource.class.columns.select { |i| available_fields.map(&:field_name).include?(i.name.to_sym) }
33
33
  table_name = resource.model_name.collection
34
34
  # columns.reject! { |i| REJECTABLE.include?(i.name) }
35
35
  url = CmAdmin::Engine.mount_path + "/#{table_name}/#{resource.id}"
36
- set_form_with_sections(resource, sections_array, url, method)
36
+ set_form_with_sections(resource, entities, url, method)
37
37
  end
38
38
 
39
- def split_form_into_section(resource, form_obj, sections_array)
39
+ def split_form_into_section(resource, form_obj, entities)
40
40
  content_tag :div do
41
- sections_array.each do |section|
41
+ entities.each do |entity|
42
+ if entity.class == CmAdmin::Models::Row
43
+ concat create_rows(resource, form_obj, entity)
44
+ elsif entity.class == CmAdmin::Models::Section
45
+ next unless entity.display_if.call(form_obj.object)
46
+
47
+ concat(content_tag(:div, class: 'row') do
48
+ concat create_sections(resource, form_obj, entity)
49
+ end)
50
+ end
51
+ end
52
+ end
53
+ end
54
+
55
+ def create_rows(resource, form_obj, row)
56
+ content_tag :div, class: 'row' do
57
+ row.sections.each do |section|
58
+ next unless section.display_if.call(form_obj.object)
59
+
42
60
  concat create_sections(resource, form_obj, section)
43
61
  end
44
62
  end
45
63
  end
46
64
 
47
65
  def create_sections(resource, form_obj, section)
48
- content_tag :div, class: 'form-container' do
66
+ content_tag :div, class: 'col form-container' do
49
67
  concat content_tag(:p, section.section_name, class: 'form-title')
50
68
  concat set_form_for_fields(resource, form_obj, section)
51
69
  end
52
70
  end
53
71
 
72
+ def create_row_inside_section(resource, form_obj, rows)
73
+ rows.each do |row|
74
+ concat(content_tag(:div, class: 'row') do
75
+ row.row_fields.each do |field|
76
+ concat set_form_field(resource, form_obj, field)
77
+ end
78
+ end)
79
+ end
80
+ return
81
+ end
82
+
54
83
  def set_form_for_fields(resource, form_obj, section)
55
84
  content_tag(:div, class: 'form-container__inner') do
56
- section.section_fields.each do |field|
57
- next unless field.display_if.call(form_obj.object)
85
+ concat create_row_inside_section(resource, form_obj, section.rows) if section.rows.present?
86
+ concat set_form_fields(resource, form_obj, section.section_fields)
87
+ concat set_nested_form_fields(form_obj, section)
88
+ end
89
+ end
58
90
 
59
- if field.input_type.eql?(:hidden)
91
+ def set_form_fields(resource, form_obj, fields)
92
+ fields.each do |field|
93
+ concat(content_tag(:div, class: 'row') do
94
+ concat set_form_field(resource, form_obj, field)
95
+ end)
96
+ end
97
+ return
98
+ end
99
+
100
+ def set_form_field(resource, form_obj, field)
101
+ content_tag(:div, class: field.col_size ? "col-#{field.col_size}" : 'col') do
102
+ next unless field.display_if.call(form_obj.object)
103
+
104
+ if field.input_type.eql?(:hidden)
105
+ concat input_field_for_column(form_obj, field)
106
+ else
107
+ concat(content_tag(:div, class: "form-field #{field.disabled ? 'disabled' : ''}") do
108
+ concat form_obj.label field.label, field.label, class: 'field-label'
109
+ concat tag.br
60
110
  concat input_field_for_column(form_obj, field)
61
- else
62
- concat(content_tag(:div, class: "input-wrapper #{field.disabled ? 'disabled' : ''}") do
63
- concat form_obj.label field.label, field.label, class: 'field-label'
64
- concat tag.br
65
- concat(content_tag(:div, class: 'datetime-wrapper') do
66
- concat input_field_for_column(form_obj, field)
67
- end)
68
- concat tag.p resource.errors[field.field_name].first if resource.errors[field.field_name].present?
69
- end)
70
- end
111
+ concat tag.p resource.errors[field.field_name].first if resource.errors[field.field_name].present?
112
+ end)
71
113
  end
72
- concat set_nested_form_fields(form_obj, section)
73
114
  end
74
115
  end
75
116
 
@@ -81,7 +122,7 @@ module CmAdmin
81
122
  end
82
123
  end
83
124
 
84
- def set_form_with_sections(resource, sections_array, url, method)
125
+ def set_form_with_sections(resource, entities, url, method)
85
126
  form_for(resource, url: url, method: method, html: { class: "cm_#{resource.class.name.downcase}_form" } ) do |form_obj|
86
127
  if params[:referrer]
87
128
  concat form_obj.text_field "referrer", class: "normal-input", hidden: true, value: params[:referrer], name: 'referrer'
@@ -92,10 +133,10 @@ module CmAdmin
92
133
  elsif params[:associated_class] && params[:associated_id]
93
134
  concat form_obj.text_field params[:associated_class] + '_id', class: "normal-input", hidden: true, value: params[:associated_id]
94
135
  end
95
- concat split_form_into_section(resource, form_obj, sections_array)
136
+ concat split_form_into_section(resource, form_obj, entities)
96
137
  concat tag.br
97
138
  # TODO: form_submit class is used for JS functionality, Have to remove
98
- concat form_obj.submit 'Save', class: 'btn-cta mt-3 form_submit', data: {form_class: "cm_#{form_obj.object.class.name.downcase}_form"}
139
+ concat form_obj.submit 'Save', class: 'btn-cta form_submit', data: {form_class: "cm_#{form_obj.object.class.name.downcase}_form"}
99
140
  end
100
141
  end
101
142
  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
@@ -67,7 +48,7 @@ module CmAdmin
67
48
  when :modal
68
49
  custom_modal_button(custom_action)
69
50
  when :page
70
- link_to custom_action_title(custom_action), "#{@model.ar_model.table_name}/#{custom_action.path}", class: 'btn-secondary ml-2', method: custom_action.verb
51
+ link_to custom_action_title(custom_action), "#{@model.ar_model.table_name}/#{custom_action.path}", class: 'btn-secondary ms-2', method: custom_action.verb
71
52
  end
72
53
  end
73
54
  end
@@ -83,14 +64,14 @@ module CmAdmin
83
64
 
84
65
  def custom_action_button(custom_action, current_action_name)
85
66
  if current_action_name == "index"
86
- button_to custom_action_title(custom_action), @model.ar_model.table_name + '/' + custom_action.path, class: 'btn-secondary ml-2', method: custom_action.verb
67
+ button_to custom_action_title(custom_action), @model.ar_model.table_name + '/' + custom_action.path, class: 'btn-secondary ms-2', method: custom_action.verb
87
68
  elsif current_action_name == "show"
88
- button_to custom_action_title(custom_action), custom_action.path.gsub(':id', params[:id]), class: 'btn-secondary ml-2', method: custom_action.verb
69
+ button_to custom_action_title(custom_action), custom_action.path.gsub(':id', params[:id]), class: 'btn-secondary ms-2', method: custom_action.verb
89
70
  end
90
71
  end
91
72
 
92
73
  def custom_modal_button(custom_action)
93
- link_to custom_action_title(custom_action), '', class: 'btn-secondary ml-2', data: { bs_toggle: "modal", bs_target: "##{custom_action.name.classify}Modal" }
74
+ link_to custom_action_title(custom_action), '', class: 'btn-secondary ms-2', data: { bs_toggle: "modal", bs_target: "##{custom_action.name.classify}Modal-#{@ar_object.id}" }
94
75
  end
95
76
 
96
77
  def custom_action_title(custom_action)
@@ -15,7 +15,7 @@ module CmAdmin
15
15
  include ActionView::Helpers::TagHelper
16
16
 
17
17
  def exportable(_klass, html_class: [])
18
- tag.a 'Export as excel', class: html_class.append('filter-btn modal-btn mr-2'), data: { toggle: 'modal', target: '#exportmodal' } do
18
+ tag.a 'Export as excel', class: html_class.append('filter-btn modal-btn me-2'), data: { toggle: 'modal', target: '#exportmodal' } do
19
19
  concat tag.i class: 'fa fa-download'
20
20
  concat tag.span ' Export'
21
21
  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.9
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-08-29 00:00:00.000000000 Z
13
+ date: 2023-09-25 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: rails
@@ -223,6 +223,105 @@ files:
223
223
  - app/assets/stylesheets/cm_admin/components/_status-tag.scss
224
224
  - app/assets/stylesheets/cm_admin/components/index.scss
225
225
  - app/assets/stylesheets/cm_admin/dependency/bootstrap.min.css
226
+ - app/assets/stylesheets/cm_admin/dependency/bootstrap/scss/_accordion.scss
227
+ - app/assets/stylesheets/cm_admin/dependency/bootstrap/scss/_alert.scss
228
+ - app/assets/stylesheets/cm_admin/dependency/bootstrap/scss/_badge.scss
229
+ - app/assets/stylesheets/cm_admin/dependency/bootstrap/scss/_breadcrumb.scss
230
+ - app/assets/stylesheets/cm_admin/dependency/bootstrap/scss/_button-group.scss
231
+ - app/assets/stylesheets/cm_admin/dependency/bootstrap/scss/_buttons.scss
232
+ - app/assets/stylesheets/cm_admin/dependency/bootstrap/scss/_card.scss
233
+ - app/assets/stylesheets/cm_admin/dependency/bootstrap/scss/_carousel.scss
234
+ - app/assets/stylesheets/cm_admin/dependency/bootstrap/scss/_close.scss
235
+ - app/assets/stylesheets/cm_admin/dependency/bootstrap/scss/_containers.scss
236
+ - app/assets/stylesheets/cm_admin/dependency/bootstrap/scss/_dropdown.scss
237
+ - app/assets/stylesheets/cm_admin/dependency/bootstrap/scss/_forms.scss
238
+ - app/assets/stylesheets/cm_admin/dependency/bootstrap/scss/_functions.scss
239
+ - app/assets/stylesheets/cm_admin/dependency/bootstrap/scss/_grid.scss
240
+ - app/assets/stylesheets/cm_admin/dependency/bootstrap/scss/_helpers.scss
241
+ - app/assets/stylesheets/cm_admin/dependency/bootstrap/scss/_images.scss
242
+ - app/assets/stylesheets/cm_admin/dependency/bootstrap/scss/_list-group.scss
243
+ - app/assets/stylesheets/cm_admin/dependency/bootstrap/scss/_maps.scss
244
+ - app/assets/stylesheets/cm_admin/dependency/bootstrap/scss/_mixins.scss
245
+ - app/assets/stylesheets/cm_admin/dependency/bootstrap/scss/_modal.scss
246
+ - app/assets/stylesheets/cm_admin/dependency/bootstrap/scss/_nav.scss
247
+ - app/assets/stylesheets/cm_admin/dependency/bootstrap/scss/_navbar.scss
248
+ - app/assets/stylesheets/cm_admin/dependency/bootstrap/scss/_offcanvas.scss
249
+ - app/assets/stylesheets/cm_admin/dependency/bootstrap/scss/_pagination.scss
250
+ - app/assets/stylesheets/cm_admin/dependency/bootstrap/scss/_placeholders.scss
251
+ - app/assets/stylesheets/cm_admin/dependency/bootstrap/scss/_popover.scss
252
+ - app/assets/stylesheets/cm_admin/dependency/bootstrap/scss/_progress.scss
253
+ - app/assets/stylesheets/cm_admin/dependency/bootstrap/scss/_reboot.scss
254
+ - app/assets/stylesheets/cm_admin/dependency/bootstrap/scss/_root.scss
255
+ - app/assets/stylesheets/cm_admin/dependency/bootstrap/scss/_spinners.scss
256
+ - app/assets/stylesheets/cm_admin/dependency/bootstrap/scss/_tables.scss
257
+ - app/assets/stylesheets/cm_admin/dependency/bootstrap/scss/_toasts.scss
258
+ - app/assets/stylesheets/cm_admin/dependency/bootstrap/scss/_tooltip.scss
259
+ - app/assets/stylesheets/cm_admin/dependency/bootstrap/scss/_transitions.scss
260
+ - app/assets/stylesheets/cm_admin/dependency/bootstrap/scss/_type.scss
261
+ - app/assets/stylesheets/cm_admin/dependency/bootstrap/scss/_utilities.scss
262
+ - app/assets/stylesheets/cm_admin/dependency/bootstrap/scss/_variables-dark.scss
263
+ - app/assets/stylesheets/cm_admin/dependency/bootstrap/scss/_variables.scss
264
+ - app/assets/stylesheets/cm_admin/dependency/bootstrap/scss/bootstrap-grid.scss
265
+ - app/assets/stylesheets/cm_admin/dependency/bootstrap/scss/bootstrap-reboot.scss
266
+ - app/assets/stylesheets/cm_admin/dependency/bootstrap/scss/bootstrap-utilities.scss
267
+ - app/assets/stylesheets/cm_admin/dependency/bootstrap/scss/bootstrap.scss
268
+ - app/assets/stylesheets/cm_admin/dependency/bootstrap/scss/forms/_floating-labels.scss
269
+ - app/assets/stylesheets/cm_admin/dependency/bootstrap/scss/forms/_form-check.scss
270
+ - app/assets/stylesheets/cm_admin/dependency/bootstrap/scss/forms/_form-control.scss
271
+ - app/assets/stylesheets/cm_admin/dependency/bootstrap/scss/forms/_form-range.scss
272
+ - app/assets/stylesheets/cm_admin/dependency/bootstrap/scss/forms/_form-select.scss
273
+ - app/assets/stylesheets/cm_admin/dependency/bootstrap/scss/forms/_form-text.scss
274
+ - app/assets/stylesheets/cm_admin/dependency/bootstrap/scss/forms/_input-group.scss
275
+ - app/assets/stylesheets/cm_admin/dependency/bootstrap/scss/forms/_labels.scss
276
+ - app/assets/stylesheets/cm_admin/dependency/bootstrap/scss/forms/_validation.scss
277
+ - app/assets/stylesheets/cm_admin/dependency/bootstrap/scss/helpers/_clearfix.scss
278
+ - app/assets/stylesheets/cm_admin/dependency/bootstrap/scss/helpers/_color-bg.scss
279
+ - app/assets/stylesheets/cm_admin/dependency/bootstrap/scss/helpers/_colored-links.scss
280
+ - app/assets/stylesheets/cm_admin/dependency/bootstrap/scss/helpers/_focus-ring.scss
281
+ - app/assets/stylesheets/cm_admin/dependency/bootstrap/scss/helpers/_icon-link.scss
282
+ - app/assets/stylesheets/cm_admin/dependency/bootstrap/scss/helpers/_position.scss
283
+ - app/assets/stylesheets/cm_admin/dependency/bootstrap/scss/helpers/_ratio.scss
284
+ - app/assets/stylesheets/cm_admin/dependency/bootstrap/scss/helpers/_stacks.scss
285
+ - app/assets/stylesheets/cm_admin/dependency/bootstrap/scss/helpers/_stretched-link.scss
286
+ - app/assets/stylesheets/cm_admin/dependency/bootstrap/scss/helpers/_text-truncation.scss
287
+ - app/assets/stylesheets/cm_admin/dependency/bootstrap/scss/helpers/_visually-hidden.scss
288
+ - app/assets/stylesheets/cm_admin/dependency/bootstrap/scss/helpers/_vr.scss
289
+ - app/assets/stylesheets/cm_admin/dependency/bootstrap/scss/mixins/_alert.scss
290
+ - app/assets/stylesheets/cm_admin/dependency/bootstrap/scss/mixins/_backdrop.scss
291
+ - app/assets/stylesheets/cm_admin/dependency/bootstrap/scss/mixins/_banner.scss
292
+ - app/assets/stylesheets/cm_admin/dependency/bootstrap/scss/mixins/_border-radius.scss
293
+ - app/assets/stylesheets/cm_admin/dependency/bootstrap/scss/mixins/_box-shadow.scss
294
+ - app/assets/stylesheets/cm_admin/dependency/bootstrap/scss/mixins/_breakpoints.scss
295
+ - app/assets/stylesheets/cm_admin/dependency/bootstrap/scss/mixins/_buttons.scss
296
+ - app/assets/stylesheets/cm_admin/dependency/bootstrap/scss/mixins/_caret.scss
297
+ - app/assets/stylesheets/cm_admin/dependency/bootstrap/scss/mixins/_clearfix.scss
298
+ - app/assets/stylesheets/cm_admin/dependency/bootstrap/scss/mixins/_color-mode.scss
299
+ - app/assets/stylesheets/cm_admin/dependency/bootstrap/scss/mixins/_color-scheme.scss
300
+ - app/assets/stylesheets/cm_admin/dependency/bootstrap/scss/mixins/_container.scss
301
+ - app/assets/stylesheets/cm_admin/dependency/bootstrap/scss/mixins/_deprecate.scss
302
+ - app/assets/stylesheets/cm_admin/dependency/bootstrap/scss/mixins/_forms.scss
303
+ - app/assets/stylesheets/cm_admin/dependency/bootstrap/scss/mixins/_gradients.scss
304
+ - app/assets/stylesheets/cm_admin/dependency/bootstrap/scss/mixins/_grid.scss
305
+ - app/assets/stylesheets/cm_admin/dependency/bootstrap/scss/mixins/_image.scss
306
+ - app/assets/stylesheets/cm_admin/dependency/bootstrap/scss/mixins/_list-group.scss
307
+ - app/assets/stylesheets/cm_admin/dependency/bootstrap/scss/mixins/_lists.scss
308
+ - app/assets/stylesheets/cm_admin/dependency/bootstrap/scss/mixins/_pagination.scss
309
+ - app/assets/stylesheets/cm_admin/dependency/bootstrap/scss/mixins/_reset-text.scss
310
+ - app/assets/stylesheets/cm_admin/dependency/bootstrap/scss/mixins/_resize.scss
311
+ - app/assets/stylesheets/cm_admin/dependency/bootstrap/scss/mixins/_table-variants.scss
312
+ - app/assets/stylesheets/cm_admin/dependency/bootstrap/scss/mixins/_text-truncate.scss
313
+ - app/assets/stylesheets/cm_admin/dependency/bootstrap/scss/mixins/_transition.scss
314
+ - app/assets/stylesheets/cm_admin/dependency/bootstrap/scss/mixins/_utilities.scss
315
+ - app/assets/stylesheets/cm_admin/dependency/bootstrap/scss/mixins/_visually-hidden.scss
316
+ - app/assets/stylesheets/cm_admin/dependency/bootstrap/scss/tests/jasmine.js
317
+ - app/assets/stylesheets/cm_admin/dependency/bootstrap/scss/tests/mixins/_color-modes.test.scss
318
+ - app/assets/stylesheets/cm_admin/dependency/bootstrap/scss/tests/mixins/_media-query-color-mode-full.test.scss
319
+ - app/assets/stylesheets/cm_admin/dependency/bootstrap/scss/tests/mixins/_utilities.test.scss
320
+ - app/assets/stylesheets/cm_admin/dependency/bootstrap/scss/tests/sass-true/register.js
321
+ - app/assets/stylesheets/cm_admin/dependency/bootstrap/scss/tests/sass-true/runner.js
322
+ - app/assets/stylesheets/cm_admin/dependency/bootstrap/scss/tests/utilities/_api.test.scss
323
+ - app/assets/stylesheets/cm_admin/dependency/bootstrap/scss/utilities/_api.scss
324
+ - app/assets/stylesheets/cm_admin/dependency/bootstrap/scss/vendor/_rfs.scss
226
325
  - app/assets/stylesheets/cm_admin/dependency/flatpickr.min.css
227
326
  - app/assets/stylesheets/cm_admin/dependency/fontawesome.all.css
228
327
  - app/assets/stylesheets/cm_admin/dependency/jquery-jgrowl.min.css
@@ -249,11 +348,14 @@ files:
249
348
  - app/views/cm_admin/main/_actions_dropdown.html.slim
250
349
  - app/views/cm_admin/main/_associated_table.html.slim
251
350
  - app/views/cm_admin/main/_cm_pagy_nav.html.slim
351
+ - app/views/cm_admin/main/_custom_action_modal_form.html.slim
252
352
  - app/views/cm_admin/main/_drawer.html.slim
253
353
  - app/views/cm_admin/main/_filters.html.slim
254
354
  - app/views/cm_admin/main/_member_custom_action_modal.html.slim
255
355
  - app/views/cm_admin/main/_nested_fields.html.slim
256
356
  - app/views/cm_admin/main/_nested_table_form.html.slim
357
+ - app/views/cm_admin/main/_nested_table_section.html.slim
358
+ - app/views/cm_admin/main/_show_section.html.slim
257
359
  - app/views/cm_admin/main/_table.html.slim
258
360
  - app/views/cm_admin/main/_tabs.html.slim
259
361
  - app/views/cm_admin/main/_top_navbar.html.slim
@@ -270,7 +372,9 @@ files:
270
372
  - app/views/cm_admin/static/error_401.html.slim
271
373
  - app/views/cm_admin/static/error_403.html.slim
272
374
  - app/views/layouts/_cm_flash_message.html.slim
375
+ - app/views/layouts/_custom_action_modal.html.slim
273
376
  - app/views/layouts/_custom_action_modals.html.slim
377
+ - app/views/layouts/_destroy_action_modal.html.slim
274
378
  - app/views/layouts/_left_sidebar_nav.html.slim
275
379
  - app/views/layouts/_quick_links.html.slim
276
380
  - app/views/layouts/cm_admin.html.slim
@@ -309,6 +413,7 @@ files:
309
413
  - lib/cm_admin/models/filter.rb
310
414
  - lib/cm_admin/models/form_field.rb
311
415
  - lib/cm_admin/models/importer.rb
416
+ - lib/cm_admin/models/row.rb
312
417
  - lib/cm_admin/models/section.rb
313
418
  - lib/cm_admin/models/tab.rb
314
419
  - lib/cm_admin/models/utils/associations.rb