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.
- checksums.yaml +4 -4
- data/README.md +40 -57
- data/app/assets/config/spina_admin_conferences_manifest.js +3 -3
- data/app/assets/javascripts/spina/admin/conferences/application.js +0 -4
- data/app/assets/javascripts/{controllers/spina/admin/conferences → spina/admin/conferences/controllers}/select_options_controller.js +1 -1
- data/app/assets/stylesheets/spina/admin/conferences/application.tailwind.css +0 -0
- data/app/components/spina/admin/conferences/application_component.rb +11 -0
- data/app/components/spina/admin/conferences/form_group_component.html.haml +4 -0
- data/app/components/spina/admin/conferences/form_group_component.rb +17 -0
- data/app/controllers/spina/admin/conferences/application_controller.rb +8 -1
- data/app/controllers/spina/admin/conferences/conferences_controller.rb +13 -25
- data/app/controllers/spina/admin/conferences/delegates_controller.rb +12 -24
- data/app/controllers/spina/admin/conferences/dietary_requirements_controller.rb +12 -24
- data/app/controllers/spina/admin/conferences/institutions_controller.rb +12 -24
- data/app/controllers/spina/admin/conferences/presentation_attachment_types_controller.rb +12 -24
- data/app/controllers/spina/admin/conferences/presentation_types_controller.rb +12 -26
- data/app/controllers/spina/admin/conferences/presentations_controller.rb +12 -24
- data/app/controllers/spina/admin/conferences/rooms_controller.rb +12 -26
- data/app/controllers/spina/admin/conferences/sessions_controller.rb +12 -26
- data/app/jobs/spina/admin/conferences/import_job.rb +2 -2
- data/app/models/spina/admin/conferences/conference.rb +1 -1
- data/app/models/spina/admin/conferences/delegate.rb +3 -3
- data/app/models/spina/admin/conferences/presentation.rb +1 -1
- data/app/views/spina/admin/conferences/application/_conferences.html.haml +10 -11
- data/app/views/spina/admin/conferences/application/_delegates.html.haml +9 -10
- data/app/views/spina/admin/conferences/application/_dietary_requirements.html.haml +7 -8
- data/app/views/spina/admin/conferences/application/_empty_list.html.haml +1 -1
- data/app/views/spina/admin/conferences/application/_institutions.html.haml +8 -9
- data/app/views/spina/admin/conferences/application/_presentation_attachment_types.html.haml +8 -9
- data/app/views/spina/admin/conferences/application/_presentation_types.html.haml +9 -10
- data/app/views/spina/admin/conferences/application/_presentations.html.haml +9 -10
- data/app/views/spina/admin/conferences/application/_rooms.html.haml +9 -10
- data/app/views/spina/admin/conferences/application/_sessions.html.haml +9 -10
- data/app/views/spina/admin/conferences/conferences/_conference.html.haml +13 -9
- data/app/views/spina/admin/conferences/conferences/_event_fields.html.haml +18 -25
- data/app/views/spina/admin/conferences/conferences/_form.html.haml +24 -22
- data/app/views/spina/admin/conferences/conferences/_form_conference_details.html.haml +29 -22
- data/app/views/spina/admin/conferences/conferences/_form_delegates.html.haml +1 -0
- data/app/views/spina/admin/conferences/conferences/_form_parts.html.haml +6 -7
- data/app/views/spina/admin/conferences/conferences/_form_presentation_types.html.haml +1 -0
- data/app/views/spina/admin/conferences/conferences/_form_presentations.html.haml +1 -0
- data/app/views/spina/admin/conferences/conferences/_form_rooms.html.haml +1 -0
- data/app/views/spina/admin/conferences/conferences/index.html.haml +25 -5
- data/app/views/spina/admin/conferences/delegates/_delegate.html.haml +10 -12
- data/app/views/spina/admin/conferences/delegates/_form.html.haml +23 -19
- data/app/views/spina/admin/conferences/delegates/_form_conferences.html.haml +1 -0
- data/app/views/spina/admin/conferences/delegates/_form_delegate_details.html.haml +24 -53
- data/app/views/spina/admin/conferences/delegates/_form_presentations.html.haml +1 -0
- data/app/views/spina/admin/conferences/delegates/index.html.haml +17 -11
- data/app/views/spina/admin/conferences/dietary_requirements/_dietary_requirement.html.haml +7 -6
- data/app/views/spina/admin/conferences/dietary_requirements/_form.html.haml +23 -18
- data/app/views/spina/admin/conferences/dietary_requirements/_form_delegates.html.haml +1 -0
- data/app/views/spina/admin/conferences/dietary_requirements/_form_dietary_requirement_details.html.haml +4 -8
- data/app/views/spina/admin/conferences/dietary_requirements/index.html.haml +9 -5
- data/app/views/spina/admin/conferences/institutions/_form.html.haml +23 -19
- data/app/views/spina/admin/conferences/institutions/_form_delegates.html.haml +1 -0
- data/app/views/spina/admin/conferences/institutions/_form_institution_details.html.haml +25 -25
- data/app/views/spina/admin/conferences/institutions/_form_rooms.html.haml +1 -0
- data/app/views/spina/admin/conferences/institutions/_institution.html.haml +9 -7
- data/app/views/spina/admin/conferences/institutions/index.html.haml +22 -5
- data/app/views/spina/admin/conferences/presentation_attachment_types/_form.html.haml +17 -20
- data/app/views/spina/admin/conferences/presentation_attachment_types/_presentation_attachment_type.html.haml +7 -6
- data/app/views/spina/admin/conferences/presentation_attachment_types/index.html.haml +9 -5
- data/app/views/spina/admin/conferences/presentation_types/_form.html.haml +23 -19
- data/app/views/spina/admin/conferences/presentation_types/_form_presentation_type_details.html.haml +8 -16
- data/app/views/spina/admin/conferences/presentation_types/_form_presentations.html.haml +1 -0
- data/app/views/spina/admin/conferences/presentation_types/_form_sessions.html.haml +1 -0
- data/app/views/spina/admin/conferences/presentation_types/_presentation_type.html.haml +11 -8
- data/app/views/spina/admin/conferences/presentation_types/index.html.haml +25 -5
- data/app/views/spina/admin/conferences/presentations/_attachment_fields.html.haml +10 -16
- data/app/views/spina/admin/conferences/presentations/_form.html.haml +23 -18
- data/app/views/spina/admin/conferences/presentations/_form_presentation_details.html.haml +56 -55
- data/app/views/spina/admin/conferences/presentations/_form_presenters.html.haml +1 -0
- data/app/views/spina/admin/conferences/presentations/_presentation.html.haml +10 -8
- data/app/views/spina/admin/conferences/presentations/index.html.haml +18 -11
- data/app/views/spina/admin/conferences/rooms/_form.html.haml +23 -18
- data/app/views/spina/admin/conferences/rooms/_form_presentations.html.haml +1 -0
- data/app/views/spina/admin/conferences/rooms/_form_room_details.html.haml +8 -16
- data/app/views/spina/admin/conferences/rooms/_room.html.haml +11 -8
- data/app/views/spina/admin/conferences/rooms/index.html.haml +22 -5
- data/app/views/spina/admin/conferences/sessions/_form.html.haml +23 -18
- data/app/views/spina/admin/conferences/sessions/_form_presentations.html.haml +1 -0
- data/app/views/spina/admin/conferences/sessions/_form_session_details.html.haml +14 -19
- data/app/views/spina/admin/conferences/sessions/_session.html.haml +11 -8
- data/app/views/spina/admin/conferences/sessions/index.html.haml +25 -5
- data/app/views/spina/admin/hooks/conferences/_head.html.haml +0 -6
- data/app/views/spina/admin/hooks/conferences/_primary_navigation.html.haml +25 -19
- data/app/views/spina/admin/hooks/conferences/_settings_secondary_navigation.html.haml +0 -6
- data/app/views/spina/admin/parts/admin/conferences/dates/_form.html.haml +2 -2
- data/app/views/spina/admin/parts/admin/conferences/email_addresses/_form.html.haml +2 -2
- data/app/views/spina/admin/parts/admin/conferences/times/_form.html.haml +2 -2
- data/app/views/spina/admin/parts/admin/conferences/urls/_form.html.haml +2 -2
- data/config/locales/en.yml +31 -40
- data/config/routes.rb +1 -4
- data/db/migrate/20180907141242_add_type_to_spina_pages.rb +1 -1
- data/db/migrate/20180907141243_create_spina_conferences_conference_page_parts.rb +1 -1
- data/db/migrate/20181017155705_add_dependent_option_to_foreign_keys.rb +1 -1
- data/db/migrate/20190408131354_change_spina_resources.rb +10 -10
- data/db/migrate/20190701174807_remove_spina_conference_pages.rb +15 -15
- data/db/migrate/20190704135524_add_constraints_to_columns.rb +1 -1
- data/db/migrate/20200126213718_create_spina_conferences_presentation_attachments.rb +1 -1
- data/db/migrate/20200802184921_create_spina_conferences_event_name_description_and_location_translations.rb +1 -1
- data/db/migrate/20200911161739_move_conference_parts.rb +3 -3
- data/db/migrate/20201002122517_remove_spina_conferences_conference_page_parts.rb +1 -1
- data/db/migrate/20201007125625_add_timestamps_to_spina_conferences_parts.rb +2 -2
- data/db/migrate/20210315164411_convert_partables_to_json.rb +10 -18
- data/db/migrate/20210417102513_add_locale_to_action_text_rich_texts.rb +1 -1
- data/lib/spina/admin/conferences/engine.rb +13 -0
- data/lib/spina/admin/conferences/migration/renaming.rb +4 -4
- data/lib/spina/admin/conferences/railtie.rb +1 -0
- data/lib/spina/admin/conferences/version.rb +1 -1
- data/lib/spina/admin/conferences.rb +1 -2
- metadata +65 -82
- data/app/assets/javascripts/controllers/spina/admin/conferences/conference_events_form_controller.js +0 -174
- data/app/assets/javascripts/controllers/spina/admin/conferences/presentation_attachments_form_controller.js +0 -174
- data/app/assets/javascripts/importmap.json.erb +0 -6
- data/app/assets/stylesheets/spina/admin/conferences/application.sass +0 -3
- data/app/controllers/spina/admin/conferences/events_controller.rb +0 -24
- data/app/controllers/spina/admin/conferences/presentation_attachments_controller.rb +0 -24
- data/app/views/layouts/spina/admin/conferences/application.html.haml +0 -6
- data/app/views/layouts/spina/admin/conferences/conferences.html.haml +0 -17
- data/app/views/layouts/spina/admin/conferences/delegates.html.haml +0 -8
- data/app/views/layouts/spina/admin/conferences/dietary_requirements.html.haml +0 -8
- data/app/views/layouts/spina/admin/conferences/institutions.html.haml +0 -15
- data/app/views/layouts/spina/admin/conferences/presentation_attachment_types.html.haml +0 -8
- data/app/views/layouts/spina/admin/conferences/presentations.html.haml +0 -8
- data/app/views/spina/admin/conferences/conferences/_event_row.html.haml +0 -5
- data/app/views/spina/admin/conferences/conferences/_form_structure.html.haml +0 -19
- data/app/views/spina/admin/conferences/conferences/_form_structure_item.html.haml +0 -13
- data/app/views/spina/admin/conferences/events/new.js.erb +0 -21
- data/app/views/spina/admin/conferences/presentation_attachments/new.js.erb +0 -21
- data/app/views/spina/admin/conferences/presentations/_attachment_row.html.haml +0 -2
- 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,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,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,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,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 )
|