spina-admin-conferences 1.3.9 → 2.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/assets/stylesheets/spina/admin/conferences/application.sass +0 -15
- data/app/controllers/spina/admin/conferences/application_controller.rb +6 -3
- data/app/controllers/spina/admin/conferences/conferences_controller.rb +19 -28
- data/app/controllers/spina/admin/conferences/delegates_controller.rb +3 -5
- data/app/controllers/spina/admin/conferences/dietary_requirements_controller.rb +2 -2
- data/app/controllers/spina/admin/conferences/institutions_controller.rb +2 -2
- data/app/controllers/spina/admin/conferences/presentation_attachment_types_controller.rb +2 -2
- data/app/controllers/spina/admin/conferences/presentation_types_controller.rb +2 -2
- data/app/controllers/spina/admin/conferences/presentations_controller.rb +5 -6
- data/app/controllers/spina/admin/conferences/rooms_controller.rb +2 -2
- data/app/controllers/spina/admin/conferences/sessions_controller.rb +2 -2
- data/app/jobs/spina/admin/conferences/presentation_import_job.rb +2 -3
- data/app/models/spina/admin/conferences/conference.rb +132 -15
- data/app/models/spina/admin/conferences/event.rb +30 -65
- data/app/models/spina/admin/conferences/presentation.rb +29 -38
- data/app/models/spina/parts/admin/conferences/date.rb +14 -0
- data/app/models/spina/parts/admin/conferences/email_address.rb +20 -0
- data/app/models/spina/parts/admin/conferences/time.rb +14 -0
- data/app/models/spina/parts/admin/conferences/url.rb +20 -0
- data/app/views/spina/admin/conferences/{delegates/_form_conferences.html.haml → application/_conferences.html.haml} +2 -4
- data/app/views/spina/admin/conferences/{conferences/_form_delegates.html.haml → application/_delegates.html.haml} +2 -3
- data/app/views/spina/admin/conferences/application/_dietary_requirements.html.haml +9 -0
- data/app/views/spina/admin/conferences/application/_institutions.html.haml +10 -0
- data/app/views/spina/admin/conferences/application/_presentation_attachment_types.html.haml +10 -0
- data/app/views/spina/admin/conferences/{conferences/_form_presentation_types.html.haml → application/_presentation_types.html.haml} +2 -3
- data/app/views/spina/admin/conferences/{rooms/_form_presentations.html.haml → application/_presentations.html.haml} +2 -3
- data/app/views/spina/admin/conferences/{conferences/_form_rooms.html.haml → application/_rooms.html.haml} +2 -3
- data/app/views/spina/admin/conferences/{presentation_types/_form_sessions.html.haml → application/_sessions.html.haml} +2 -3
- data/app/views/spina/admin/conferences/conferences/_event_fields.html.haml +14 -21
- data/app/views/spina/admin/conferences/conferences/_form.html.haml +7 -3
- data/app/views/spina/admin/conferences/conferences/_form_conference_details.html.haml +22 -24
- data/app/views/spina/admin/conferences/conferences/_form_parts.html.haml +7 -14
- data/app/views/spina/admin/conferences/conferences/index.html.haml +2 -13
- data/app/views/spina/admin/conferences/delegates/_form.html.haml +4 -3
- data/app/views/spina/admin/conferences/delegates/_form_delegate_details.html.haml +47 -32
- data/app/views/spina/admin/conferences/delegates/index.html.haml +2 -12
- data/app/views/spina/admin/conferences/dietary_requirements/_form.html.haml +3 -3
- data/app/views/spina/admin/conferences/dietary_requirements/_form_dietary_requirement_details.html.haml +7 -8
- data/app/views/spina/admin/conferences/dietary_requirements/index.html.haml +2 -10
- data/app/views/spina/admin/conferences/institutions/_form.html.haml +4 -3
- data/app/views/spina/admin/conferences/institutions/_form_institution_details.html.haml +29 -35
- data/app/views/spina/admin/conferences/institutions/index.html.haml +2 -11
- data/app/views/spina/admin/conferences/presentation_attachment_types/_form.html.haml +2 -2
- data/app/views/spina/admin/conferences/presentation_attachment_types/index.html.haml +2 -10
- data/app/views/spina/admin/conferences/presentation_types/_form.html.haml +4 -3
- data/app/views/spina/admin/conferences/presentation_types/_form_presentation_type_details.html.haml +13 -17
- data/app/views/spina/admin/conferences/presentation_types/index.html.haml +2 -12
- data/app/views/spina/admin/conferences/presentations/_attachment_fields.html.haml +6 -15
- data/app/views/spina/admin/conferences/presentations/_form.html.haml +3 -3
- data/app/views/spina/admin/conferences/presentations/_form_presentation_details.html.haml +55 -55
- data/app/views/spina/admin/conferences/presentations/index.html.haml +2 -12
- data/app/views/spina/admin/conferences/rooms/_form.html.haml +3 -3
- data/app/views/spina/admin/conferences/rooms/_form_room_details.html.haml +13 -15
- data/app/views/spina/admin/conferences/rooms/index.html.haml +2 -12
- data/app/views/spina/admin/conferences/sessions/_form.html.haml +3 -3
- data/app/views/spina/admin/conferences/sessions/_form_session_details.html.haml +18 -20
- data/app/views/spina/admin/conferences/sessions/_session.html.haml +1 -1
- data/app/views/spina/admin/conferences/sessions/index.html.haml +2 -12
- data/app/views/spina/admin/hooks/conferences/_primary_navigation.html.haml +4 -4
- data/app/views/spina/admin/hooks/conferences/_settings_secondary_navigation.html.haml +2 -2
- data/app/views/spina/admin/parts/admin/conferences/dates/_form.html.haml +2 -0
- data/app/views/spina/admin/parts/admin/conferences/email_addresses/_form.html.haml +2 -0
- data/app/views/spina/admin/parts/admin/conferences/times/_form.html.haml +2 -0
- data/app/views/spina/admin/parts/admin/conferences/urls/_form.html.haml +2 -0
- data/config/locales/en.yml +26 -29
- data/db/migrate/20210315164409_add_json_attributes_to_spina_conferences_presentations.rb +7 -0
- data/db/migrate/20210315164410_add_json_attributes_to_spina_conferences_conferences.rb +7 -0
- data/db/migrate/20210315164411_convert_partables_to_json.rb +407 -0
- data/db/migrate/20210417102513_add_locale_to_action_text_rich_texts.rb +11 -0
- data/db/migrate/20210417102514_move_texts_to_action_text_rich_texts.rb +82 -0
- data/lib/spina/admin/conferences.rb +1 -0
- data/lib/spina/admin/conferences/engine.rb +10 -5
- data/lib/spina/admin/conferences/version.rb +1 -1
- data/lib/tasks/spina/admin/conferences_tasks.rake +11 -1
- metadata +41 -29
- data/app/helpers/spina/admin/conferences/conferences_helper.rb +0 -44
- data/app/models/spina/admin/conferences/date_part.rb +0 -15
- data/app/models/spina/admin/conferences/email_address_part.rb +0 -21
- data/app/models/spina/admin/conferences/part.rb +0 -20
- data/app/models/spina/admin/conferences/time_part.rb +0 -53
- data/app/models/spina/admin/conferences/url_part.rb +0 -21
- data/app/views/spina/admin/conferences/conferences/_form_presentations.html.haml +0 -12
- data/app/views/spina/admin/conferences/delegates/_form_presentations.html.haml +0 -12
- data/app/views/spina/admin/conferences/dietary_requirements/_form_delegates.html.haml +0 -12
- data/app/views/spina/admin/conferences/institutions/_form_delegates.html.haml +0 -12
- data/app/views/spina/admin/conferences/institutions/_form_rooms.html.haml +0 -12
- data/app/views/spina/admin/conferences/presentation_types/_form_presentations.html.haml +0 -12
- data/app/views/spina/admin/conferences/presentations/_form_presenters.html.haml +0 -12
- data/app/views/spina/admin/conferences/sessions/_form_presentations.html.haml +0 -12
- data/app/views/spina/admin/partables/admin/conferences/date_parts/_form.html.haml +0 -5
- data/app/views/spina/admin/partables/admin/conferences/email_address_parts/_form.html.haml +0 -5
- data/app/views/spina/admin/partables/admin/conferences/time_parts/_form.html.haml +0 -7
- data/app/views/spina/admin/partables/admin/conferences/url_parts/_form.html.haml +0 -5
@@ -1,20 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
module Spina
|
4
|
-
module Admin
|
5
|
-
module Conferences
|
6
|
-
# Join records between partables and pageables.
|
7
|
-
class Part < ApplicationRecord
|
8
|
-
include Spina::Part
|
9
|
-
include Spina::Optionable
|
10
|
-
|
11
|
-
belongs_to :pageable, inverse_of: :parts, polymorphic: true, touch: true
|
12
|
-
belongs_to :partable, polymorphic: true, optional: true
|
13
|
-
|
14
|
-
accepts_nested_attributes_for :partable
|
15
|
-
|
16
|
-
validates :name, uniqueness: { scope: :pageable_id }
|
17
|
-
end
|
18
|
-
end
|
19
|
-
end
|
20
|
-
end
|
@@ -1,53 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
module Spina
|
4
|
-
module Admin
|
5
|
-
module Conferences
|
6
|
-
# Time parts.
|
7
|
-
class TimePart < ApplicationRecord
|
8
|
-
has_many :page_parts, as: :page_partable
|
9
|
-
has_many :parts, as: :partable
|
10
|
-
has_many :layout_parts, as: :layout_partable
|
11
|
-
has_many :structure_parts, as: :structure_partable
|
12
|
-
|
13
|
-
# @return [Date, nil] the date of the time part. Nil if the time part has no date and time
|
14
|
-
def date
|
15
|
-
return if content.blank?
|
16
|
-
|
17
|
-
content.to_date
|
18
|
-
end
|
19
|
-
|
20
|
-
# Sets the date of the time part.
|
21
|
-
# @param date [Date] the new date
|
22
|
-
# @return [void]
|
23
|
-
def date=(date)
|
24
|
-
if date.blank? || date.to_date.blank?
|
25
|
-
self.content = nil
|
26
|
-
return
|
27
|
-
end
|
28
|
-
|
29
|
-
self.content = date.to_date + (content.try(:seconds_since_midnight) || 0).seconds
|
30
|
-
end
|
31
|
-
|
32
|
-
# @return [ActiveSupport::TimeWithZone, nil] the time of the time part. Nil if the time part has no date and time
|
33
|
-
def time
|
34
|
-
return if content.blank?
|
35
|
-
|
36
|
-
content
|
37
|
-
end
|
38
|
-
|
39
|
-
# Sets the start time of the time part.
|
40
|
-
# @param time [ActiveSupport::TimeWithZone] the new time
|
41
|
-
# @return [void]
|
42
|
-
def time=(time)
|
43
|
-
if time.blank?
|
44
|
-
self.content = nil
|
45
|
-
return
|
46
|
-
end
|
47
|
-
|
48
|
-
self.content = Time.parse(time, date).to_datetime.in_time_zone
|
49
|
-
end
|
50
|
-
end
|
51
|
-
end
|
52
|
-
end
|
53
|
-
end
|
@@ -1,21 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
module Spina
|
4
|
-
module Admin
|
5
|
-
module Conferences
|
6
|
-
# URL parts. The format is validated.
|
7
|
-
#
|
8
|
-
# = Validators
|
9
|
-
# HTTP(S) URL (using {HttpUrlValidator}):: {#content}.
|
10
|
-
# @see HttpUrlValidator
|
11
|
-
class UrlPart < ApplicationRecord
|
12
|
-
has_many :page_parts, as: :page_partable
|
13
|
-
has_many :parts, as: :partable
|
14
|
-
has_many :layout_parts, as: :layout_partable
|
15
|
-
has_many :structure_parts, as: :structure_partable
|
16
|
-
|
17
|
-
validates :content, 'spina/admin/conferences/http_url': true, allow_blank: true
|
18
|
-
end
|
19
|
-
end
|
20
|
-
end
|
21
|
-
end
|
@@ -1,12 +0,0 @@
|
|
1
|
-
#presentations.tab-content.well
|
2
|
-
.table-container
|
3
|
-
%table.table
|
4
|
-
%thead
|
5
|
-
%tr
|
6
|
-
%th= Spina::Admin::Conferences::Presentation.human_attribute_name :conference
|
7
|
-
%th= Spina::Admin::Conferences::Presentation.human_attribute_name :title
|
8
|
-
%th= Spina::Admin::Conferences::Presentation.human_attribute_name :presenters
|
9
|
-
%th
|
10
|
-
|
11
|
-
%tbody
|
12
|
-
= render @conference.presentations.any? ? @conference.presentations : 'empty_list', message: t('spina.admin.conferences.presentations.index.no_presentations')
|
@@ -1,12 +0,0 @@
|
|
1
|
-
#presentations.tab-content.well
|
2
|
-
.table-container
|
3
|
-
%table.table
|
4
|
-
%thead
|
5
|
-
%tr
|
6
|
-
%th= Spina::Admin::Conferences::Presentation.human_attribute_name :conference
|
7
|
-
%th= Spina::Admin::Conferences::Presentation.human_attribute_name :title
|
8
|
-
%th= Spina::Admin::Conferences::Presentation.human_attribute_name :presenters
|
9
|
-
%th
|
10
|
-
|
11
|
-
%tbody
|
12
|
-
= render @delegate.presentations.any? ? @delegate.presentations : 'empty_list', message: t('spina.admin.conferences.presentations.index.no_presentations')
|
@@ -1,12 +0,0 @@
|
|
1
|
-
#delegates.tab-content.well
|
2
|
-
.table-container
|
3
|
-
%table.table
|
4
|
-
%thead
|
5
|
-
%tr
|
6
|
-
%th= Spina::Admin::Conferences::Delegate.human_attribute_name :name
|
7
|
-
%th= Spina::Admin::Conferences::Delegate.human_attribute_name :email_address
|
8
|
-
%th= Spina::Admin::Conferences::Delegate.human_attribute_name :institution
|
9
|
-
%th
|
10
|
-
|
11
|
-
%tbody
|
12
|
-
= render @dietary_requirement.delegates.any? ? @dietary_requirement.delegates : 'empty_list', message: t('spina.admin.conferences.delegates.index.no_delegates')
|
@@ -1,12 +0,0 @@
|
|
1
|
-
#delegates.tab-content.well
|
2
|
-
.table-container
|
3
|
-
%table.table
|
4
|
-
%thead
|
5
|
-
%tr
|
6
|
-
%th= Spina::Admin::Conferences::Delegate.human_attribute_name :name
|
7
|
-
%th= Spina::Admin::Conferences::Delegate.human_attribute_name :email_address
|
8
|
-
%th= Spina::Admin::Conferences::Delegate.human_attribute_name :institution
|
9
|
-
%th
|
10
|
-
|
11
|
-
%tbody
|
12
|
-
= render @institution.delegates.any? ? @institution.delegates : 'empty_list', message: t('spina.admin.conferences.delegates.index.no_delegates')
|
@@ -1,12 +0,0 @@
|
|
1
|
-
#rooms.tab-content.well
|
2
|
-
.table-container
|
3
|
-
%table.table
|
4
|
-
%thead
|
5
|
-
%tr
|
6
|
-
%th= Spina::Admin::Conferences::Room.human_attribute_name :institution
|
7
|
-
%th= Spina::Admin::Conferences::Room.human_attribute_name :building
|
8
|
-
%th= Spina::Admin::Conferences::Room.human_attribute_name :number
|
9
|
-
%th
|
10
|
-
|
11
|
-
%tbody
|
12
|
-
= render @institution.rooms.any? ? @institution.rooms : 'empty_list', message: t('spina.admin.conferences.rooms.index.no_rooms')
|
@@ -1,12 +0,0 @@
|
|
1
|
-
#presentations.tab-content.well
|
2
|
-
.table-container
|
3
|
-
%table.table
|
4
|
-
%thead
|
5
|
-
%tr
|
6
|
-
%th= Spina::Admin::Conferences::Presentation.human_attribute_name :conference
|
7
|
-
%th= Spina::Admin::Conferences::Presentation.human_attribute_name :title
|
8
|
-
%th= Spina::Admin::Conferences::Presentation.human_attribute_name :presenters
|
9
|
-
%th
|
10
|
-
|
11
|
-
%tbody
|
12
|
-
= render @presentation_type.presentations.any? ? @presentation_type.presentations : 'empty_list', message: t('spina.admin.conferences.presentations.index.no_presentations')
|
@@ -1,12 +0,0 @@
|
|
1
|
-
#presenters.tab-content.well
|
2
|
-
.table-container
|
3
|
-
%table.table
|
4
|
-
%thead
|
5
|
-
%tr
|
6
|
-
%th= Spina::Admin::Conferences::Delegate.human_attribute_name :name
|
7
|
-
%th= Spina::Admin::Conferences::Delegate.human_attribute_name :email_address
|
8
|
-
%th= Spina::Admin::Conferences::Delegate.human_attribute_name :institution
|
9
|
-
%th
|
10
|
-
|
11
|
-
%tbody
|
12
|
-
= render @presentation.presenters.any? ? @presentation.presenters : 'empty_list', message: t('spina.admin.conferences.presenters.no_presenters')
|
@@ -1,12 +0,0 @@
|
|
1
|
-
#presentations.tab-content.well
|
2
|
-
.table-container
|
3
|
-
%table.table
|
4
|
-
%thead
|
5
|
-
%tr
|
6
|
-
%th= Spina::Admin::Conferences::Presentation.human_attribute_name :conference
|
7
|
-
%th= Spina::Admin::Conferences::Presentation.human_attribute_name :title
|
8
|
-
%th= Spina::Admin::Conferences::Presentation.human_attribute_name :presenters
|
9
|
-
%th
|
10
|
-
|
11
|
-
%tbody
|
12
|
-
= render @session.presentations.any? ? @session.presentations : 'empty_list', message: t('spina.admin.conferences.presentations.index.no_presentations')
|