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.
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 +41 -29
  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
@@ -2,7 +2,7 @@
2
2
  - content_for :notifications do
3
3
  = render 'errors', errors: @presentation_attachment_type.errors
4
4
 
5
- = form_for @presentation_attachment_type, html: { autocomplete: 'off' } do |f|
5
+ = form_for [:admin_conferences, @presentation_attachment_type], html: { autocomplete: 'off' } do |f|
6
6
  %header#header
7
7
  = render partial: 'spina/admin/shared/breadcrumbs'
8
8
 
@@ -13,7 +13,7 @@
13
13
 
14
14
  = link_to t('spina.cancel'), admin_conferences_presentation_attachment_types_path, class: 'button', style: 'margin-right: 0'
15
15
 
16
- .well
16
+ %div{ style: 'margin-top: 40px' }
17
17
  .horizontal-form
18
18
  .horizontal-form-group
19
19
  .horizontal-form-label= Spina::Admin::Conferences::DietaryRequirement.human_attribute_name :name
@@ -3,13 +3,5 @@
3
3
  = icon 'plus'
4
4
  = t '.new'
5
5
 
6
- .well
7
- .table-container
8
- %table.table
9
- %thead
10
- %tr
11
- %th= Spina::Admin::Conferences::DietaryRequirement.human_attribute_name :name
12
- %th
13
-
14
- %tbody
15
- = render @presentation_attachment_types.any? ? @presentation_attachment_types : 'empty_list', message: t('.no_presentation_attachment_types')
6
+ = render partial: 'presentation_attachment_types', object: @presentation_attachment_types
7
+ = link_to_next_page @presentation_attachment_types, 'Next'
@@ -2,7 +2,7 @@
2
2
  - content_for :notifications do
3
3
  = render 'errors', errors: @presentation_type.errors
4
4
 
5
- = form_for @presentation_type, html: { autocomplete: 'off' } do |f|
5
+ = form_for [:admin_conferences, @presentation_type], html: { autocomplete: 'off' } do |f|
6
6
  %header#header
7
7
  = render partial: 'spina/admin/shared/breadcrumbs'
8
8
 
@@ -19,5 +19,6 @@
19
19
  %li{ class: ('active' if i == 0) }
20
20
  = link_to t(".#{tab}"), "##{tab}"
21
21
 
22
- - @tabs.each do |tab|
23
- = render "form_#{tab}", f: f
22
+ #presentation_type_details.tab-content.active= render 'form_presentation_type_details', f: f
23
+ #sessions.tab-content= render partial: 'sessions', object: @presentation_type.sessions
24
+ #presentations.tab-content= render partial: 'presentations', object: @presentation_type.presentations
@@ -1,20 +1,16 @@
1
- #presentation_type_details.tab-content.active
2
- .well
3
- .horizontal-form
4
- .horizontal-form-group
5
- .horizontal-form-label= Spina::Admin::Conferences::PresentationType.human_attribute_name :conference
6
- .horizontal-form-content
7
- .select-dropdown= f.collection_select :conference_id, Spina::Admin::Conferences::Conference.order(:dates).reverse_order, :id, :name, {}, required: true, data: { action: 'spina--admin--conferences--select-options#updateFilteredData' }
1
+ .page-form
2
+ .page-form-group
3
+ .page-form-label= Spina::Admin::Conferences::PresentationType.human_attribute_name :conference
4
+ .page-form-control
5
+ .select-dropdown= f.collection_select :conference_id, Spina::Admin::Conferences::Conference.order(:dates).reverse_order, :id, :name, {}, required: true, data: { action: 'spina--admin--conferences--select-options#updateFilteredData' }
8
6
 
9
- .horizontal-form-group
10
- .horizontal-form-label= Spina::Admin::Conferences::PresentationType.human_attribute_name :name
11
- .horizontal-form-content= f.text_field :name, placeholder: Spina::Admin::Conferences::PresentationType.human_attribute_name(:name), required: true
7
+ .page-form-group
8
+ .page-form-label= Spina::Admin::Conferences::PresentationType.human_attribute_name :name
9
+ .page-form-control= f.text_field :name, placeholder: Spina::Admin::Conferences::PresentationType.human_attribute_name(:name), required: true, class: 'input-large'
12
10
 
