spina-admin-conferences 1.3.10 → 2.2.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (94) hide show
  1. checksums.yaml +4 -4
  2. data/app/assets/stylesheets/spina/admin/conferences/application.sass +0 -15
  3. data/app/controllers/spina/admin/conferences/application_controller.rb +6 -3
  4. data/app/controllers/spina/admin/conferences/conferences_controller.rb +19 -28
  5. data/app/controllers/spina/admin/conferences/delegates_controller.rb +3 -5
  6. data/app/controllers/spina/admin/conferences/dietary_requirements_controller.rb +2 -2
  7. data/app/controllers/spina/admin/conferences/institutions_controller.rb +2 -2
  8. data/app/controllers/spina/admin/conferences/presentation_attachment_types_controller.rb +2 -2
  9. data/app/controllers/spina/admin/conferences/presentation_types_controller.rb +2 -2
  10. data/app/controllers/spina/admin/conferences/presentations_controller.rb +5 -6
  11. data/app/controllers/spina/admin/conferences/rooms_controller.rb +2 -2
  12. data/app/controllers/spina/admin/conferences/sessions_controller.rb +2 -2
  13. data/app/jobs/spina/admin/conferences/presentation_import_job.rb +2 -3
  14. data/app/models/spina/admin/conferences/conference.rb +132 -15
  15. data/app/models/spina/admin/conferences/event.rb +30 -65
  16. data/app/models/spina/admin/conferences/presentation.rb +29 -38
  17. data/app/models/spina/parts/admin/conferences/date.rb +14 -0
  18. data/app/models/spina/parts/admin/conferences/email_address.rb +20 -0
  19. data/app/models/spina/parts/admin/conferences/time.rb +14 -0
  20. data/app/models/spina/parts/admin/conferences/url.rb +20 -0
  21. data/app/views/spina/admin/conferences/{delegates/_form_conferences.html.haml → application/_conferences.html.haml} +2 -4
  22. data/app/views/spina/admin/conferences/{conferences/_form_delegates.html.haml → application/_delegates.html.haml} +2 -3
  23. data/app/views/spina/admin/conferences/application/_dietary_requirements.html.haml +9 -0
  24. data/app/views/spina/admin/conferences/application/_institutions.html.haml +10 -0
  25. data/app/views/spina/admin/conferences/application/_presentation_attachment_types.html.haml +10 -0
  26. data/app/views/spina/admin/conferences/{conferences/_form_presentation_types.html.haml → application/_presentation_types.html.haml} +2 -3
  27. data/app/views/spina/admin/conferences/{rooms/_form_presentations.html.haml → application/_presentations.html.haml} +2 -3
  28. data/app/views/spina/admin/conferences/{conferences/_form_rooms.html.haml → application/_rooms.html.haml} +2 -3
  29. data/app/views/spina/admin/conferences/{presentation_types/_form_sessions.html.haml → application/_sessions.html.haml} +2 -3
  30. data/app/views/spina/admin/conferences/conferences/_event_fields.html.haml +14 -21
  31. data/app/views/spina/admin/conferences/conferences/_form.html.haml +7 -3
  32. data/app/views/spina/admin/conferences/conferences/_form_conference_details.html.haml +22 -24
  33. data/app/views/spina/admin/conferences/conferences/_form_parts.html.haml +7 -14
  34. data/app/views/spina/admin/conferences/conferences/index.html.haml +2 -13
  35. data/app/views/spina/admin/conferences/delegates/_form.html.haml +4 -3
  36. data/app/views/spina/admin/conferences/delegates/_form_delegate_details.html.haml +47 -32
  37. data/app/views/spina/admin/conferences/delegates/index.html.haml +2 -12
  38. data/app/views/spina/admin/conferences/dietary_requirements/_form.html.haml +3 -3
  39. data/app/views/spina/admin/conferences/dietary_requirements/_form_dietary_requirement_details.html.haml +7 -8
  40. data/app/views/spina/admin/conferences/dietary_requirements/index.html.haml +2 -10
  41. data/app/views/spina/admin/conferences/institutions/_form.html.haml +4 -3
  42. data/app/views/spina/admin/conferences/institutions/_form_institution_details.html.haml +29 -35
  43. data/app/views/spina/admin/conferences/institutions/index.html.haml +2 -11
  44. data/app/views/spina/admin/conferences/presentation_attachment_types/_form.html.haml +2 -2
  45. data/app/views/spina/admin/conferences/presentation_attachment_types/index.html.haml +2 -10
  46. data/app/views/spina/admin/conferences/presentation_types/_form.html.haml +4 -3
  47. data/app/views/spina/admin/conferences/presentation_types/_form_presentation_type_details.html.haml +13 -17
  48. data/app/views/spina/admin/conferences/presentation_types/index.html.haml +2 -12
  49. data/app/views/spina/admin/conferences/presentations/_attachment_fields.html.haml +6 -15
  50. data/app/views/spina/admin/conferences/presentations/_form.html.haml +3 -3
  51. data/app/views/spina/admin/conferences/presentations/_form_presentation_details.html.haml +55 -55
  52. data/app/views/spina/admin/conferences/presentations/index.html.haml +2 -12
  53. data/app/views/spina/admin/conferences/rooms/_form.html.haml +3 -3
  54. data/app/views/spina/admin/conferences/rooms/_form_room_details.html.haml +13 -15
  55. data/app/views/spina/admin/conferences/rooms/index.html.haml +2 -12
  56. data/app/views/spina/admin/conferences/sessions/_form.html.haml +3 -3
  57. data/app/views/spina/admin/conferences/sessions/_form_session_details.html.haml +18 -20
  58. data/app/views/spina/admin/conferences/sessions/_session.html.haml +1 -1
  59. data/app/views/spina/admin/conferences/sessions/index.html.haml +2 -12
  60. data/app/views/spina/admin/hooks/conferences/_primary_navigation.html.haml +4 -4
  61. data/app/views/spina/admin/hooks/conferences/_settings_secondary_navigation.html.haml +2 -2
  62. data/app/views/spina/admin/parts/admin/conferences/dates/_form.html.haml +2 -0
  63. data/app/views/spina/admin/parts/admin/conferences/email_addresses/_form.html.haml +2 -0
  64. data/app/views/spina/admin/parts/admin/conferences/times/_form.html.haml +2 -0
  65. data/app/views/spina/admin/parts/admin/conferences/urls/_form.html.haml +2 -0
  66. data/config/locales/en.yml +26 -29
  67. data/db/migrate/20210315164409_add_json_attributes_to_spina_conferences_presentations.rb +7 -0
  68. data/db/migrate/20210315164410_add_json_attributes_to_spina_conferences_conferences.rb +7 -0
  69. data/db/migrate/20210315164411_convert_partables_to_json.rb +407 -0
  70. data/db/migrate/20210417102513_add_locale_to_action_text_rich_texts.rb +11 -0
  71. data/db/migrate/20210417102514_move_texts_to_action_text_rich_texts.rb +82 -0
  72. data/lib/spina/admin/conferences.rb +1 -0
  73. data/lib/spina/admin/conferences/engine.rb +10 -5
  74. data/lib/spina/admin/conferences/version.rb +1 -1
  75. data/lib/tasks/spina/admin/conferences_tasks.rake +11 -1
  76. metadata +47 -46
  77. data/app/helpers/spina/admin/conferences/conferences_helper.rb +0 -44
  78. data/app/models/spina/admin/conferences/date_part.rb +0 -15
  79. data/app/models/spina/admin/conferences/email_address_part.rb +0 -21
  80. data/app/models/spina/admin/conferences/part.rb +0 -20
  81. data/app/models/spina/admin/conferences/time_part.rb +0 -53
  82. data/app/models/spina/admin/conferences/url_part.rb +0 -21
  83. data/app/views/spina/admin/conferences/conferences/_form_presentations.html.haml +0 -12
  84. data/app/views/spina/admin/conferences/delegates/_form_presentations.html.haml +0 -12
  85. data/app/views/spina/admin/conferences/dietary_requirements/_form_delegates.html.haml +0 -12
  86. data/app/views/spina/admin/conferences/institutions/_form_delegates.html.haml +0 -12
  87. data/app/views/spina/admin/conferences/institutions/_form_rooms.html.haml +0 -12
  88. data/app/views/spina/admin/conferences/presentation_types/_form_presentations.html.haml +0 -12
  89. data/app/views/spina/admin/conferences/presentations/_form_presenters.html.haml +0 -12
  90. data/app/views/spina/admin/conferences/sessions/_form_presentations.html.haml +0 -12
  91. data/app/views/spina/admin/partables/admin/conferences/date_parts/_form.html.haml +0 -5
  92. data/app/views/spina/admin/partables/admin/conferences/email_address_parts/_form.html.haml +0 -5
  93. data/app/views/spina/admin/partables/admin/conferences/time_parts/_form.html.haml +0 -7
  94. data/app/views/spina/admin/partables/admin/conferences/url_parts/_form.html.haml +0 -5
