spina-admin-conferences-fork 2.1.2 → 3.0.0.rc1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- 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/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/_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 +28 -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 +5 -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 +22 -4
- 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 +29 -53
- data/app/views/spina/admin/conferences/delegates/_form_presentations.html.haml +1 -0
- data/app/views/spina/admin/conferences/delegates/index.html.haml +14 -10
- 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 +3 -8
- data/app/views/spina/admin/conferences/dietary_requirements/index.html.haml +6 -4
- 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 +24 -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 +19 -4
- data/app/views/spina/admin/conferences/presentation_attachment_types/_form.html.haml +15 -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 +6 -4
- 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 +7 -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 +22 -4
- 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 +59 -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 +15 -10
- 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 +7 -16
- data/app/views/spina/admin/conferences/rooms/_room.html.haml +11 -8
- data/app/views/spina/admin/conferences/rooms/index.html.haml +19 -4
- 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 +13 -19
- data/app/views/spina/admin/conferences/sessions/_session.html.haml +11 -8
- data/app/views/spina/admin/conferences/sessions/index.html.haml +22 -4
- 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 +4 -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 +4 -2
- data/config/locales/en.yml +31 -9
- 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 +60 -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
- data/vendor/assets/javascripts/spina/trix.js +0 -21
- data/vendor/assets/stylesheets/spina/trix.css +0 -375
@@ -11,8 +11,6 @@ module Spina
|
|
11
11
|
before_action :set_tabs
|
12
12
|
before_action :set_conferences, :set_institutions, only: %i[new edit]
|
13
13
|
|
14
|
-
layout 'spina/admin/conferences/conferences'
|
15
|
-
|
16
14
|
# @!group Actions
|
17
15
|
|
18
16
|
# Renders a list of sessions.
|
@@ -36,51 +34,39 @@ module Spina
|
|
36
34
|
|
37
35
|
# Creates a session.
|
38
36
|
# @return [void]
|
39
|
-
def create
|
37
|
+
def create
|
40
38
|
@session = Session.new(session_params)
|
41
39
|
|
42
40
|
if @session.save
|
43
41
|
redirect_to admin_conferences_sessions_path, success: t('.saved')
|
44
42
|
else
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
render :new
|
49
|
-
end
|
50
|
-
format.turbo_stream { render partial: 'errors', locals: { errors: @session.errors } }
|
51
|
-
end
|
43
|
+
add_breadcrumb t('.new')
|
44
|
+
flash.now[:alert] = t('.failed')
|
45
|
+
render :new, status: :unprocessable_entity
|
52
46
|
end
|
53
47
|
end
|
54
48
|
|
55
49
|
# Updates a session.
|
56
50
|
# @return [void]
|
57
|
-
def update
|
51
|
+
def update
|
58
52
|
if @session.update(session_params)
|
59
53
|
redirect_to admin_conferences_sessions_path, success: t('.saved')
|
60
54
|
else
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
render :edit
|
65
|
-
end
|
66
|
-
format.turbo_stream { render partial: 'errors', locals: { errors: @session.errors } }
|
67
|
-
end
|
55
|
+
add_breadcrumb @session.name
|
56
|
+
flash.now[:alert] = t('.failed')
|
57
|
+
render :edit, status: :unprocessable_entity
|
68
58
|
end
|
69
59
|
end
|
70
60
|
|
71
61
|
# Destroys a session.
|
72
62
|
# @return [void]
|
73
|
-
def destroy
|
63
|
+
def destroy
|
74
64
|
if @session.destroy
|
75
65
|
redirect_to admin_conferences_sessions_path, success: t('.destroyed')
|
76
66
|
else
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
render :edit
|
81
|
-
end
|
82
|
-
format.turbo_stream { render partial: 'errors', locals: { errors: @session.errors } }
|
83
|
-
end
|
67
|
+
add_breadcrumb @session.name
|
68
|
+
flash.now[:alert] = t('.failed')
|
69
|
+
render :edit, status: :unprocessable_entity
|
84
70
|
end
|
85
71
|
end
|
86
72
|
|
@@ -16,9 +16,9 @@ module Spina
|
|
16
16
|
# Performs the job.
|
17
17
|
# @param file [String] the UTF-8-encoded string to parse as a CSV
|
18
18
|
# @yieldparam row [Hash] the current row of the CSV
|
19
|
-
def import(file)
|
19
|
+
def import(file, &block)
|
20
20
|
csv_rows = CSV.parse file, encoding: 'UTF-8', headers: true, header_converters: :symbol, converters: [:json]
|
21
|
-
csv_rows.each
|
21
|
+
csv_rows.each(&block)
|
22
22
|
end
|
23
23
|
end
|
24
24
|
end
|
@@ -184,7 +184,7 @@ module Spina
|
|
184
184
|
end
|
185
185
|
|
186
186
|
# @return [Icalendar::Event] the conference as an iCal event
|
187
|
-
def to_event # rubocop:disable Metrics/AbcSize
|
187
|
+
def to_event # rubocop:disable Metrics/AbcSize
|
188
188
|
event = Icalendar::Event.new
|
189
189
|
return event if invalid?
|
190
190
|
|
@@ -32,17 +32,17 @@ module Spina
|
|
32
32
|
# @return [ActiveRecord::Relation] directly associated conferences
|
33
33
|
# @see Conference
|
34
34
|
has_and_belongs_to_many :conferences, -> { includes(:translations) }, foreign_key: :spina_conferences_delegate_id, # rubocop:disable Rails/HasAndBelongsToMany
|
35
|
-
|
35
|
+
association_foreign_key: :spina_conferences_conference_id
|
36
36
|
# @!attribute [rw] presentations
|
37
37
|
# @return [ActiveRecord::Relation] directly associated presentations
|
38
38
|
# @see Presentation
|
39
39
|
has_and_belongs_to_many :presentations, -> { includes(:translations) }, foreign_key: :spina_conferences_delegate_id, # rubocop:disable Rails/HasAndBelongsToMany
|
40
|
-
|
40
|
+
association_foreign_key: :spina_conferences_presentation_id
|
41
41
|
# @!attribute [rw] dietary_requirements
|
42
42
|
# @return [ActiveRecord::Relation] directly associated dietary requirements
|
43
43
|
# @see DietaryRequirement
|
44
44
|
has_and_belongs_to_many :dietary_requirements, -> { includes(:translations) }, foreign_key: :spina_conferences_delegate_id, # rubocop:disable Rails/HasAndBelongsToMany
|
45
|
-
|
45
|
+
association_foreign_key: :spina_conferences_dietary_requirement_id # rubocop:disable Layout/LineLength
|
46
46
|
|
47
47
|
validates :first_name, :last_name, presence: true
|
48
48
|
validates :email_address, 'spina/admin/conferences/email_address': true
|
@@ -89,7 +89,7 @@ module Spina
|
|
89
89
|
# @return [void]
|
90
90
|
# @see PresentationImportJob#perform
|
91
91
|
def self.import(file)
|
92
|
-
PresentationImportJob.perform_later
|
92
|
+
PresentationImportJob.perform_later File.read(file)
|
93
93
|
end
|
94
94
|
|
95
95
|
# @return [Date, nil] the start date of the presentation. Nil if the presentation has no start date and time
|
@@ -1,12 +1,11 @@
|
|
1
|
-
.
|
2
|
-
.table-
|
3
|
-
%
|
4
|
-
%
|
5
|
-
%
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
%th
|
1
|
+
.my-6.md:m-8.bg-white.md:rounded-lg.border-l-0.border-r-0.border.md:border-r.md:border-l.border-gray-200.border-b-0.shadow-sm
|
2
|
+
%table.table-fixed.w-full
|
3
|
+
%thead
|
4
|
+
%tr.border-b.text-left
|
5
|
+
%th.font-semibold.text-sm.p-4= Spina::Admin::Conferences::Conference.human_attribute_name :name
|
6
|
+
%th.font-semibold.text-sm.p-4= Spina::Admin::Conferences::Conference.human_attribute_name :year
|
7
|
+
%th.font-semibold.text-sm.p-4= Spina::Admin::Conferences::Conference.human_attribute_name :start_date
|
8
|
+
%th.font-semibold.text-sm.p-4= Spina::Admin::Conferences::Conference.human_attribute_name :finish_date
|
9
|
+
%th
|
11
10
|
|
12
|
-
|
11
|
+
%tbody= render conferences.presence || 'empty_list', message: t('.no_conferences')
|
@@ -1,11 +1,10 @@
|
|
1
|
-
.
|
2
|
-
.table-
|
3
|
-
%
|
4
|
-
%
|
5
|
-
%
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
%th
|
1
|
+
.my-6.md:m-8.bg-white.md:rounded-lg.border-l-0.border-r-0.border.md:border-r.md:border-l.border-gray-200.border-b-0.shadow-sm
|
2
|
+
%table.table-fixed.w-full
|
3
|
+
%thead
|
4
|
+
%tr.border-b.text-left
|
5
|
+
%th.font-semibold.text-sm.p-4= Spina::Admin::Conferences::Delegate.human_attribute_name :name
|
6
|
+
%th.font-semibold.text-sm.p-4= Spina::Admin::Conferences::Delegate.human_attribute_name :email_address
|
7
|
+
%th.font-semibold.text-sm.p-4= Spina::Admin::Conferences::Delegate.human_attribute_name :institution
|
8
|
+
%th
|
10
9
|
|
11
|
-
|
10
|
+
%tbody= render delegates.presence || 'empty_list', message: t('.no_delegates')
|
@@ -1,9 +1,8 @@
|
|
1
|
-
.
|
2
|
-
.table-
|
3
|
-
%
|
4
|
-
%
|
5
|
-
%
|
6
|
-
|
7
|
-
%th
|
1
|
+
.my-6.md:m-8.bg-white.md:rounded-lg.border-l-0.border-r-0.border.md:border-r.md:border-l.border-gray-200.border-b-0.shadow-sm
|
2
|
+
%table.table-fixed.w-full
|
3
|
+
%thead
|
4
|
+
%tr.border-b.text-left
|
5
|
+
%th.font-semibold.text-sm.p-4= Spina::Admin::Conferences::DietaryRequirement.human_attribute_name :name
|
6
|
+
%th
|
8
7
|
|
9
|
-
|
8
|
+
%tbody= render dietary_requirements.presence || 'empty_list', message: t('.no_dietary_requirements')
|
@@ -1,10 +1,9 @@
|
|
1
|
-
.
|
2
|
-
.table-
|
3
|
-
%
|
4
|
-
%
|
5
|
-
%
|
6
|
-
|
7
|
-
|
8
|
-
%th
|
1
|
+
.my-6.md:m-8.bg-white.md:rounded-lg.border-l-0.border-r-0.border.md:border-r.md:border-l.border-gray-200.border-b-0.shadow-sm
|
2
|
+
%table.table-fixed.w-full
|
3
|
+
%thead
|
4
|
+
%tr.border-b.text-left
|
5
|
+
%th.font-semibold.text-sm.p-4= Spina::Admin::Conferences::Institution.human_attribute_name :name
|
6
|
+
%th.font-semibold.text-sm.p-4= Spina::Admin::Conferences::Institution.human_attribute_name :city
|
7
|
+
%th
|
9
8
|
|
10
|
-
|
9
|
+
%tbody= render institutions.presence || 'empty_list', message: t('.no_institutions')
|
@@ -1,10 +1,9 @@
|
|
1
|
-
.
|
2
|
-
.table-
|
3
|
-
%
|
4
|
-
%
|
5
|
-
%
|
6
|
-
|
7
|
-
%th
|
1
|
+
.my-6.md:m-8.bg-white.md:rounded-lg.border-l-0.border-r-0.border.md:border-r.md:border-l.border-gray-200.border-b-0.shadow-sm
|
2
|
+
%table.table-fixed.w-full
|
3
|
+
%thead
|
4
|
+
%tr.border-b.text-left
|
5
|
+
%th.font-semibold.text-sm.p-4= Spina::Admin::Conferences::DietaryRequirement.human_attribute_name :name
|
6
|
+
%th
|
8
7
|
|
9
|
-
|
10
|
-
|
8
|
+
%tbody
|
9
|
+
= render presentation_attachment_types.presence || 'empty_list', message: t('.no_presentation_attachment_types')
|
@@ -1,11 +1,10 @@
|
|
1
|
-
.
|
2
|
-
.table-
|
3
|
-
%
|
4
|
-
%
|
5
|
-
%
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
%th
|
1
|
+
.my-6.md:m-8.bg-white.md:rounded-lg.border-l-0.border-r-0.border.md:border-r.md:border-l.border-gray-200.border-b-0.shadow-sm
|
2
|
+
%table.table-fixed.w-full
|
3
|
+
%thead
|
4
|
+
%tr.border-b.text-left
|
5
|
+
%th.font-semibold.text-sm.p-4= Spina::Admin::Conferences::PresentationType.human_attribute_name :conference
|
6
|
+
%th.font-semibold.text-sm.p-4= Spina::Admin::Conferences::PresentationType.human_attribute_name :name
|
7
|
+
%th.font-semibold.text-sm.p-4= Spina::Admin::Conferences::PresentationType.human_attribute_name :duration
|
8
|
+
%th
|
10
9
|
|
11
|
-
|
10
|
+
%tbody= render presentation_types.presence || 'empty_list', message: t('.no_presentation_types')
|
@@ -1,11 +1,10 @@
|
|
1
|
-
.
|
2
|
-
.table-
|
3
|
-
%
|
4
|
-
%
|
5
|
-
%
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
%th
|
1
|
+
.my-6.md:m-8.bg-white.md:rounded-lg.border-l-0.border-r-0.border.md:border-r.md:border-l.border-gray-200.border-b-0.shadow-sm
|
2
|
+
%table.table-fixed.w-full
|
3
|
+
%thead
|
4
|
+
%tr.border-b.text-left
|
5
|
+
%th.font-semibold.text-sm.p-4= Spina::Admin::Conferences::Presentation.human_attribute_name :conference
|
6
|
+
%th.font-semibold.text-sm.p-4= Spina::Admin::Conferences::Presentation.human_attribute_name :title
|
7
|
+
%th.font-semibold.text-sm.p-4= Spina::Admin::Conferences::Presentation.human_attribute_name :presenters
|
8
|
+
%th
|
10
9
|
|
11
|
-
|
10
|
+
%tbody= render presentations.presence || 'empty_list', message: t('.no_presentations')
|
@@ -1,11 +1,10 @@
|
|
1
|
-
.
|
2
|
-
.table-
|
3
|
-
%
|
4
|
-
%
|
5
|
-
%
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
%th
|
1
|
+
.my-6.md:m-8.bg-white.md:rounded-lg.border-l-0.border-r-0.border.md:border-r.md:border-l.border-gray-200.border-b-0.shadow-sm
|
2
|
+
%table.table-fixed.w-full
|
3
|
+
%thead
|
4
|
+
%tr.border-b.text-left
|
5
|
+
%th.font-semibold.text-sm.p-4= Spina::Admin::Conferences::Room.human_attribute_name :institution
|
6
|
+
%th.font-semibold.text-sm.p-4= Spina::Admin::Conferences::Room.human_attribute_name :building
|
7
|
+
%th.font-semibold.text-sm.p-4= Spina::Admin::Conferences::Room.human_attribute_name :number
|
8
|
+
%th
|
10
9
|
|
11
|
-
|
10
|
+
%tbody= render rooms.presence || 'empty_list', message: t('.no_rooms')
|
@@ -1,11 +1,10 @@
|
|
1
|
-
.
|
2
|
-
.table-
|
3
|
-
%
|
4
|
-
%
|
5
|
-
%
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
%th
|
1
|
+
.my-6.md:m-8.bg-white.md:rounded-lg.border-l-0.border-r-0.border.md:border-r.md:border-l.border-gray-200.border-b-0.shadow-sm
|
2
|
+
%table.table-fixed.w-full
|
3
|
+
%thead
|
4
|
+
%tr.border-b.text-left
|
5
|
+
%th.font-semibold.text-sm.p-4= Spina::Admin::Conferences::Session.human_attribute_name :name
|
6
|
+
%th.font-semibold.text-sm.p-4= Spina::Admin::Conferences::Session.human_attribute_name :presentation_type
|
7
|
+
%th.font-semibold.text-sm.p-4= Spina::Admin::Conferences::Session.human_attribute_name :room
|
8
|
+
%th
|
10
9
|
|
11
|
-
|
10
|
+
%tbody= render sessions.presence || 'empty_list', message: t('.no_sessions')
|
@@ -1,9 +1,13 @@
|
|
1
|
-
%tr{ data: { conference_id: conference.id } }
|
2
|
-
%td= link_to conference.name, edit_admin_conferences_conference_path(conference)
|
3
|
-
%td
|
4
|
-
|
5
|
-
%td
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
1
|
+
%tr.border-b{ data: { conference_id: conference.id } }
|
2
|
+
%td= link_to conference.name, edit_admin_conferences_conference_path(conference), class: 'block text-spina font-medium text-sm p-4 hover:text-spina-dark'
|
3
|
+
%td
|
4
|
+
.block.font-light.text-sm.p-4= conference.year
|
5
|
+
%td
|
6
|
+
.block.font-light.text-sm.p-4= time_tag conference.start_date, l(conference.start_date, format: :long)
|
7
|
+
%td
|
8
|
+
.block.font-light.text-sm.p-4= time_tag conference.finish_date, l(conference.finish_date, format: :long)
|
9
|
+
%td
|
10
|
+
= link_to edit_admin_conferences_conference_path(conference), class: 'btn btn-default mx-4 w-max' do
|
11
|
+
.flex.flex-nowrap.items-center.px-8.py-1
|
12
|
+
= heroicon 'pencil-alt', style: :outline, class: 'w-4 h-4'
|
13
|
+
.ml-2= t 'spina.edit'
|
@@ -1,31 +1,24 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
.structure-form-part
|
4
|
-
.page-form-label= Spina::Admin::Conferences::Event.human_attribute_name :name
|
5
|
-
.page-form-control= f.text_field :name, placeholder: Spina::Admin::Conferences::Event.human_attribute_name(:name), required: true
|
1
|
+
%div{ data: { 'part-id': "#{f.object.object_id}", 'tabs-target': 'pane' }, id: "pane_#{f.object.object_id}" }
|
2
|
+
= f.hidden_field :id
|
6
3
|
|
7
|
-
.
|
8
|
-
|
9
|
-
|
10
|
-
|
4
|
+
= render Spina::Forms::GroupComponent.new(label: Spina::Admin::Conferences::Event.human_attribute_name(:name)) do
|
5
|
+
= render Spina::Forms::TextFieldComponent.new(f, :name)
|
6
|
+
= render Spina::Forms::GroupComponent.new(label: Spina::Admin::Conferences::Event.human_attribute_name(:start_datetime)) do
|
7
|
+
= f.datetime_field :start_datetime
|
8
|
+
= render Spina::Forms::GroupComponent.new(label: Spina::Admin::Conferences::Event.human_attribute_name(:finish_datetime)) do
|
9
|
+
= f.datetime_field :finish_datetime
|
10
|
+
= render Spina::Forms::GroupComponent.new(label: Spina::Admin::Conferences::Event.human_attribute_name(:location)) do
|
11
|
+
= render Spina::Forms::TextFieldComponent.new(f, :location)
|
11
12
|
|
12
|
-
.
|
13
|
-
.
|
14
|
-
|
15
|
-
placeholder: Spina::Admin::Conferences::Event.human_attribute_name(:finish_datetime), required: true
|
13
|
+
= render Spina::Forms::GroupComponent.new(label: Spina::Admin::Conferences::Event.human_attribute_name(:description)) do
|
14
|
+
.mt-1.relative
|
15
|
+
= f.hidden_field :description, id: "#{f.object.object_id}_input"
|
16
16
|
|
17
|
-
|
18
|
-
|
19
|
-
.page-form-control= f.text_field :location, placeholder: Spina::Admin::Conferences::Event.human_attribute_name(:location),
|
20
|
-
required: true
|
17
|
+
.relative.form-textarea.p-4.pt-0.shadow-sm.max-w-5xl(data-controller='trix' id="insert_#{f.object.object_id}_trix-toolbar" data-action='media-picker:done->trix#insertAttachment')
|
18
|
+
= render Spina::Forms::TrixToolbarComponent.new("#{f.object.object_id}_trix-toolbar")
|
21
19
|
|
22
|
-
|
23
|
-
.page-form-label= Spina::Admin::Conferences::Event.human_attribute_name :description
|
24
|
-
.page-form-content
|
25
|
-
.page-form-rich-text= f.rich_text_area :description
|
20
|
+
%trix-editor(class='prose prose-sm focus:outline-none max-w-3xl xl:border-r border-dashed border-gray-200 pr-3' toolbar="#{f.object.object_id}_trix-toolbar" input="#{f.object.object_id}_input" data-trix-target='editor' data-action='trix-file-accept->trix#preventDefault')
|
26
21
|
|
27
|
-
|
22
|
+
.text-right
|
23
|
+
= button_tag t('spina.ui.delete'), type: :button, class: 'btn btn-default bg-transparent hover:bg-white hover:text-red-500 h-8 px-3 inline-block mt-3', data: { action: 'repeater#removeFields', id: "pane_#{f.object.object_id}" }
|
28
24
|
|
29
|
-
= f.hidden_field :_destroy, data: { 'spina--admin--conferences--conference_events_form_target': 'destroyField' }
|
30
|
-
= button_tag t('spina.delete'), type: 'button', class: %w[button button-mini button-link pull-right],
|
31
|
-
data: { action: 'spina--admin--conferences--conference-events-form#removeForm' }
|
@@ -1,27 +1,29 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
1
|
+
%div{ data: { controller: 'tabs',
|
2
|
+
tabs: { active: 'cursor-default text-gray-900 bg-spina-dark bg-opacity-10',
|
3
|
+
inactive: 'cursor-pointer bg-transparent text-gray-400 border-transparent' } } }
|
4
|
+
= render Spina::UserInterface::HeaderComponent.new do |header|
|
5
|
+
- header.actions do
|
6
|
+
- if @conference.persisted?
|
7
|
+
= render Spina::UserInterface::DropdownComponent.new do |dropdown|
|
8
|
+
- dropdown.button(classes: "btn btn-default px-3") do
|
9
|
+
= heroicon('dots-horizontal', style: :solid, class: "w-5 h-5 text-gray-600")
|
4
10
|
|
5
|
-
|
6
|
-
|
7
|
-
= render partial: 'spina/admin/shared/breadcrumbs'
|
11
|
+
- dropdown.menu do
|
12
|
+
= button_to t('spina.permanently_delete'), admin_conferences_conference_path(@conference), method: :delete, class: "block w-full text-left px-4 py-2 text-sm leading-5 font-medium text-red-500 cursor-pointer bg-white hover:bg-red-100 hover:bg-opacity-50 hover:text-red-500 focus:outline-none focus:bg-gray-100 focus:text-gray-900", form: {data: { controller: 'confirm', confirm_message: t('.delete_confirmation', conference: @conference.name) } }
|
8
13
|
|
9
|
-
|
10
|
-
|
11
|
-
= icon('check')
|
14
|
+
= button_tag type: :submit, form: dom_id(@conference), class: 'btn btn-primary', data: { controller: 'button', action: 'button#loading', loading_message: t('spina.ui.saving')} do
|
15
|
+
= heroicon('check', style: :solid, class: 'w-5 h-5 mr-1 -ml-2')
|
12
16
|
= t '.save'
|
13
17
|
|
14
|
-
|
18
|
+
- header.navigation do
|
19
|
+
%nav.-mb-3.mt-4
|
20
|
+
%ul.inline-flex.w-auto.rounded-md.bg-white
|
21
|
+
- @tabs.each do |tab|
|
22
|
+
%button.block.px-3.leading-relaxed.py-1.hover:text-gray-800.rounded-md.text-gray-400.font-medium.text-sm.flex.items-center.whitespace-nowrap{ type: 'button', data: { action: 'tabs#show', 'tabs-target': 'button', 'pane-id': "#{tab}" } }
|
23
|
+
= t ".#{tab}"
|
15
24
|
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
#conference_details.tab-content.active= render 'form_conference_details', f: f
|
23
|
-
#parts.tab-content= render 'form_parts', f: f
|
24
|
-
#rooms.tab-content= render partial: 'rooms', object: @conference.rooms
|
25
|
-
#presentation_types.tab-content= render partial: 'presentation_types', object: @conference.presentation_types
|
26
|
-
#delegates.tab-content= render partial: 'delegates', object: @conference.delegates
|
27
|
-
#presentations.tab-content= render partial: 'presentations', object: @conference.presentations
|
25
|
+
.p-4.md:p-8
|
26
|
+
= form_with model: [spina, :admin_conferences, @conference], id: dom_id(@conference), html: { autocomplete: 'off' } do |f|
|
27
|
+
- @tabs.each_with_index do |tab, i|
|
28
|
+
%div{ 'data-tabs-target': 'pane', id: tab, hidden: i != 0 }
|
29
|
+
= render "form_#{tab}", f: f
|
@@ -1,27 +1,33 @@
|
|
1
|
-
|
2
|
-
.
|
3
|
-
|
4
|
-
|
1
|
+
= render Spina::Forms::GroupComponent.new(label: Spina::Admin::Conferences::Conference.human_attribute_name(:name)) do
|
2
|
+
= render Spina::Forms::TextFieldComponent.new(f, :name)
|
3
|
+
= render Spina::Forms::GroupComponent.new(label: Spina::Admin::Conferences::Conference.human_attribute_name(:start_date)) do
|
4
|
+
= f.date_field :start_date, value: (@conference.start_date.strftime("%Y-%m-%d") if @conference.start_date.present?), placeholder: Spina::Admin::Conferences::Conference.human_attribute_name(:start_date)
|
5
|
+
= render Spina::Forms::GroupComponent.new(label: Spina::Admin::Conferences::Conference.human_attribute_name(:finish_date)) do
|
6
|
+
= f.date_field :finish_date, value: (@conference.finish_date.strftime("%Y-%m-%d") if @conference.finish_date.present?), placeholder: Spina::Admin::Conferences::Conference.human_attribute_name(:finish_date)
|
5
7
|
|
6
|
-
.page-form-group
|
7
|
-
.page-form-label= Spina::Admin::Conferences::Conference.human_attribute_name :start_date
|
8
|
-
.page-form-control= f.date_field :start_date, value: (@conference.start_date.strftime("%Y-%m-%d") if @conference.start_date.present?), placeholder: Spina::Admin::Conferences::Conference.human_attribute_name(:start_date), required: true
|
9
8
|
|
10
|
-
|
11
|
-
|
12
|
-
|
9
|
+
.mt-6{ 'data-controller': 'repeater' }
|
10
|
+
%label.block.text-sm.leading-5.font-medium.text-gray-700= Spina::Admin::Conferences::Conference.human_attribute_name :events
|
11
|
+
.-mt-4.flex.flex-col.md:flex-row{ data: { 'controller': 'tabs', 'tabs-active': 'bg-spina-dark bg-opacity-10 text-gray-900', 'tabs-inactive': 'text-gray-500' } }
|
12
|
+
.md:w-64.md:pr-6
|
13
13
|
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
.structure-form{ data: { controller: 'spina--admin--conferences--conference-events-form', 'spina--admin--conferences--conference_events_form': { active_class: 'active' } } }
|
18
|
-
.structure-form-menu
|
19
|
-
%ul= render partial: 'event_row', collection: f.object.events, as: :event
|
20
|
-
= link_to icon('plus'), @conference.new_record? ? new_admin_conferences_event_path : new_admin_conferences_conference_event_path(@conference, index: @conference.events.size), remote: true, class: %w[button button-link icon], data: { 'spina--admin--conferences--conference_events_form_target': 'addFormLink', disable_with: '' }
|
14
|
+
-# Fields for new event
|
15
|
+
- new_event = Spina::Admin::Conferences::Event.new
|
16
|
+
- fields = f.fields_for(:events, [new_event], child_index: new_event.object_id) { |ff| render('event_fields', f: ff) }.gsub('\n', '')
|
21
17
|
|
22
|
-
|
23
|
-
|
24
|
-
|
18
|
+
-# Tabs
|
19
|
+
.pt-6.-ml-3
|
20
|
+
%div{ data: { action: 'exists->tabs#added', 'repeater-target' => 'list', 'tabs-target' => 'list' } }
|
21
|
+
- (f.object.events || []).each.with_index do |event, index|
|
22
|
+
%button.text-gray-500.hover:text-gray-900.rounded-md.px-3.truncate.text-sm.font-medium.flex.items-center.w-full.h-9{ data: { 'action': 'tabs#show', 'pane-id': "pane_#{event.object_id}", 'repeater-target': 'listItem', 'tabs-target': 'button' }, type: 'button' }
|
23
|
+
%svg.w-4.h-4.mr-2{ fill: 'currentColor', viewbox: '0 0 448 512', xmlns: 'http://www.w3.org/2000/svg' }
|
24
|
+
%path{ d: 'M432 288H16c-8.8 0-16 7.2-16 16v16c0 8.8 7.2 16 16 16h416c8.8 0 16-7.2 16-16v-16c0-8.8-7.2-16-16-16zm0-112H16c-8.8 0-16 7.2-16 16v16c0 8.8 7.2 16 16 16h416c8.8 0 16-7.2 16-16v-16c0-8.8-7.2-16-16-16z' }
|
25
|
+
= event&.name
|
26
|
+
%button.text-gray-400.pl-2.hover:text-gray-900.rounded-md.truncate.text-sm.font-medium.flex.items-center.w-full.h-10{ data: { 'action': 'repeater#addFields', 'child-index': "#{new_event.object_id}", 'fields': fields }, type: 'button' }
|
27
|
+
= heroicon 'plus', style: :solid, class: 'w-6 h-6 mr-1'
|
28
|
+
= t 'spina.ui.new_entry'
|
25
29
|
|
26
|
-
|
27
|
-
|
30
|
+
-# Content
|
31
|
+
.flex-1.pl-6.md:pl-0{ 'data-repeater-target': 'content' }
|
32
|
+
= f.fields_for :events do |event_fields|
|
33
|
+
= render 'event_fields', f: event_fields
|
@@ -0,0 +1 @@
|
|
1
|
+
= render partial: 'delegates', object: @conference.delegates
|
@@ -1,8 +1,6 @@
|
|
1
|
-
.
|
2
|
-
=
|
3
|
-
|
4
|
-
|
5
|
-
= ff.hidden_field :name
|
1
|
+
= f.fields_for :"#{@locale}_content", @parts do |ff|
|
2
|
+
= ff.hidden_field :type, value: ff.object.class
|
3
|
+
= ff.hidden_field :title
|
4
|
+
= ff.hidden_field :name
|
6
5
|
|
7
|
-
|
8
|
-
= render "spina/admin/parts/#{parts_partial_namespace(ff.object.class.name)}/form", f: ff
|
6
|
+
= render "spina/admin/parts/#{parts_partial_namespace(ff.object.class.to_s)}/form", f: ff
|
@@ -0,0 +1 @@
|
|
1
|
+
= render partial: 'presentation_types', object: @conference.presentation_types
|
@@ -0,0 +1 @@
|
|
1
|
+
= render partial: 'presentations', object: @conference.presentations
|
@@ -0,0 +1 @@
|
|
1
|
+
= render partial: 'rooms', object: @conference.rooms
|
@@ -1,7 +1,25 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
1
|
+
= render Spina::UserInterface::HeaderComponent.new do |header|
|
2
|
+
- header.actions do
|
3
|
+
.ml-3
|
4
|
+
= link_to new_admin_conferences_conference_path, class: 'btn btn-primary w-full' do
|
5
|
+
= heroicon 'plus', style: :solid, class: 'w-7 h-7 -m1-2'
|
6
|
+
= t '.new'
|
7
|
+
|
8
|
+
- header.navigation do
|
9
|
+
%nav.-mb-1.md:-mb-3.mt-4
|
10
|
+
%ul.inline-flex.w-auto.rounded-md.bg-white
|
11
|
+
%li
|
12
|
+
= render Spina::UserInterface::TabLinkComponent.new(Spina::Admin::Conferences::Conference.model_name.human(count: 0),
|
13
|
+
admin_conferences_conferences_path,
|
14
|
+
active: controller_name == 'conferences')
|
15
|
+
%li
|
16
|
+
= render Spina::UserInterface::TabLinkComponent.new(Spina::Admin::Conferences::PresentationType.model_name.human(count: 0),
|
17
|
+
admin_conferences_presentation_types_path,
|
18
|
+
active: controller_name == 'presentation_types')
|
19
|
+
%li
|
20
|
+
= render Spina::UserInterface::TabLinkComponent.new(Spina::Admin::Conferences::Session.model_name.human(count: 0),
|
21
|
+
admin_conferences_sessions_path,
|
22
|
+
active: controller_name == 'sessions')
|
5
23
|
|
6
24
|
= render partial: 'conferences', object: @conferences
|
7
25
|
= link_to_next_page @conferences, 'Next'
|
@@ -1,13 +1,11 @@
|
|
1
|
-
%tr{ data: { delegate_id: delegate.id } }
|
2
|
-
%td= link_to delegate.full_name, edit_admin_conferences_delegate_path(delegate)
|
1
|
+
%tr.border-b{ data: { delegate_id: delegate.id } }
|
2
|
+
%td= link_to delegate.full_name, edit_admin_conferences_delegate_path(delegate), class: 'block text-spina font-medium text-sm p-4 hover:text-spina-dark'
|
3
3
|
%td
|
4
|
-
= delegate.email_address
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
= icon 'pencil-outline'
|
13
|
-
= t 'spina.edit'
|
4
|
+
.block.font-light.text-sm.p-4= delegate.email_address
|
5
|
+
%td
|
6
|
+
.block.font-light.text-sm.p-4= delegate.institution.name
|
7
|
+
%td
|
8
|
+
= link_to edit_admin_conferences_delegate_path(delegate), class: 'btn btn-default mx-4 w-max' do
|
9
|
+
.flex.flex-nowrap.items-center.px-8.py-1
|
10
|
+
= heroicon 'pencil-alt', style: :outline, class: 'w-4 h-4'
|
11
|
+
.ml-2= t 'spina.edit'
|