13
- .horizontal-form-group
14
- .horizontal-form-label
15
- = Spina::Admin::Conferences::PresentationType.human_attribute_name :duration
16
- %small= t '.duration_instructions'
17
- .horizontal-form-content= f.number_field :minutes, value: @presentation_type.minutes, placeholder: Spina::Admin::Conferences::PresentationType.human_attribute_name(:duration), required: true, step: 5, min: 5
11
+ .page-form-group
12
+ .page-form-label= Spina::Admin::Conferences::PresentationType.human_attribute_name :duration
13
+ .page-form-control= f.number_field :minutes, value: @presentation_type.minutes, placeholder: Spina::Admin::Conferences::PresentationType.human_attribute_name(:duration), required: true, step: 5, min: 5
18
14
 
19
- - unless @presentation_type.new_record?
20
- .pull-right= link_to t('spina.permanently_delete'), admin_conferences_presentation_type_path(@presentation_type), method: :delete, data: { confirm: t('.delete_confirmation', presentation_type: @presentation_type.name) }, class: %w[button button-link button-danger]
15
+ - unless @presentation_type.new_record?
16
+ .pull-right= link_to t('spina.permanently_delete'), admin_conferences_presentation_type_path(@presentation_type), method: :delete, data: { confirm: t('.delete_confirmation', presentation_type: @presentation_type.name) }, class: %w[button button-link button-danger]
@@ -3,15 +3,5 @@
3
3
  = icon 'plus'
4
4
  = t '.new'
5
5
 
6
- .well
7
- .table-container
8
- %table.table
9
- %thead
10
- %tr
11
- %th= Spina::Admin::Conferences::PresentationType.human_attribute_name :conference
12
- %th= Spina::Admin::Conferences::PresentationType.human_attribute_name :name
13
- %th= Spina::Admin::Conferences::PresentationType.human_attribute_name :duration
14
- %th
15
-
16
- %tbody
17
- = render @presentation_types.any? ? @presentation_types : 'empty_list', message: t('.no_presentation_types')
6
+ = render partial: 'presentation_types', object: @presentation_types
7
+ = link_to_next_page @presentation_types, 'Next'
@@ -1,25 +1,16 @@
1
1
  .structure-form-pane{ class: ('active' if (local_assigns[:active] == true) || (f.index == 0)), id: "structure_form_pane_#{f.index}", data: { 'spina--admin--conferences--presentation_attachments_form': { target: 'formPane' } } }
2
2
  .structure-form-part
3
- .horizontal-form-label
3
+ .page-form-label
4
4
  = Spina::Admin::Conferences::PresentationAttachment.human_attribute_name :attachment_type
5
- .horizontal-form-content
5
+ .page-form-control
6
6
  .select-dropdown
7
- = f.label :attachment_type, Spina::Admin::Conferences::PresentationAttachment.human_attribute_name(:attachment_type)
8
7
  = f.collection_select :attachment_type_id, Spina::Admin::Conferences::PresentationAttachmentType.all, :id, :name, {}, data: { action: 'spina--admin--conferences--presentation-attachments-form#updateType' }
9
8
  .structure-form-part
10
- .horizontal-form-label
9
+ .page-form-label
11
10
  = Spina::Admin::Conferences::PresentationAttachment.human_attribute_name :attachment
12
- .horizontal-form-content
13
- = link_to select_admin_attachments_path(f.object_name, selected_attachment_id: f.object.attachment.try(:id), hidden_field_id: "presentation_attachments_attributes_#{f.index}_attachment_id"), remote: true, class: "media_picker" do
14
- .placeholder
15
- %span.button.button-small.button-round
16
- %i.icon.icon-dots
17
- = t('spina.choose_from_library')
18
-
19
- - if f.object.attachment && f.object.attachment.file.present?
20
- .attachment= f.object.attachment.name
21
-
22
- = f.hidden_field :attachment_id, data: { hidden_field_id: "presentation_attachments_attributes_#{f.index}_attachment_id" }
11
+ .page-form-content{ data: { controller: "attachment-picker" } }
12
+ .select-dropdown
13
+ = f.collection_select :attachment_id, Spina::Attachment.sorted, :id, :name, { include_blank: t("spina.attachments.choose_attachment") }
23
14
 