@@ -0,0 +1,11 @@
1
+ # frozen_string_literal: true
2
+
3
+ class AddLocaleToActionTextRichTexts < ActiveRecord::Migration[6.1]
4
+ def change
5
+ add_column :action_text_rich_texts, :locale, :string
6
+ remove_index :action_text_rich_texts, column: %i[record_type record_id name], name: :index_action_text_rich_texts_uniqueness,
7
+ unique: true
8
+ add_index :action_text_rich_texts, %i[record_type record_id name locale], name: :index_action_text_rich_texts_uniqueness,
9
+ unique: true
10
+ end
11
+ end
@@ -0,0 +1,82 @@
1
+ # frozen_string_literal: true
2
+
3
+ class MoveTextsToActionTextRichTexts < ActiveRecord::Migration[6.1] # :nodoc:
4
+ def change
5
+ create_mobility_tables
6
+
7
+ Spina.config.locales.each do |locale|
8
+ I18n.with_locale(locale) do
9
+ move_presentation_abstracts
10
+ move_event_descriptions
11
+ end
12
+ end
13
+
14
+ remove_column :spina_conferences_presentation_translations, :abstract, :text
15
+ remove_column :spina_conferences_event_translations, :description, :text
16
+ end
17
+
18
+ private
19
+
20
+ def create_mobility_tables
21
+ create_table :mobility_text_translations do |t| # rubocop:disable Rails/CreateTableWithTimestamps
22
+ t.string :record
23
+ end
24
+ create_table :mobility_string_translations do |t| # rubocop:disable Rails/CreateTableWithTimestamps
25
+ t.string :record
26
+ end
27
+ end
28
+
29
+ def move_presentation_abstracts
30
+ reversible do |dir|
31
+ Spina::Admin::Conferences::Presentation.in_batches.each_record do |presentation|
32
+ dir.up { presentation.update(abstract: presentation.presentation_translation.abstract) }
33
+ dir.down do
34
+ break if presentation.abstract.blank?
35
+
36
+ presentation.presentation_translation.update(abstract: presentation.abstract.read_attribute_before_type_cast('body'))
37
+ presentation.abstract.destroy
38
+ end
39
+ end
40
+ end
41
+ end
42
+
43
+ def move_event_descriptions
44
+ reversible do |dir|
45
+ Spina::Admin::Conferences::Event.in_batches.each_record do |event|
46
+ dir.up { event.update(description: event.event_translation.description) }
47
+ dir.down do
48
+ break if event.description.blank?
49
+
50
+ event.event_translation.update(description: event.description.read_attribute_before_type_cast('body'))
51
+ event.description.destroy
52
+ end
53
+ end
54
+ end
55
+ end
56
+ end
57
+
58
+ module Spina
59
+ module Admin
60
+ module Conferences
61
+ class PresentationTranslation < ApplicationRecord
62
+ belongs_to :presentation, foreign_key: 'spina_conferences_presentation_id'
63
+ end
64
+
65
+ class EventTranslation < ApplicationRecord
66
+ belongs_to :event, foreign_key: 'spina_conferences_event_id'
67
+ end
68
+
69
+ class Presentation < ApplicationRecord
70
+ has_one :presentation_translation, -> { where locale: I18n.locale }, foreign_key: 'spina_conferences_presentation_id'
71
+
72
+ translates :abstract, backend: :action_text
73
+ end
74
+
75
+ class Event < ApplicationRecord
76
+ has_one :event_translation, -> { where locale: I18n.locale }, foreign_key: 'spina_conferences_event_id'
77
+
78
+ translates :description, backend: :action_text
79
+ end
80
+ end
81
+ end
82
+ end
@@ -7,6 +7,7 @@ require 'rails-i18n'
7
7
  require 'stimulus-rails'
