spina-admin-conferences-fork 2.1.1 → 3.0.0.rc3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (133) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +40 -57
  3. data/app/assets/config/spina_admin_conferences_manifest.js +3 -3
  4. data/app/assets/javascripts/spina/admin/conferences/application.js +0 -4
  5. data/app/assets/javascripts/{controllers/spina/admin/conferences → spina/admin/conferences/controllers}/select_options_controller.js +1 -1
  6. data/app/assets/stylesheets/spina/admin/conferences/application.tailwind.css +0 -0
  7. data/app/components/spina/admin/conferences/application_component.rb +11 -0
  8. data/app/components/spina/admin/conferences/form_group_component.html.haml +4 -0
  9. data/app/components/spina/admin/conferences/form_group_component.rb +17 -0
  10. data/app/controllers/spina/admin/conferences/application_controller.rb +8 -1
  11. data/app/controllers/spina/admin/conferences/conferences_controller.rb +13 -25
  12. data/app/controllers/spina/admin/conferences/delegates_controller.rb +12 -24
  13. data/app/controllers/spina/admin/conferences/dietary_requirements_controller.rb +12 -24
  14. data/app/controllers/spina/admin/conferences/institutions_controller.rb +12 -24
  15. data/app/controllers/spina/admin/conferences/presentation_attachment_types_controller.rb +12 -24
  16. data/app/controllers/spina/admin/conferences/presentation_types_controller.rb +12 -26
  17. data/app/controllers/spina/admin/conferences/presentations_controller.rb +12 -24
  18. data/app/controllers/spina/admin/conferences/rooms_controller.rb +12 -26
  19. data/app/controllers/spina/admin/conferences/sessions_controller.rb +12 -26
  20. data/app/jobs/spina/admin/conferences/import_job.rb +2 -2
  21. data/app/models/spina/admin/conferences/conference.rb +1 -1
  22. data/app/models/spina/admin/conferences/delegate.rb +3 -3
  23. data/app/models/spina/admin/conferences/presentation.rb +1 -1
  24. data/app/views/spina/admin/conferences/application/_conferences.html.haml +10 -11
  25. data/app/views/spina/admin/conferences/application/_delegates.html.haml +9 -10
  26. data/app/views/spina/admin/conferences/application/_dietary_requirements.html.haml +7 -8
  27. data/app/views/spina/admin/conferences/application/_empty_list.html.haml +1 -1
  28. data/app/views/spina/admin/conferences/application/_institutions.html.haml +8 -9
  29. data/app/views/spina/admin/conferences/application/_presentation_attachment_types.html.haml +8 -9
  30. data/app/views/spina/admin/conferences/application/_presentation_types.html.haml +9 -10
  31. data/app/views/spina/admin/conferences/application/_presentations.html.haml +9 -10
  32. data/app/views/spina/admin/conferences/application/_rooms.html.haml +9 -10
  33. data/app/views/spina/admin/conferences/application/_sessions.html.haml +9 -10
  34. data/app/views/spina/admin/conferences/conferences/_conference.html.haml +13 -9
  35. data/app/views/spina/admin/conferences/conferences/_event_fields.html.haml +18 -25
  36. data/app/views/spina/admin/conferences/conferences/_form.html.haml +24 -22
  37. data/app/views/spina/admin/conferences/conferences/_form_conference_details.html.haml +29 -22
  38. data/app/views/spina/admin/conferences/conferences/_form_delegates.html.haml +1 -0
  39. data/app/views/spina/admin/conferences/conferences/_form_parts.html.haml +6 -7
  40. data/app/views/spina/admin/conferences/conferences/_form_presentation_types.html.haml +1 -0
  41. data/app/views/spina/admin/conferences/conferences/_form_presentations.html.haml +1 -0
  42. data/app/views/spina/admin/conferences/conferences/_form_rooms.html.haml +1 -0
  43. data/app/views/spina/admin/conferences/conferences/index.html.haml +25 -5
  44. data/app/views/spina/admin/conferences/delegates/_delegate.html.haml +10 -12
  45. data/app/views/spina/admin/conferences/delegates/_form.html.haml +23 -19
  46. data/app/views/spina/admin/conferences/delegates/_form_conferences.html.haml +1 -0
  47. data/app/views/spina/admin/conferences/delegates/_form_delegate_details.html.haml +24 -53
  48. data/app/views/spina/admin/conferences/delegates/_form_presentations.html.haml +1 -0
  49. data/app/views/spina/admin/conferences/delegates/index.html.haml +17 -11
  50. data/app/views/spina/admin/conferences/dietary_requirements/_dietary_requirement.html.haml +7 -6
  51. data/app/views/spina/admin/conferences/dietary_requirements/_form.html.haml +23 -18
  52. data/app/views/spina/admin/conferences/dietary_requirements/_form_delegates.html.haml +1 -0
  53. data/app/views/spina/admin/conferences/dietary_requirements/_form_dietary_requirement_details.html.haml +4 -8
  54. data/app/views/spina/admin/conferences/dietary_requirements/index.html.haml +9 -5
  55. data/app/views/spina/admin/conferences/institutions/_form.html.haml +23 -19
  56. data/app/views/spina/admin/conferences/institutions/_form_delegates.html.haml +1 -0
  57. data/app/views/spina/admin/conferences/institutions/_form_institution_details.html.haml +25 -25
  58. data/app/views/spina/admin/conferences/institutions/_form_rooms.html.haml +1 -0
  59. data/app/views/spina/admin/conferences/institutions/_institution.html.haml +9 -7
  60. data/app/views/spina/admin/conferences/institutions/index.html.haml +22 -5
  61. data/app/views/spina/admin/conferences/presentation_attachment_types/_form.html.haml +17 -20
  62. data/app/views/spina/admin/conferences/presentation_attachment_types/_presentation_attachment_type.html.haml +7 -6
  63. data/app/views/spina/admin/conferences/presentation_attachment_types/index.html.haml +9 -5
  64. data/app/views/spina/admin/conferences/presentation_types/_form.html.haml +23 -19
  65. data/app/views/spina/admin/conferences/presentation_types/_form_presentation_type_details.html.haml +8 -16
  66. data/app/views/spina/admin/conferences/presentation_types/_form_presentations.html.haml +1 -0
  67. data/app/views/spina/admin/conferences/presentation_types/_form_sessions.html.haml +1 -0
  68. data/app/views/spina/admin/conferences/presentation_types/_presentation_type.html.haml +11 -8
  69. data/app/views/spina/admin/conferences/presentation_types/index.html.haml +25 -5
  70. data/app/views/spina/admin/conferences/presentations/_attachment_fields.html.haml +10 -16
  71. data/app/views/spina/admin/conferences/presentations/_form.html.haml +23 -18
  72. data/app/views/spina/admin/conferences/presentations/_form_presentation_details.html.haml +56 -55
  73. data/app/views/spina/admin/conferences/presentations/_form_presenters.html.haml +1 -0
  74. data/app/views/spina/admin/conferences/presentations/_presentation.html.haml +10 -8
  75. data/app/views/spina/admin/conferences/presentations/index.html.haml +18 -11
  76. data/app/views/spina/admin/conferences/rooms/_form.html.haml +23 -18
  77. data/app/views/spina/admin/conferences/rooms/_form_presentations.html.haml +1 -0
  78. data/app/views/spina/admin/conferences/rooms/_form_room_details.html.haml +8 -16
  79. data/app/views/spina/admin/conferences/rooms/_room.html.haml +11 -8
  80. data/app/views/spina/admin/conferences/rooms/index.html.haml +22 -5
  81. data/app/views/spina/admin/conferences/sessions/_form.html.haml +23 -18
  82. data/app/views/spina/admin/conferences/sessions/_form_presentations.html.haml +1 -0
  83. data/app/views/spina/admin/conferences/sessions/_form_session_details.html.haml +14 -19
  84. data/app/views/spina/admin/conferences/sessions/_session.html.haml +11 -8
  85. data/app/views/spina/admin/conferences/sessions/index.html.haml +25 -5
  86. data/app/views/spina/admin/hooks/conferences/_head.html.haml +0 -6
  87. data/app/views/spina/admin/hooks/conferences/_primary_navigation.html.haml +25 -19
  88. data/app/views/spina/admin/hooks/conferences/_settings_secondary_navigation.html.haml +0 -6
  89. data/app/views/spina/admin/parts/admin/conferences/dates/_form.html.haml +2 -2
  90. data/app/views/spina/admin/parts/admin/conferences/email_addresses/_form.html.haml +2 -2
  91. data/app/views/spina/admin/parts/admin/conferences/times/_form.html.haml +2 -2
  92. data/app/views/spina/admin/parts/admin/conferences/urls/_form.html.haml +2 -2
  93. data/config/locales/en.yml +31 -40
  94. data/config/routes.rb +1 -4
  95. data/db/migrate/20180907141242_add_type_to_spina_pages.rb +1 -1
  96. data/db/migrate/20180907141243_create_spina_conferences_conference_page_parts.rb +1 -1
  97. data/db/migrate/20181017155705_add_dependent_option_to_foreign_keys.rb +1 -1
  98. data/db/migrate/20190408131354_change_spina_resources.rb +10 -10
  99. data/db/migrate/20190701174807_remove_spina_conference_pages.rb +15 -15
  100. data/db/migrate/20190704135524_add_constraints_to_columns.rb +1 -1
  101. data/db/migrate/20200126213718_create_spina_conferences_presentation_attachments.rb +1 -1
  102. data/db/migrate/20200802184921_create_spina_conferences_event_name_description_and_location_translations.rb +1 -1
  103. data/db/migrate/20200911161739_move_conference_parts.rb +3 -3
  104. data/db/migrate/20201002122517_remove_spina_conferences_conference_page_parts.rb +1 -1
  105. data/db/migrate/20201007125625_add_timestamps_to_spina_conferences_parts.rb +2 -2
  106. data/db/migrate/20210315164411_convert_partables_to_json.rb +10 -18
  107. data/db/migrate/20210417102513_add_locale_to_action_text_rich_texts.rb +1 -1
  108. data/lib/spina/admin/conferences/engine.rb +13 -0
  109. data/lib/spina/admin/conferences/migration/renaming.rb +4 -4
  110. data/lib/spina/admin/conferences/railtie.rb +1 -0
  111. data/lib/spina/admin/conferences/version.rb +1 -1
  112. data/lib/spina/admin/conferences.rb +1 -2
  113. metadata +65 -82
  114. data/app/assets/javascripts/controllers/spina/admin/conferences/conference_events_form_controller.js +0 -174
  115. data/app/assets/javascripts/controllers/spina/admin/conferences/presentation_attachments_form_controller.js +0 -174
  116. data/app/assets/javascripts/importmap.json.erb +0 -6
  117. data/app/assets/stylesheets/spina/admin/conferences/application.sass +0 -3
  118. data/app/controllers/spina/admin/conferences/events_controller.rb +0 -24
  119. data/app/controllers/spina/admin/conferences/presentation_attachments_controller.rb +0 -24
  120. data/app/views/layouts/spina/admin/conferences/application.html.haml +0 -6
  121. data/app/views/layouts/spina/admin/conferences/conferences.html.haml +0 -17
  122. data/app/views/layouts/spina/admin/conferences/delegates.html.haml +0 -8
  123. data/app/views/layouts/spina/admin/conferences/dietary_requirements.html.haml +0 -8
  124. data/app/views/layouts/spina/admin/conferences/institutions.html.haml +0 -15
  125. data/app/views/layouts/spina/admin/conferences/presentation_attachment_types.html.haml +0 -8
  126. data/app/views/layouts/spina/admin/conferences/presentations.html.haml +0 -8
  127. data/app/views/spina/admin/conferences/conferences/_event_row.html.haml +0 -5
  128. data/app/views/spina/admin/conferences/conferences/_form_structure.html.haml +0 -19
  129. data/app/views/spina/admin/conferences/conferences/_form_structure_item.html.haml +0 -13
  130. data/app/views/spina/admin/conferences/events/new.js.erb +0 -21
  131. data/app/views/spina/admin/conferences/presentation_attachments/new.js.erb +0 -21
  132. data/app/views/spina/admin/conferences/presentations/_attachment_row.html.haml +0 -2
  133. data/config/initializers/assets.rb +0 -13