24
15
  = f.hidden_field :id
25
16
 
@@ -2,7 +2,7 @@
2
2
  - content_for :notifications do
3
3
  = render 'errors', errors: @presentation.errors
4
4
 
5
- = form_for @presentation, html: { autocomplete: 'off' } do |f|
5
+ = form_for [:admin_conferences, @presentation], html: { autocomplete: 'off' } do |f|
6
6
  %header#header
7
7
  = render partial: 'spina/admin/shared/breadcrumbs'
8
8
 
@@ -19,5 +19,5 @@
19
19
  %li{ class: ('active' if i == 0) }
20
20
  = link_to t(".#{tab}"), "##{tab}"
21
21
 
22
- - @tabs.each do |tab|
23
- = render "form_#{tab}", f: f
22
+ #presentation_details.tab-content.active= render 'form_presentation_details', f: f
23
+ #presenters.tab-content= render partial: 'delegates', object: @presentation.presenters
@@ -1,55 +1,55 @@
1
- #presentation_details.tab-content.active
2
- .well
3
- .horizontal-form{ data: { controller: 'spina--admin--conferences--select-options', 'spina--admin--conferences--select_options': { record_value: @conferences } } }
4
- .horizontal-form-group
5
- .horizontal-form-label= Spina::Admin::Conferences::Presentation.human_attribute_name :conference
6
- .horizontal-form-content
7
- .select-dropdown= select_tag :admin_conferences_conference_id, options_from_collection_for_select(Spina::Admin::Conferences::Conference.all, :id, :name, (@presentation.conference.id unless @presentation.conference.blank?)), include_blank: true, required: true, data: { action: 'spina--admin--conferences--select-options#setVisibility', 'spina--admin--conferences--select_options_target': 'select', text_key: 'name' }
8
-
9
- .horizontal-form-group
10
- .horizontal-form-label= Spina::Admin::Conferences::Presentation.human_attribute_name :session
11
- .horizontal-form-content
12
- .input-group
13
- .select-dropdown= select_tag :admin_conferences_presentation_type_id, options_from_collection_for_select((@presentation.conference || Spina::Admin::Conferences::Conference.first).presentation_types, :id, :name, (@presentation.presentation_type.id unless @presentation.presentation_type.blank?)), include_blank: true, required: true, data: { action: 'spina--admin--conferences--select-options#setVisibility','spina--admin--conferences--select_options_target': 'select', key_path: 'presentation_types', text_key: 'name' }
14
- .select-dropdown= f.collection_select :session_id, (@presentation.presentation_type || Spina::Admin::Conferences::Conference.first).sessions, :id, :name, { include_blank: true }, required: true, data: {'spina--admin--conferences--select_options_target': 'select', key_path: 'presentation_types:sessions', text_key: 'name' }
15
-
16
- .horizontal-form-group
17
- .horizontal-form-label= Spina::Admin::Conferences::Presentation.human_attribute_name :date
18
- .horizontal-form-content
19
- .select-dropdown= f.select :date, (@presentation.conference || Spina::Admin::Conferences::Conference.first).dates.collect { |date| [l(date, format: :short), date.to_formatted_s(:iso8601)] }, { include_blank: true }, required: true, data: {'spina--admin--conferences--select_options_target': 'select', key_path: 'localized_dates', text_key: 'localization', value_key: 'date' }
20
-
21
- .horizontal-form-group
22
- .horizontal-form-label
23
- = Spina::Admin::Conferences::Presentation.human_attribute_name :start_time
24
- %small= t '.start_time_instructions'
25
- .horizontal-form-content= f.time_field :start_time, value: (@presentation.start_time.to_formatted_s(:time) unless @presentation.start_time.blank?), placeholder: Spina::Admin::Conferences::Presentation.human_attribute_name(:start_time), required: true
26
-
27
- .horizontal-form-group
28
- .horizontal-form-label= Spina::Admin::Conferences::Presentation.human_attribute_name :title
29
- .horizontal-form-content= f.text_field :title, placeholder: Spina::Admin::Conferences::Presentation.human_attribute_name(:title), required: true
30
-
31
- .horizontal-form-group
32
- .horizontal-form-label= Spina::Admin::Conferences::Presentation.human_attribute_name :abstract
33
- .horizontal-form-content= render 'spina/admin/shared/rich_text_field', f: f, field: :abstract
34
-
35
- .horizontal-form-group
36
- .horizontal-form-label
37
- = Spina::Admin::Conferences::Presentation.human_attribute_name :presenters
38
- %small= t '.multiple_presenters_selection_instructions_html'
39
- .horizontal-form-content
40
- .multiple.select-dropdown= f.collection_select :presenter_ids, Spina::Admin::Conferences::Delegate.order(:last_name, :first_name), :id, :reversed_name_and_institution, {}, multiple: true, required: true
41
-
42
- .horizontal-form-group{ class: dom_class(@presentation.attachments) }
43
- .horizontal-form-content
44
- .structure-form{ data: { controller: 'spina--admin--conferences--presentation-attachments-form', 'spina--admin--conferences--presentation_attachments_form': { active_class: 'active' } } }
45
- .structure-form-menu
46
- %label= Spina::Admin::Conferences::Presentation.human_attribute_name :attachments
47
- %ul= render partial: 'attachment_row', collection: f.object.attachments, as: :attachment
48
- = link_to icon('plus'), @presentation.new_record? ? new_admin_conferences_presentation_attachment_path : new_admin_conferences_presentation_presentation_attachment_path(@presentation, index: @presentation.attachments.size), remote: true, class: %w[button button-link icon], data: { 'spina--admin--conferences--presentation_attachments_form_target': 'addFormLink', disable_with: '' }
49
-
50
- .structure-form-content{ data: { action: 'presentationAttachmentFieldsAdded->spina--admin--conferences--presentation-attachments-form#updateURL' } }
51
- = f.fields_for :attachments do |attachment_fields|
52
- = render 'attachment_fields', f: attachment_fields
53
-
54
- - unless @presentation.new_record?
55
- .pull-right= link_to t('spina.permanently_delete'), admin_conferences_presentation_path(@presentation), method: :delete, data: { confirm: t('.delete_confirmation', presentation: @presentation.title) }, class: %w[button button-link button-danger]
1
+ .page-form{ data: { controller: 'spina--admin--conferences--select-options', 'spina--admin--conferences--select_options': { record_value: @conferences } } }
2
+ .page-form-group
3
+ .page-form-label= Spina::Admin::Conferences::Presentation.human_attribute_name :conference
4
+ .page-form-control
5
+ .select-dropdown= select_tag :conference_id, options_from_collection_for_select(Spina::Admin::Conferences::Conference.all, :id, :name, (@presentation.conference.id unless @presentation.conference.blank?)), include_blank: true, required: true, data: { action: 'spina--admin--conferences--select-options#setVisibility', 'spina--admin--conferences--select_options_target': 'select', text_key: 'name' }
6
+
7
+ .page-form-group
8
+ .page-form-label= Spina::Admin::Conferences::Presentation.human_attribute_name :session
9
+ .page-form-control
10
+ .input-group
11
+ .select-dropdown= select_tag :presentation_type_id, options_from_collection_for_select((@presentation.conference || Spina::Admin::Conferences::Conference.first).presentation_types, :id, :name, (@presentation.presentation_type.id unless @presentation.presentation_type.blank?)), include_blank: true, required: true, data: { action: 'spina--admin--conferences--select-options#setVisibility','spina--admin--conferences--select_options_target': 'select', key_path: 'presentation_types', text_key: 'name' }
12
+ .select-dropdown= f.collection_select :session_id, (@presentation.presentation_type || Spina::Admin::Conferences::Conference.first).sessions, :id, :name, { include_blank: true }, required: true, data: {'spina--admin--conferences--select_options_target': 'select', key_path: 'presentation_types:sessions', text_key: 'name' }
13
+
14
+ .page-form-group
15
+ .page-form-label
16
+ = Spina::Admin::Conferences::Presentation.human_attribute_name :start_datetime
17
+ .page-form-control= f.datetime_field :start_datetime, required: true
18
+
19
+ .page-form-group
20
+ .page-form-label= Spina::Admin::Conferences::Presentation.human_attribute_name :title
21
+ .page-form-control= f.text_field :title, placeholder: Spina::Admin::Conferences::Presentation.human_attribute_name(:title), required: true, class: 'input-large'
22
+
23
+ .page-form-group
24
+ .page-form-label= Spina::Admin::Conferences::Presentation.human_attribute_name :abstract
25
+ .page-form-content
26
+ .page-form-rich-text= f.rich_text_area :abstract
27
+
28
+ .page-form-group
29
+ .page-form-label= Spina::Admin::Conferences::Presentation.human_attribute_name :presenters
30
+ .page-form-content
31
+ .well{ style: 'margin: 0' }
32
+ .table-container
33
+ %table.table{ style: 'margin: 0' }
34
+ %tbody
35
+ = f.collection_check_boxes :presenter_ids, Spina::Admin::Conferences::Delegate.order(:last_name, :first_name), :id, :reversed_name_and_institution do |builder|
36
+ %tr
37
+ %td{ style: "padding-left: 16px" }
38
+ .form-checkbox
39
+ = builder.check_box
40
+ = builder.label
41
+
42
+ .page-form-group{ class: dom_class(@presentation.attachments) }
43
+ .page-form-label= Spina::Admin::Conferences::Presentation.human_attribute_name :attachments
44
+ .page-form-control
45
+ .structure-form{ data: { controller: 'spina--admin--conferences--presentation-attachments-form', 'spina--admin--conferences--presentation_attachments_form': { active_class: 'active' } } }
46
+ .structure-form-menu
47
+ %ul= render partial: 'attachment_row', collection: f.object.attachments, as: :attachment
48
+ = link_to icon('plus'), @presentation.new_record? ? new_admin_conferences_presentation_attachment_path : new_admin_conferences_presentation_presentation_attachment_path(@presentation, index: @presentation.attachments.size), remote: true, class: %w[button button-link icon], data: { 'spina--admin--conferences--presentation_attachments_form_target': 'addFormLink', disable_with: '' }
49
+
50
+ .structure-form-content{ data: { action: 'presentationAttachmentFieldsAdded->spina--admin--conferences--presentation-attachments-form#updateURL' } }
51
+ = f.fields_for :attachments do |attachment_fields|
52
+ = render 'attachment_fields', f: attachment_fields
53
+
54
+ - unless @presentation.new_record?
55
+ .pull-right= link_to t('spina.permanently_delete'), admin_conferences_presentation_path(@presentation), method: :delete, data: { confirm: t('.delete_confirmation', presentation: @presentation.title) }, class: %w[button button-link button-danger]
@@ -9,15 +9,5 @@
9
9
  = icon 'plus'