8
8
  require 'turbo-rails'
9
9
  require 'icalendar'
10
+ require 'icalendar/tzinfo'
10
11
 
11
12
  # Spina content management system.
12
13
  # @see https://www.spinacms.com Spina website
@@ -6,6 +6,8 @@ module Spina
6
6
  # Engine class for the plugin. This is where the plugin is registered as a {Spina::Plugin} with {Spina}.
7
7
  # @note The +name+ and +namespace+ of the {Spina::Plugin} object is +'conferences'+ (for compatibility reasons).
8
8
  class Engine < ::Rails::Engine
9
+ isolate_namespace Spina::Admin::Conferences
10
+
9
11
  config.before_initialize do
10
12
  ::Spina::Plugin.register do |plugin|
11
13
  plugin.name = 'conferences'
@@ -14,11 +16,14 @@ module Spina
14
16
  end
15
17
 
16
18
  config.after_initialize do
17
- ActiveSupport::Deprecation
18
- .new('2.0', 'Spina::Admin::Conferences')
19
- .tap { |deprecator| deprecator.deprecate_methods(Conference, to_ics: :to_event) }
20
- .tap { |deprecator| deprecator.deprecate_methods(Presentation, to_ics: :to_event) }
21
- .tap { |deprecator| deprecator.deprecate_methods(Event, to_ics: :to_event) }
19
+ Spina::Part.register(Spina::Parts::Admin::Conferences::Date)
20
+ Spina::Part.register(Spina::Parts::Admin::Conferences::EmailAddress)
21
+ Spina::Part.register(Spina::Parts::Admin::Conferences::Time)
22
+ Spina::Part.register(Spina::Parts::Admin::Conferences::Url)
23
+ end
24
+
25
+ config.to_prepare do
26
+ require 'mobility/action_text'
22
27
  end