@@ -1,174 +0,0 @@
1
- /**
2
- * @external Controller
3
- * @see {@link https://stimulusjs.org}
4
- */
5
- import { Controller } from 'stimulus'
6
-
7
- /**
8
- * @classdesc Controller that manages presentation attachment inputs.
9
- */
10
- export default class extends Controller {
11
- // noinspection JSUnusedGlobalSymbols
12
- static get targets() {
13
- return [
14
- /**
15
- * @private
16
- * @property {HTMLElement[]} formLinkTargets - The form link elements.
17
- */
18
- 'formLink',
19
- /**
20
- * @private
21
- * @property {HTMLElement} addFormLinkTarget - The button element for adding forms.
22
- */
23
- 'addFormLink',
24
- /**
25
- * @private
26
- * @property {HTMLElement[]} formPaneTargets - The form pane elements.
27
- */
28
- 'formPane',
29
- /**
30
- * @private
31
- * @property {HTMLElement[]} destroyFieldTargets - The destroy field hidden inputs.
32
- */
33
- 'destroyField',
34
- /**
35
- * @private
36
- * @property {HTMLElement[]} formLinkLabelTargets - The form link label elements.
37
- */
38
- 'formLinkLabel'
39
- ]
40
- }
41
- // noinspection JSUnusedGlobalSymbols
42
- /**
43
- * @private
44
- * @property {string} activeClass - The class used to mark elements as active.
45
- */
46
- static get classes() {
47
- return ['active']
48
- }
49
-
50
- /**
51
- * Returns visible form pane targets.
52
- * @private
53
- * @return {HTMLElement[]} Form pane targets currently shown.
54
- */
55
- get visibleFormPaneTargets() {
56
- return this.getVisibleTargets(this.formPaneTargets)
57
- }
58
-
59
- /**
60
- * Returns visible form link targets.
61
- * @private
62
- * @return {HTMLElement[]} Form link targets currently shown.
63
- */
64
- get visibleFormLinkTargets() {
65
- return this.getVisibleTargets(this.formLinkTargets)
66
- }
67
-
68
- // noinspection JSUnusedGlobalSymbols
69
- /**
70
- * Removes the form for the button firing the event.
71
- * @param {Event} event - The event fired by the button.
72
- */
73
- removeForm(event) {
74
- if (!(event.currentTarget instanceof HTMLElement)) return
75
- const index = this.getIndexOfChild(this.formPaneTargets, event.currentTarget)
76
- const visibleIndex = this.getIndexOfChild(this.visibleFormPaneTargets, event.currentTarget)
77
- this.destroyFieldTargets[index].value = true.toString()
78
- this.hideTargetPair(index)
79
- if (this.visibleFormPaneTargets.length > 0) {
80
- let newIndex = visibleIndex <= this.visibleFormPaneTargets.length - 1 ? visibleIndex : visibleIndex - 1
81
- this.makeTargetPairActive(newIndex)
82
- }
83
- this.updateURL()
84
- }
85
-
86
- // noinspection JSUnusedGlobalSymbols
87
- /**
88
- * Updates the form link labels with new type.
89
- * @param {Event} event - The event fired by the select element.
90
- */
91
- updateType(event) {
92
- if (!(event.currentTarget instanceof HTMLSelectElement)) return
93
- const index = this.getIndexOfChild(this.formPaneTargets, event.currentTarget)
94
- this.formLinkLabelTargets[index].textContent = event.currentTarget.selectedOptions[0].label
95
- }
96
-
97
- /**
98
- * Updates the URL used to get new forms.
99
- */
100
- updateURL() {
101
- const params = new URLSearchParams(this.addFormLinkTarget.search)
102
- params.set('index', String(this.formPaneTargets.length))
103
- params.set('active', String(this.visibleFormPaneTargets.length === 0))
104
- this.addFormLinkTarget.search = params.toString()
105
- }
106
-
107
- /**
108
- * Hides a form pane and form link target sharing an index.
109
- * @private
110
- * @private
111
- * @param {Number} index - The index of the targets to hide.
112
- */
113
- hideTargetPair(index) {
114
- this.hide(this.formPaneTargets[index])
115
- this.hide(this.formLinkTargets[index])
116
- }
117
-
118
- /**
119
- * Marks a form pane and form link target sharing an index as active.
120
- * @private
121
- * @param {Number} index - The index of the targets to show.
122
- */
123
- makeTargetPairActive(index) {
124
- this.makeActive(this.visibleFormPaneTargets[index])
125
- this.makeActive(this.visibleFormLinkTargets[index])
126
- }
127
-
128
- /**
129
- * Makes an element inactive and hides it.
130
- * @private
131
- * @param {HTMLElement} element - The element.
132
- */
133
- hide(element) {
134
- this.makeInactive(element)
135
- element.hidden = true
136
- }
137
-
138
- /**
139
- * Makes an element inactive.
140
- * @private
141
- * @param {HTMLElement} element - The element.
142
- */
143
- makeInactive(element) {
144
- element.classList.remove(this.activeClass)
145
- }
146
-
147
- /**
148
- * Makes an element active.
149
- * @private
150
- * @param {HTMLElement} element - The element.
151
- */
152
- makeActive(element) {
153
- element.classList.add(this.activeClass)
154
- }
155
-
156
- /**
157
- * Gets the index of an element within a collection.
158
- * @private
159
- * @param {HTMLElement[]} collection
160
- * @param {HTMLElement} child
161
- */
162
- getIndexOfChild(collection, child) {
163
- return collection.indexOf(collection.find(element => element.contains(child)))
164
- }
165
-
166
- /**
167
- * Gets visible targets within a collection.
168
- * @private
169
- * @param {HTMLElement[]} targets
170
- */
171
- getVisibleTargets(targets) {
172
- return targets.filter(target => target.hidden === false)
173
- }
174
- }
@@ -1,6 +0,0 @@
1
- {
2
- "imports": {
3
- "turbo": "<%= asset_path "turbo" %>",
4
- <%= importmap_list_with_stimulus_from Spina::Admin::Conferences::Engine.root.join('app/assets/javascripts/controllers').relative_path_from(Rails.root) %>
5
- }
6
- }
@@ -1,3 +0,0 @@
1
- .turbo-progress-bar
2
- @import spina/configuration
3
- background-color: $primary-color
@@ -1,24 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- module Spina
4
- module Admin
5
- module Conferences
6
- # Controller for {Event} objects.
7
- # @see Event
8
- class EventsController < ApplicationController
9
- # @!group Actions
10
-
11
- # Renders a form for an {Event}.
12
- # @return [void]
13
- def new
14
- @conference = Conference.find_by(id: params[:conference]) || Conference.new
15
- @event = @conference.events.build
16
- respond_to :js
17
- render locals: { index: params[:index].to_i, active: params[:active] == 'true' }
18
- end
19
-
20
- # @!endgroup
21
- end
22
- end
23
- end
24
- end
@@ -1,24 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- module Spina
4
- module Admin
5
- module Conferences
6
- # Controller for {PresentationAttachment} objects.
7
- # @see PresentationAttachment
8
- class PresentationAttachmentsController < ApplicationController
9
- # @!group Actions
10
-
11
- # Renders a form for a {PresentationAttachment}.
12
- # @return [void]
13
- def new
14
- @presentation = Presentation.find_by(id: params[:presentation_id]) || Presentation.new
15
- @attachment = @presentation.attachments.build
16
- respond_to :js
17
- render locals: { index: params[:index].to_i, active: params[:active] == 'true' }
18
- end
19
-
20
- # @!endgroup
21
- end
22
- end
23
- end
24
- end
@@ -1,6 +0,0 @@
1
- - content_for :application do
2
- %div{ data: { turbolinks: 'false' } }
3
- = yield(:admin_header)
4
- = yield
5
-
6
- = render template: 'layouts/spina/admin/admin'
@@ -1,17 +0,0 @@
1
- - content_for :admin_header do
2
- %header#header
3
- #header_actions
4
- = yield(:header_actions)
5
-
6
- = render partial: 'spina/admin/shared/breadcrumbs'
7
-
8
- %nav#secondary.tabs
9
- %ul
10
- %li{class: ('active' if controller_name == 'conferences')}
11
- = link_to Spina::Admin::Conferences::Conference.model_name.human(count: 0), admin_conferences_conferences_path
12
- %li{class: ('active' if controller_name == 'presentation_types')}
13
- = link_to Spina::Admin::Conferences::PresentationType.model_name.human(count: 0), admin_conferences_presentation_types_path
14
- %li{class: ('active' if controller_name == 'sessions')}
15
- = link_to Spina::Admin::Conferences::Session.model_name.human(count: 0), admin_conferences_sessions_path
16
-
17
- = render template: 'layouts/spina/admin/conferences/application'
@@ -1,8 +0,0 @@
1
- - content_for :admin_header do
2
- %header#header
3
- #header_actions
4
- = yield(:header_actions)
5
-
6
- = render partial: 'spina/admin/shared/breadcrumbs'
7
-
8
- = render template: 'layouts/spina/admin/conferences/application'
@@ -1,8 +0,0 @@
1
- - content_for :admin_header do
2
- %header#header
3
- #header_actions
4
- = yield(:header_actions)
5
-
6
- = render partial: 'spina/admin/shared/breadcrumbs'
7
-
8
- = render template: 'layouts/spina/admin/conferences/application'
@@ -1,15 +0,0 @@
1
- - content_for :admin_header do
2
- %header#header
3
- #header_actions
4
- = yield(:header_actions)
5
-
6
- = render partial: 'spina/admin/shared/breadcrumbs'
7
-
8
- %nav#secondary.tabs
9
- %ul
10
- %li{class: ('active' if controller_name == 'institutions')}
11
- = link_to Spina::Admin::Conferences::Institution.model_name.human(count: 0), admin_conferences_institutions_path
12
- %li{class: ('active' if controller_name == 'rooms')}
13
- = link_to Spina::Admin::Conferences::Room.model_name.human(count: 0), admin_conferences_rooms_path
14
-
15
- = render template: 'layouts/spina/admin/conferences/application'
@@ -1,8 +0,0 @@
1
- - content_for :admin_header do
2
- %header#header
3
- #header_actions
4
- = yield(:header_actions)
5
-
6
- = render partial: 'spina/admin/shared/breadcrumbs'
7
-
8
- = render template: 'layouts/spina/admin/conferences/application'
@@ -1,8 +0,0 @@
1
- - content_for :admin_header do
2
- %header#header
3
- #header_actions
4
- = yield(:header_actions)
5
-
6
- = render partial: 'spina/admin/shared/breadcrumbs'
7
-
8
- = render template: 'layouts/spina/admin/conferences/application'
@@ -1,5 +0,0 @@
1
- %li{ class: ('active' if (local_assigns[:active] == true) || (local_assigns[:index] == 0) || local_assigns[:event_iteration]&.first?),
2
- data: { 'spina--admin--conferences--conference_events_form': { target: 'formLink' } } }
3
- = link_to event&.name || '',
4
- "#structure_form_pane_#{local_assigns[:index] || local_assigns[:event_iteration]&.index}",
5
- data: { 'spina--admin--conferences--conference_events_form_target': 'formLinkLabel' }
@@ -1,19 +0,0 @@
1
- .horizontal-form-content
2
- .structure-form
3
- .structure-form-menu
4
- %label= f.object.title
5
-
6
- %ul
7
- - f.object.partable.structure_items.order(:position).each_with_index do |structure_item, index|
8
- %li{ class: ('active' if index == 0), data: { structure_item_id: index } }
9
- = link_to "#structure_form_pane_#{index}" do
10
- %i.icon.icon-bars.sortable-handle
11
- = structure_item.structure_parts.first.try(:structure_partable).try(:content)
12
-
13
- = f.fields_for :partable do |ff|
14
- = new_custom_structure_item ff, f.object
15
-
16
- .structure-form-content
17
- = f.fields_for :partable do |ff|
18
- = ff.fields_for :structure_items, ff.object.structure_items.order(:position) do |fff|
19
- = render 'form_structure_item', f: fff, structure: f.object
@@ -1,13 +0,0 @@
1
- .structure-form-pane{ class: ('active' if f.options[:child_index] == 0), id: "structure_form_pane_#{f.index}" }
2
- = f.fields_for :structure_parts, build_custom_structure_parts(structure.try(:name), f.object) do |ff|
3
- .structure-form-part
4
- = render "spina/admin/partables/#{partable_type_partial_namespace(ff.object.structure_partable_type)}/form", f: ff
5
-
6
- = ff.hidden_field :id
7
- = ff.hidden_field :title
8
- = ff.hidden_field :structure_partable_type
9
- = ff.hidden_field :name
10
-
11
- = f.hidden_field :position, placeholder: "Position", class: "structure_form_pane_#{f.index}_position"
12
- = f.hidden_field :_destroy
13
- = link_to t('spina.delete'), '#', class: 'remove_structure_item_fields button button-mini button-link pull-right'
@@ -1,21 +0,0 @@
1
- document.querySelector('[data-controller=\'spina--admin--conferences--conference-events-form\'] .structure-form-menu ul')
2
- .insertAdjacentHTML(
3
- 'beforeend',
4
- '<%=
5
- j render(partial: 'spina/admin/conferences/conferences/event_row', object: @event, as: :event,
6
- locals: { index: index, active: active })
7
- %>'
8
- );
9
- document.querySelector('[data-controller=\'spina--admin--conferences--conference-events-form\'] .structure-form-content')
10
- .insertAdjacentHTML(
11
- 'beforeend',
12
- '<%=
13
- fields_for @conference do |f|
14
- f.fields_for :events, @event, child_index: index do |ff|
15
- j render('spina/admin/conferences/conferences/event_fields', f: ff, active: active)
16
- end
17
- end
18
- %>'
19
- );
20
- document.querySelector('[data-controller=\'spina--admin--conferences--conference-events-form\'] .structure-form-content')
21
- .dispatchEvent(new Event('conferenceEventFieldsAdded'))
@@ -1,21 +0,0 @@
1
- document.querySelector('[data-controller=\'spina--admin--conferences--presentation-attachments-form\'] .structure-form-menu ul')
2
- .insertAdjacentHTML(
3
- 'beforeend',
4
- '<%=
5
- j render(partial: 'spina/admin/conferences/presentations/attachment_row', object: @attachment, as: :attachment,
6
- locals: { index: index, active: active })
7
- %>'
8
- );
9
- document.querySelector('[data-controller=\'spina--admin--conferences--presentation-attachments-form\'] .structure-form-content')
10
- .insertAdjacentHTML(
11
- 'beforeend',
12
- '<%=
13
- fields_for @presentation do |f|
14
- f.fields_for :attachments, @attachment, child_index: index do |ff|
15
- j render('spina/admin/conferences/presentations/attachment_fields', f: ff, active: active)
16
- end
17
- end
18
- %>'
19
- );
20
- document.querySelector('[data-controller=\'spina--admin--conferences--presentation-attachments-form\'] .structure-form-content')
21
- .dispatchEvent(new Event('presentationAttachmentFieldsAdded'))
@@ -1,2 +0,0 @@
1
- %li{ class: ('active' if (local_assigns[:active] == true) || (local_assigns[:index] == 0) || local_assigns[:attachment_iteration]&.first?), data: { 'spina--admin--conferences--presentation_attachments_form': { target: 'formLink' } } }
2
- = link_to attachment&.name || Spina::Admin::Conferences::PresentationAttachmentType.first&.name || '', "#structure_form_pane_#{local_assigns[:index] || local_assigns[:attachment_iteration]&.index}", data: { 'spina--admin--conferences--presentation_attachments_form_target': 'formLinkLabel' }
@@ -1,13 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- # Be sure to restart your server when you modify this file.
4
-
5
- # Add additional assets to the asset load path.
6
- # Rails.application.config.assets.paths << Emoji.images_path
7
- # Add Yarn node_modules folder to the asset load path.
8
- # Rails.application.config.assets.paths << Spina::Admin::Conferences::Engine.root.join('node_modules')
9
-
10
- # Precompile additional assets.
11
- # application.js, application.css, and all non-JS/CSS in the app/assets
12
- # folder are already added.
13
- # Rails.application.config.assets.precompile += %w( admin.js admin.css )