10
10
  = t '.new'
11
11
 
12
- .well
13
- .table-container
14
- %table.table
15
- %thead
16
- %tr
17
- %th= Spina::Admin::Conferences::Presentation.human_attribute_name :conference
18
- %th= Spina::Admin::Conferences::Presentation.human_attribute_name :title
19
- %th= Spina::Admin::Conferences::Presentation.human_attribute_name :presenters
20
- %th
21
-
22
- %tbody
23
- = render @presentations.any? ? @presentations : 'empty_list', message: t('.no_presentations')
12
+ = render partial: 'presentations', object: @presentations
13
+ = link_to_next_page @presentations, 'Next'
@@ -2,7 +2,7 @@
2
2
  - content_for :notifications do
3
3
  = render 'errors', errors: @room.errors
4
4
 
5
- = form_for @room, html: { autocomplete: 'off' } do |f|
5
+ = form_for [:admin_conferences, @room], html: { autocomplete: 'off' } do |f|
6
6
  %header#header
7
7
  = render partial: 'spina/admin/shared/breadcrumbs'
8
8
 
@@ -19,5 +19,5 @@
19
19
  %li{ class: ('active'if i == 0)}
20
20
  = link_to t(".#{tab}"), "##{tab}"
21
21
 
22
- - @tabs.each do |tab|
23
- = render "form_#{tab}", f: f
22
+ #room_details.tab-content.active= render 'form_room_details', f: f
23
+ #presentations.tab-content= render partial: 'presentations', object: @room.presentations
@@ -1,18 +1,16 @@
1
- #room_details.tab-content.active
2
- .well
3
- .horizontal-form
4
- .horizontal-form-group
5
- .horizontal-form-label= Spina::Admin::Conferences::Room.human_attribute_name :institution
6
- .horizontal-form-content
7
- .select-dropdown= f.collection_select :institution_id, Spina::Admin::Conferences::Institution.all, :id, :name, {}, required: true
1
+ .page-form
2
+ .page-form-group
3
+ .page-form-label= Spina::Admin::Conferences::Room.human_attribute_name :institution
4
+ .page-form-control
5
+ .select-dropdown= f.collection_select :institution_id, Spina::Admin::Conferences::Institution.all, :id, :name, {}, required: true
8
6
 