23
28
  end
24
29
  end
@@ -4,7 +4,7 @@ module Spina
4
4
  module Admin
5
5
  module Conferences
6
6
  # Version number.
7
- VERSION = '1.3.10'
7
+ VERSION = '2.2.0'
8
8
  end
9
9
  end
10
10
  end
@@ -1,4 +1,14 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- namespace :spina_admin_conferences do
3
+ namespace :spina do
4
+ Rake::Task[:convert_layout_parts_to_json].clear if Rake::Task.task_defined?('spina:convert_layout_parts_to_json')
5
+ Rake::Task[:convert_page_parts_to_json].clear if Rake::Task.task_defined?('spina:convert_page_parts_to_json')
6
+
7
+ desc 'Convert table-based partables to JSON-based parts'
8
+ task convert_parts_to_json: %i[environment spina_admin_conferences:install:migrations] do
9
+ puts "If the upgrade migrations were missing, they should now have been copied to your migrations path.\n" \
10
+ 'If you have custom partables, you must modify the upgrade migration before running it: ' \
11
+ "for more information, see the documentation in the migration.\n" \
12
+ 'Once the migration is ready, run `rails db:migrate`.'
13
+ end
4
14
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: spina-admin-conferences
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.3.10
4
+ version: 2.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Justin Malčić
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-04-03 00:00:00.000000000 Z
11
+ date: 2021-05-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: icalendar
@@ -24,6 +24,20 @@ dependencies:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
26
  version: '2.5'
27
+ - !ruby/object:Gem::Dependency
28
+ name: mobility-actiontext
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - '='
32
+ - !ruby/object:Gem::Version
33
+ version: 0.2.0
34
+ type: :runtime
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - '='
39
+ - !ruby/object:Gem::Version
40
+ version: 0.2.0
27
41
  - !ruby/object:Gem::Dependency