9
- .horizontal-form-group
10
- .horizontal-form-label= Spina::Admin::Conferences::Room.human_attribute_name :building
11
- .horizontal-form-content= f.text_field :building, placeholder: Spina::Admin::Conferences::Room.human_attribute_name(:building), required: true
7
+ .page-form-group
8
+ .page-form-label= Spina::Admin::Conferences::Room.human_attribute_name :building
9
+ .page-form-control= f.text_field :building, placeholder: Spina::Admin::Conferences::Room.human_attribute_name(:building), required: true
12
10
 
13
- .horizontal-form-group
14
- .horizontal-form-label= Spina::Admin::Conferences::Room.human_attribute_name :number
15
- .horizontal-form-content= f.text_field :number, placeholder: Spina::Admin::Conferences::Room.human_attribute_name(:number), required: true
11
+ .page-form-group
12
+ .page-form-label= Spina::Admin::Conferences::Room.human_attribute_name :number
13
+ .page-form-control= f.text_field :number, placeholder: Spina::Admin::Conferences::Room.human_attribute_name(:number), required: true
16
14
 
17
- - unless @room.new_record?
18
- .pull-right= link_to t('spina.permanently_delete'), admin_conferences_room_path(@room), method: :delete, data: { confirm: t('.delete_confirmation', room: @room.name) }, class: %w[button button-link button-danger]
15
+ - unless @room.new_record?
16
+ .pull-right= link_to t('spina.permanently_delete'), admin_conferences_room_path(@room), method: :delete, data: { confirm: t('.delete_confirmation', room: @room.name) }, class: %w[button button-link button-danger]
@@ -3,15 +3,5 @@
3
3
  = icon 'plus'
4
4
  = t '.new'
5
5
 
6
- .well
7
- .table-container
8
- %table.table
9
- %thead
10
- %tr
11
- %th= Spina::Admin::Conferences::Room.human_attribute_name :institution
12
- %th= Spina::Admin::Conferences::Room.human_attribute_name :building
13
- %th= Spina::Admin::Conferences::Room.human_attribute_name :number
14
- %th
15
-
16
- %tbody
17
- = render @rooms.any? ? @rooms : 'empty_list', message: t('.no_rooms')
6
+ = render partial: 'rooms', object: @rooms
7
+ = link_to_next_page @rooms, 'Next'
@@ -2,7 +2,7 @@
2
2
  - content_for :notifications do
3
3
  = render 'errors', errors: @session.errors
4
4
 
5
- = form_for @session, html: { autocomplete: 'off' } do |f|
5
+ = form_for [:admin_conferences, @session], html: { autocomplete: 'off' } do |f|
6
6
  %header#header
7
7
  = render partial: 'spina/admin/shared/breadcrumbs'
8
8
 
@@ -19,5 +19,5 @@
19
19
  %li{ class: ('active'if i == 0)}
20
20
  = link_to t(".#{tab}"), "##{tab}"
21
21
 
22
- - @tabs.each do |tab|
23
- = render "form_#{tab}", f: f
22
+ #session_details.tab-content.active= render 'form_session_details', f: f
23
+ #presentations.tab-content= render partial: 'presentations', object: @session.presentations
@@ -1,23 +1,21 @@
1
- #session_details.tab-content.active
2
- .well
3
- .horizontal-form
4
- .horizontal-form-group
5
- .horizontal-form-label= Spina::Admin::Conferences::Session.human_attribute_name :name
6
- .horizontal-form-content= f.text_field :name, placeholder: Spina::Admin::Conferences::Session.human_attribute_name(:name), required: true
1
+ .page-form
2
+ .page-form-group
3
+ .page-form-label= Spina::Admin::Conferences::Session.human_attribute_name :name
4
+ .page-form-control= f.text_field :name, placeholder: Spina::Admin::Conferences::Session.human_attribute_name(:name), required: true
7
5
 