28
42
  name: rails
29
43
  requirement: !ruby/object:Gem::Requirement
@@ -72,14 +86,14 @@ dependencies:
72
86
  requirements:
73
87
  - - "~>"
74
88
  - !ruby/object:Gem::Version
75
- version: '1.1'
89
+ version: '2.0'
76
90
  type: :runtime
77
91
  prerelease: false
78
92
  version_requirements: !ruby/object:Gem::Requirement
79
93
  requirements:
80
94
  - - "~>"
81
95
  - !ruby/object:Gem::Version
82
- version: '1.1'
96
+ version: '2.0'
83
97
  - !ruby/object:Gem::Dependency
84
98
  name: stimulus-rails
85
99
  requirement: !ruby/object:Gem::Requirement
@@ -268,14 +282,14 @@ dependencies:
268
282
  requirements:
269
283
  - - "~>"
270
284
  - !ruby/object:Gem::Version
271
- version: '3.142'
285
+ version: 4.0.0.beta3
272
286
  type: :development
273
287
  prerelease: false
274
288
  version_requirements: !ruby/object:Gem::Requirement
275
289
  requirements:
276
290
  - - "~>"
277
291
  - !ruby/object:Gem::Version
278
- version: '3.142'
292
+ version: 4.0.0.beta3
279
293
  - !ruby/object:Gem::Dependency
280
294
  name: sidekiq
281
295
  requirement: !ruby/object:Gem::Requirement
@@ -332,20 +346,6 @@ dependencies:
332
346
  - - "~>"
333
347
  - !ruby/object:Gem::Version
334
348
  version: '4.0'
335
- - !ruby/object:Gem::Dependency
336
- name: webdrivers
337
- requirement: !ruby/object:Gem::Requirement
338
- requirements:
339
- - - "~>"
340
- - !ruby/object:Gem::Version
341
- version: '4.4'
342
- type: :development
343
- prerelease: false
344
- version_requirements: !ruby/object:Gem::Requirement
345
- requirements:
346
- - - "~>"
347
- - !ruby/object:Gem::Version
348
- version: '4.4'
349
349
  description: Keep track of conference attendees and presentations with this plugin.
350
350
  email:
351
351
  - j.malcic@me.com
@@ -375,7 +375,6 @@ files:
375
375
  - app/controllers/spina/admin/conferences/presentations_controller.rb
376
376
  - app/controllers/spina/admin/conferences/rooms_controller.rb
377
377
  - app/controllers/spina/admin/conferences/sessions_controller.rb
378
- - app/helpers/spina/admin/conferences/conferences_helper.rb
379
378
  - app/jobs/spina/admin/conferences/application_job.rb
380
379
  - app/jobs/spina/admin/conferences/delegate_import_job.rb
381
380
  - app/jobs/spina/admin/conferences/import_job.rb
@@ -384,21 +383,20 @@ files:
384
383
  - app/models/spina/admin/conferences.rb
385
384
  - app/models/spina/admin/conferences/application_record.rb
386
385
  - app/models/spina/admin/conferences/conference.rb
387
- - app/models/spina/admin/conferences/date_part.rb
388
386
  - app/models/spina/admin/conferences/delegate.rb
389
387
  - app/models/spina/admin/conferences/dietary_requirement.rb
390
- - app/models/spina/admin/conferences/email_address_part.rb
391
388
  - app/models/spina/admin/conferences/event.rb
392
389
  - app/models/spina/admin/conferences/institution.rb
393
- - app/models/spina/admin/conferences/part.rb
394
390
  - app/models/spina/admin/conferences/presentation.rb
395
391
  - app/models/spina/admin/conferences/presentation_attachment.rb
396
392
  - app/models/spina/admin/conferences/presentation_attachment_type.rb
397
393
  - app/models/spina/admin/conferences/presentation_type.rb
398
394
  - app/models/spina/admin/conferences/room.rb
399
395
  - app/models/spina/admin/conferences/session.rb