8
- .horizontal-form-group
9
- .horizontal-form-label= Spina::Admin::Conferences::Session.human_attribute_name :presentation_type
10
- .horizontal-form-content
11
- .input-group{ data: { controller: 'spina--admin--conferences--select-options', 'spina--admin--conferences--select_options': { record_value: @conferences } } }
12
- .select-dropdown= select_tag :admin_conferences_conference_id, options_from_collection_for_select(Spina::Admin::Conferences::Conference.all, :id, :name, (@session.conference.id unless @session.conference.blank?)), include_blank: true, required: true, data: { action: 'spina--admin--conferences--select-options#setVisibility','spina--admin--conferences--select_options_target': 'select', text_key: 'name' }
13
- .select-dropdown= f.collection_select :presentation_type_id, @session.conference.present? ? @session.conference.presentation_types : Spina::Admin::Conferences::Conference.first.presentation_types, :id, :name, { include_blank: true }, required: true, data: {'spina--admin--conferences--select_options_target': 'select', text_key: 'name', key_path: 'presentation_types' }
6
+ .page-form-group
7
+ .page-form-label= Spina::Admin::Conferences::Session.human_attribute_name :presentation_type
8
+ .page-form-control
9
+ .input-group{ data: { controller: 'spina--admin--conferences--select-options', 'spina--admin--conferences--select_options': { record_value: @conferences } } }
10
+ .select-dropdown= select_tag :conference_id, options_from_collection_for_select(Spina::Admin::Conferences::Conference.all, :id, :name, (@session.conference.id unless @session.conference.blank?)), include_blank: true, required: true, data: { action: 'spina--admin--conferences--select-options#setVisibility','spina--admin--conferences--select_options_target': 'select', text_key: 'name' }
11
+ .select-dropdown= f.collection_select :presentation_type_id, @session.conference.present? ? @session.conference.presentation_types : Spina::Admin::Conferences::Conference.first.presentation_types, :id, :name, { include_blank: true }, required: true, data: {'spina--admin--conferences--select_options_target': 'select', text_key: 'name', key_path: 'presentation_types' }
14
12
 
15
- .horizontal-form-group
16
- .horizontal-form-label= Spina::Admin::Conferences::Session.human_attribute_name :room
17
- .horizontal-form-content
18
- .input-group{ data: { controller: 'select-options', 'spina--admin--conferences--select_options': { record_value: @institutions } } }
19
- .select-dropdown= select_tag :admin_conferences_institution_id, options_from_collection_for_select(Spina::Admin::Conferences::Institution.all, :id, :name, (@session.institution.id unless @session.institution.blank?)), include_blank: true, required: true, data: { action: 'spina--admin--conferences--select-options#setVisibility','spina--admin--conferences--select_options_target': 'select', text_key: 'name' }
20
- .select-dropdown= f.collection_select :room_id, @session.institution.present? ? @session.institution.rooms : Spina::Admin::Conferences::Institution.first.rooms, :id, :name, { include_blank: true }, required: true, data: {'spina--admin--conferences--select_options_target': 'select', text_key: 'name', key_path: 'rooms' }
13
+ .page-form-group
14
+ .page-form-label= Spina::Admin::Conferences::Session.human_attribute_name :room
15
+ .page-form-control
16
+ .input-group{ data: { controller: 'spina--admin--conferences--select-options', 'spina--admin--conferences--select_options': { record_value: @institutions } } }
17
+ .select-dropdown= select_tag :institution_id, options_from_collection_for_select(Spina::Admin::Conferences::Institution.all, :id, :name, (@session.institution.id unless @session.institution.blank?)), include_blank: true, required: true, data: { action: 'spina--admin--conferences--select-options#setVisibility','spina--admin--conferences--select_options_target': 'select', text_key: 'name' }
18
+ .select-dropdown= f.collection_select :room_id, @session.institution.present? ? @session.institution.rooms : Spina::Admin::Conferences::Institution.first.rooms, :id, :name, { include_blank: true }, required: true, data: {'spina--admin--conferences--select_options_target': 'select', text_key: 'name', key_path: 'rooms' }
21
19
 
22
- - unless @session.new_record?
23
- .pull-right= link_to t('spina.permanently_delete'), admin_conferences_session_path(@session), method: :delete, data: { confirm: t('.delete_confirmation', session: @session.name) }, class: %w[button button-link button-danger]
20
+ - unless @session.new_record?
21
+ .pull-right= link_to t('spina.permanently_delete'), admin_conferences_session_path(@session), method: :delete, data: { confirm: t('.delete_confirmation', session: @session.name) }, class: %w[button button-link button-danger]
@@ -1,5 +1,5 @@
1
1
  %tr{ data: { session_id: session.id } }
2
- %td= session.name
2
+ %td= link_to session.name, edit_admin_conferences_session_path(session)
3
3
  %td= session.presentation_type_name
4
4
  %td= session.room_name
5
5
  %td.align-right
@@ -3,15 +3,5 @@
3
3
  = icon 'plus'
4
4
  = t '.new'
5
5
 
6
- .well
7
- .table-container
8
- %table.table
9
- %thead
10
- %tr
11
- %th= Spina::Admin::Conferences::Session.human_attribute_name :name
12
- %th= Spina::Admin::Conferences::Session.human_attribute_name :presentation_type
13
- %th= Spina::Admin::Conferences::Session.human_attribute_name :room
14
- %th
15
-
16
- %tbody
17
- = render @sessions.any? ? @sessions : 'empty_list', message: t('.no_sessions')
6
+ = render partial: 'sessions', object: @sessions
7
+ = link_to_next_page @sessions, 'Next'
@@ -7,13 +7,13 @@
7
7
 
8
8
  %ul
9
9
  %li{ class: ('active' if %w[institutions rooms].include? controller_name) }
10
- = link_to Spina::Admin::Conferences::Institution.model_name.human(count: 0), spina.admin_conferences_institutions_path
10
+ = link_to Spina::Admin::Conferences::Institution.model_name.human(count: 0), admin_conferences_institutions_path
11
11
  %li{ class: ('active' if %w[conferences presentation_types sessions].include? controller_name) }
12
- = link_to Spina::Admin::Conferences::Conference.model_name.human(count: 0), spina.admin_conferences_conferences_path
12
+ = link_to Spina::Admin::Conferences::Conference.model_name.human(count: 0), admin_conferences_conferences_path
13
13
  %li{ class: ('active' if %w[delegates].include? controller_name) }
14
- = link_to Spina::Admin::Conferences::Delegate.model_name.human(count: 0), spina.admin_conferences_delegates_path
14
+ = link_to Spina::Admin::Conferences::Delegate.model_name.human(count: 0), admin_conferences_delegates_path
15
15
  %li{ class: ('active' if %w[presentations].include? controller_name) }
16
- = link_to Spina::Admin::Conferences::Presentation.model_name.human(count: 0), spina.admin_conferences_presentations_path
16
+ = link_to Spina::Admin::Conferences::Presentation.model_name.human(count: 0), admin_conferences_presentations_path
17
17
 
18
18
  %li
19
19
  = link_to '#', class: 'back-to-main-menu' do