400
- - app/models/spina/admin/conferences/time_part.rb
401
- - app/models/spina/admin/conferences/url_part.rb
396
+ - app/models/spina/parts/admin/conferences/date.rb
397
+ - app/models/spina/parts/admin/conferences/email_address.rb
398
+ - app/models/spina/parts/admin/conferences/time.rb
399
+ - app/models/spina/parts/admin/conferences/url.rb
402
400
  - app/validators/spina/admin/conferences/conference_date_validator.rb
403
401
  - app/validators/spina/admin/conferences/email_address_validator.rb
404
402
  - app/validators/spina/admin/conferences/finish_date_validator.rb
@@ -411,19 +409,24 @@ files:
411
409
  - app/views/layouts/spina/admin/conferences/institutions.html.haml
412
410
  - app/views/layouts/spina/admin/conferences/presentation_attachment_types.html.haml
413
411
  - app/views/layouts/spina/admin/conferences/presentations.html.haml
412
+ - app/views/spina/admin/conferences/application/_conferences.html.haml
413
+ - app/views/spina/admin/conferences/application/_delegates.html.haml
414
+ - app/views/spina/admin/conferences/application/_dietary_requirements.html.haml
414
415
  - app/views/spina/admin/conferences/application/_empty_list.html.haml
415
416
  - app/views/spina/admin/conferences/application/_errors.html.haml
416
417
  - app/views/spina/admin/conferences/application/_errors.turbo_stream.haml
418
+ - app/views/spina/admin/conferences/application/_institutions.html.haml
419
+ - app/views/spina/admin/conferences/application/_presentation_attachment_types.html.haml
420
+ - app/views/spina/admin/conferences/application/_presentation_types.html.haml
421
+ - app/views/spina/admin/conferences/application/_presentations.html.haml
422
+ - app/views/spina/admin/conferences/application/_rooms.html.haml
423
+ - app/views/spina/admin/conferences/application/_sessions.html.haml
417
424
  - app/views/spina/admin/conferences/conferences/_conference.html.haml
418
425
  - app/views/spina/admin/conferences/conferences/_event_fields.html.haml
419
426
  - app/views/spina/admin/conferences/conferences/_event_row.html.haml
420
427
  - app/views/spina/admin/conferences/conferences/_form.html.haml
421
428
  - app/views/spina/admin/conferences/conferences/_form_conference_details.html.haml
422
- - app/views/spina/admin/conferences/conferences/_form_delegates.html.haml
423
429
  - app/views/spina/admin/conferences/conferences/_form_parts.html.haml
424
- - app/views/spina/admin/conferences/conferences/_form_presentation_types.html.haml
425
- - app/views/spina/admin/conferences/conferences/_form_presentations.html.haml
426
- - app/views/spina/admin/conferences/conferences/_form_rooms.html.haml
427
430
  - app/views/spina/admin/conferences/conferences/_form_structure.html.haml
428
431
  - app/views/spina/admin/conferences/conferences/_form_structure_item.html.haml
429
432
  - app/views/spina/admin/conferences/conferences/edit.html.haml
@@ -431,24 +434,19 @@ files:
431
434
  - app/views/spina/admin/conferences/conferences/new.html.haml
432
435
  - app/views/spina/admin/conferences/delegates/_delegate.html.haml
433
436
  - app/views/spina/admin/conferences/delegates/_form.html.haml
434
- - app/views/spina/admin/conferences/delegates/_form_conferences.html.haml
435
437
  - app/views/spina/admin/conferences/delegates/_form_delegate_details.html.haml
436
- - app/views/spina/admin/conferences/delegates/_form_presentations.html.haml
437
438
  - app/views/spina/admin/conferences/delegates/edit.html.haml
438
439
  - app/views/spina/admin/conferences/delegates/index.html.haml
439
440
  - app/views/spina/admin/conferences/delegates/new.html.haml
440
441
  - app/views/spina/admin/conferences/dietary_requirements/_dietary_requirement.html.haml
441
442
  - app/views/spina/admin/conferences/dietary_requirements/_form.html.haml
442
- - app/views/spina/admin/conferences/dietary_requirements/_form_delegates.html.haml
443
443
  - app/views/spina/admin/conferences/dietary_requirements/_form_dietary_requirement_details.html.haml
444
444
  - app/views/spina/admin/conferences/dietary_requirements/edit.html.haml
445
445
  - app/views/spina/admin/conferences/dietary_requirements/index.html.haml
446
446
  - app/views/spina/admin/conferences/dietary_requirements/new.html.haml
447
447
  - app/views/spina/admin/conferences/events/new.js.erb
448
448
  - app/views/spina/admin/conferences/institutions/_form.html.haml
449
- - app/views/spina/admin/conferences/institutions/_form_delegates.html.haml
450
449
  - app/views/spina/admin/conferences/institutions/_form_institution_details.html.haml
451
- - app/views/spina/admin/conferences/institutions/_form_rooms.html.haml
452
450
  - app/views/spina/admin/conferences/institutions/_institution.html.haml
453
451
  - app/views/spina/admin/conferences/institutions/edit.html.haml
454
452
  - app/views/spina/admin/conferences/institutions/index.html.haml
@@ -461,8 +459,6 @@ files:
461
459
  - app/views/spina/admin/conferences/presentation_attachments/new.js.erb
462
460
  - app/views/spina/admin/conferences/presentation_types/_form.html.haml
463
461
  - app/views/spina/admin/conferences/presentation_types/_form_presentation_type_details.html.haml
464
- - app/views/spina/admin/conferences/presentation_types/_form_presentations.html.haml
465
- - app/views/spina/admin/conferences/presentation_types/_form_sessions.html.haml
466
462
  - app/views/spina/admin/conferences/presentation_types/_presentation_type.html.haml
467
463
  - app/views/spina/admin/conferences/presentation_types/edit.html.haml
468
464
  - app/views/spina/admin/conferences/presentation_types/index.html.haml
@@ -471,20 +467,17 @@ files:
471
467
  - app/views/spina/admin/conferences/presentations/_attachment_row.html.haml
472
468
  - app/views/spina/admin/conferences/presentations/_form.html.haml
473
469
  - app/views/spina/admin/conferences/presentations/_form_presentation_details.html.haml
474
- - app/views/spina/admin/conferences/presentations/_form_presenters.html.haml
475
470
  - app/views/spina/admin/conferences/presentations/_presentation.html.haml
476
471
  - app/views/spina/admin/conferences/presentations/edit.html.haml
477
472
  - app/views/spina/admin/conferences/presentations/index.html.haml
478
473
  - app/views/spina/admin/conferences/presentations/new.html.haml
479
474
  - app/views/spina/admin/conferences/rooms/_form.html.haml
480
- - app/views/spina/admin/conferences/rooms/_form_presentations.html.haml
481
475
  - app/views/spina/admin/conferences/rooms/_form_room_details.html.haml
482
476
  - app/views/spina/admin/conferences/rooms/_room.html.haml
483
477
  - app/views/spina/admin/conferences/rooms/edit.html.haml
484
478
  - app/views/spina/admin/conferences/rooms/index.html.haml
485
479
  - app/views/spina/admin/conferences/rooms/new.html.haml
486
480
  - app/views/spina/admin/conferences/sessions/_form.html.haml
487
- - app/views/spina/admin/conferences/sessions/_form_presentations.html.haml
488
481
  - app/views/spina/admin/conferences/sessions/_form_session_details.html.haml
489
482
  - app/views/spina/admin/conferences/sessions/_session.html.haml
490
483
  - app/views/spina/admin/conferences/sessions/edit.html.haml
@@ -493,10 +486,10 @@ files:
493
486
  - app/views/spina/admin/hooks/conferences/_head.html.haml
494
487
  - app/views/spina/admin/hooks/conferences/_primary_navigation.html.haml
495
488
  - app/views/spina/admin/hooks/conferences/_settings_secondary_navigation.html.haml
496
- - app/views/spina/admin/partables/admin/conferences/date_parts/_form.html.haml
497
- - app/views/spina/admin/partables/admin/conferences/email_address_parts/_form.html.haml
498
- - app/views/spina/admin/partables/admin/conferences/time_parts/_form.html.haml
499
- - app/views/spina/admin/partables/admin/conferences/url_parts/_form.html.haml
489
+ - app/views/spina/admin/parts/admin/conferences/dates/_form.html.haml
490
+ - app/views/spina/admin/parts/admin/conferences/email_addresses/_form.html.haml
491
+ - app/views/spina/admin/parts/admin/conferences/times/_form.html.haml
492
+ - app/views/spina/admin/parts/admin/conferences/urls/_form.html.haml
500
493
  - config/initializers/assets.rb
501
494
  - config/locales/en.yml
502
495
  - config/routes.rb
@@ -557,6 +550,11 @@ files:
557
550
  - db/migrate/20200911161739_move_conference_parts.rb
558
551
  - db/migrate/20201002122517_remove_spina_conferences_conference_page_parts.rb
559
552
  - db/migrate/20201007125625_add_timestamps_to_spina_conferences_parts.rb
553
+ - db/migrate/20210315164409_add_json_attributes_to_spina_conferences_presentations.rb
554
+ - db/migrate/20210315164410_add_json_attributes_to_spina_conferences_conferences.rb
555
+ - db/migrate/20210315164411_convert_partables_to_json.rb
556
+ - db/migrate/20210417102513_add_locale_to_action_text_rich_texts.rb
557
+ - db/migrate/20210417102514_move_texts_to_action_text_rich_texts.rb
560
558
  - lib/spina/admin/conferences.rb
561
559
  - lib/spina/admin/conferences/engine.rb
562
560
  - lib/spina/admin/conferences/migration/renaming.rb
@@ -573,16 +571,19 @@ require_paths:
573
571
  - lib
574
572
  required_ruby_version: !ruby/object:Gem::Requirement
575
573
  requirements:
576
- - - "~>"
574
+ - - ">="
577
575
  - !ruby/object:Gem::Version
578
576
  version: '2.7'
577
+ - - "<"
578
+ - !ruby/object:Gem::Version
579
+ version: '4.0'
579
580
  required_rubygems_version: !ruby/object:Gem::Requirement
580
581
  requirements:
581
582
  - - ">="
582
583
  - !ruby/object:Gem::Version
583
584
  version: '0'
584
585
  requirements: []
585
- rubygems_version: 3.1.2
586
+ rubygems_version: 3.2.15
586
587
  signing_key:
587
588
  specification_version: 4
588
589
  summary: Conference management plugin for Spina.
@@ -1,44 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- module Spina
4
- module Admin
5
- module Conferences
6
- # Helper for conferences
7
- module ConferencesHelper
8
- STRUCTURES = [
9
- { name: 'sponsors', structure_parts: [
10
- { name: 'name', title: 'Name', partable_type: 'Spina::Line' },
11
- { name: 'logo', title: 'Logo', partable_type: 'Spina::Image' },
12
- { name: 'website', title: 'Website', partable_type: 'Spina::Admin::Conferences::UrlPart' }
13
- ] }
14
- ].freeze
15
-
16
- def new_custom_structure_item(form, part)
17
- item = StructureItem.new
18
- build_custom_structure_parts(part.name, item)
19
- fields = form.fields_for(:structure_items, item, child_index: item.object_id) do |builder|
20
- render('spina/admin/conferences/conferences/form_structure_item', f: builder, structure: part)
21
- end
22
- link_to icon('plus'), '#', class: %w[add_structure_item_fields button button-link],
23
- data: { id: item.object_id, fields: fields.squish }
24
- end
25
-
26
- def build_custom_structure_parts(name, item)
27
- structure = STRUCTURES.find { |structure_attributes| structure_attributes[:name] == name }
28
- return item.parts if structure.blank?
29
-
30
- structure[:structure_parts].map { |part_attributes| build_custom_structure_part(item.parts, part_attributes) }
31
- end
32
-
33
- private
34
-
35
- def build_custom_structure_part(parts, part_attributes)
36
- parts.where(name: part_attributes[:name]).first_or_initialize(**part_attributes).then do |part|
37
- part.partable ||= part.partable_type.constantize.new
38
- part
39
- end
40
- end
41
- end
42
- end
43
- end
44
- end