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
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7d4f99ddd9bb98f040badcd6932efa9488a3942f493695351af340161d8d41f8
|
4
|
+
data.tar.gz: 962d1f8d378591cacb509cde4b95de75b0070031d35cdcf9fa8eac33f6568c8d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b170baf53afa700552aa77180d312b53fd607d39f523a7d3b00db1d22817209f6b57102787c13eebef7557961a0a678571bffecc0a018653eb9058c568b46a89
|
7
|
+
data.tar.gz: 8629259d8564b8ff94f8e9c9e48213cb27c85c9413682a7571624565aae405d5a79dc9884f8cd8dddf5787163d26a98a0e5156a3bd03bbdaf398d04fb98d8929
|
@@ -1,3 +1,3 @@
|
|
1
|
-
//=
|
2
|
-
|
3
|
-
//=
|
1
|
+
//= link_directory ../javascripts/spina/admin/conferences/controllers
|
2
|
+
|
3
|
+
//= link spina/admin/conferences/application.js
|
File without changes
|
@@ -9,11 +9,18 @@ module Spina
|
|
9
9
|
|
10
10
|
add_flash_types :success
|
11
11
|
|
12
|
-
layout
|
12
|
+
layout :admin_layout
|
13
|
+
|
13
14
|
before_action :set_locale
|
14
15
|
|
16
|
+
admin_section :conferences
|
17
|
+
|
15
18
|
private
|
16
19
|
|
20
|
+
def admin_layout
|
21
|
+
'spina/admin/admin'
|
22
|
+
end
|
23
|
+
|
17
24
|
def set_locale
|
18
25
|
@locale = params[:locale] || I18n.default_locale
|
19
26
|
end
|
@@ -19,7 +19,7 @@ module Spina
|
|
19
19
|
].freeze
|
20
20
|
CONTENT_PARAMS = Spina.config.locales.inject({}) { |params, locale| params.merge("#{locale}_content_attributes": [*PARTS_PARAMS]) }
|
21
21
|
PARAMS = [:start_date, :finish_date, :name, **CONTENT_PARAMS,
|
22
|
-
events_attributes: %i[id name start_datetime finish_datetime description location]
|
22
|
+
events_attributes: %i[id name start_datetime finish_datetime description location]].freeze
|
23
23
|
PARTS = %w[text submission_url submission_email_address submission_date submission_text gallery sponsors].freeze
|
24
24
|
|
25
25
|
before_action :set_conference, only: %i[edit update destroy]
|
@@ -52,51 +52,39 @@ module Spina
|
|
52
52
|
|
53
53
|
# Creates a conference.
|
54
54
|
# @return [void]
|
55
|
-
def create
|
55
|
+
def create
|
56
56
|
@conference = Conference.new(conference_params)
|
57
57
|
|
58
58
|
if @conference.save
|
59
59
|
redirect_to admin_conferences_conferences_path, success: t('.saved')
|
60
60
|
else
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
render :new
|
65
|
-
end
|
66
|
-
format.turbo_stream { render partial: 'errors', locals: { errors: @conference.errors } }
|
67
|
-
end
|
61
|
+
add_breadcrumb t('.new')
|
62
|
+
flash.now[:alert] = t('.failed')
|
63
|
+
render :new, status: :unprocessable_entity
|
68
64
|
end
|
69
65
|
end
|
70
66
|
|
71
67
|
# Updates a conference.
|
72
68
|
# @return [void]
|
73
|
-
def update
|
69
|
+
def update
|
74
70
|
if @conference.update(conference_params)
|
75
71
|
redirect_to admin_conferences_conferences_path, success: t('.saved')
|
76
72
|
else
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
render :edit
|
81
|
-
end
|
82
|
-
format.turbo_stream { render partial: 'errors', locals: { errors: @conference.errors } }
|
83
|
-
end
|
73
|
+
add_breadcrumb @conference.name
|
74
|
+
flash.now[:alert] = t('.failed')
|
75
|
+
render :edit, status: :unprocessable_entity
|
84
76
|
end
|
85
77
|
end
|
86
78
|
|
87
79
|
# Destroys a conference.
|
88
80
|
# @return [void]
|
89
|
-
def destroy
|
81
|
+
def destroy
|
90
82
|
if @conference.destroy
|
91
83
|
redirect_to admin_conferences_conferences_path, success: t('.destroyed')
|
92
84
|
else
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
render :edit
|
97
|
-
end
|
98
|
-
format.turbo_stream { render partial: 'errors', locals: { errors: @conference.errors } }
|
99
|
-
end
|
85
|
+
add_breadcrumb @conference.name
|
86
|
+
flash.now[:alert] = t('.failed')
|
87
|
+
render :edit, status: :unprocessable_entity
|
100
88
|
end
|
101
89
|
end
|
102
90
|
|
@@ -33,51 +33,39 @@ module Spina
|
|
33
33
|
|
34
34
|
# Creates a delegate.
|
35
35
|
# @return [void]
|
36
|
-
def create
|
36
|
+
def create
|
37
37
|
@delegate = Delegate.new(delegate_params)
|
38
38
|
|
39
39
|
if @delegate.save
|
40
40
|
redirect_to admin_conferences_delegates_path, success: t('.saved')
|
41
41
|
else
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
render :new
|
46
|
-
end
|
47
|
-
format.turbo_stream { render partial: 'errors', locals: { errors: @delegate.errors } }
|
48
|
-
end
|
42
|
+
add_breadcrumb t('.new')
|
43
|
+
flash.now[:alert] = t('.failed')
|
44
|
+
render :new, status: :unprocessable_entity
|
49
45
|
end
|
50
46
|
end
|
51
47
|
|
52
48
|
# Updates a delegate.
|
53
49
|
# @return [void]
|
54
|
-
def update
|
50
|
+
def update
|
55
51
|
if @delegate.update(delegate_params)
|
56
52
|
redirect_to admin_conferences_delegates_path, success: t('.saved')
|
57
53
|
else
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
render :edit
|
62
|
-
end
|
63
|
-
format.turbo_stream { render partial: 'errors', locals: { errors: @delegate.errors } }
|
64
|
-
end
|
54
|
+
add_breadcrumb @delegate.full_name
|
55
|
+
flash.now[:alert] = t('.failed')
|
56
|
+
render :edit, status: :unprocessable_entity
|
65
57
|
end
|
66
58
|
end
|
67
59
|
|
68
60
|
# Destroys a delegate.
|
69
61
|
# @return [void]
|
70
|
-
def destroy
|
62
|
+
def destroy
|
71
63
|
if @delegate.destroy
|
72
64
|
redirect_to admin_conferences_delegates_path, success: t('.destroyed')
|
73
65
|
else
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
render :edit
|
78
|
-
end
|
79
|
-
format.turbo_stream { render partial: 'errors', locals: { errors: @delegate.errors } }
|
80
|
-
end
|
66
|
+
add_breadcrumb @delegate.full_name
|
67
|
+
flash.now[:alert] = t('.failed')
|
68
|
+
render :edit, status: :unprocessable_entity
|
81
69
|
end
|
82
70
|
end
|
83
71
|
|
@@ -33,51 +33,39 @@ module Spina
|
|
33
33
|
|
34
34
|
# Creates a dietary requirement.
|
35
35
|
# @return [void]
|
36
|
-
def create
|
36
|
+
def create
|
37
37
|
@dietary_requirement = DietaryRequirement.new dietary_requirement_params
|
38
38
|
|
39
39
|
if @dietary_requirement.save
|
40
40
|
redirect_to admin_conferences_dietary_requirements_path, success: t('.saved')
|
41
41
|
else
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
render :new
|
46
|
-
end
|
47
|
-
format.turbo_stream { render partial: 'errors', locals: { errors: @dietary_requirement.errors } }
|
48
|
-
end
|
42
|
+
add_breadcrumb t('.new')
|
43
|
+
flash.now[:alert] = t('.failed')
|
44
|
+
render :new, status: :unprocessable_entity
|
49
45
|
end
|
50
46
|
end
|
51
47
|
|
52
48
|
# Updates a dietary requirement.
|
53
49
|
# @return [void]
|
54
|
-
def update
|
50
|
+
def update
|
55
51
|
if @dietary_requirement.update(dietary_requirement_params)
|
56
52
|
redirect_to admin_conferences_dietary_requirements_path, success: t('.saved')
|
57
53
|
else
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
render :edit
|
62
|
-
end
|
63
|
-
format.turbo_stream { render partial: 'errors', locals: { errors: @dietary_requirement.errors } }
|
64
|
-
end
|
54
|
+
add_breadcrumb @dietary_requirement.name
|
55
|
+
flash.now[:alert] = t('.failed')
|
56
|
+
render :edit, status: :unprocessable_entity
|
65
57
|
end
|
66
58
|
end
|
67
59
|
|
68
60
|
# Destroys a dietary requirement.
|
69
61
|
# @return [void]
|
70
|
-
def destroy
|
62
|
+
def destroy
|
71
63
|
if @dietary_requirement.destroy
|
72
64
|
redirect_to admin_conferences_dietary_requirements_path, success: t('.destroyed')
|
73
65
|
else
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
render :edit
|
78
|
-
end
|
79
|
-
format.turbo_stream { render partial: 'errors', locals: { errors: @dietary_requirement.errors } }
|
80
|
-
end
|
66
|
+
add_breadcrumb @dietary_requirement.name
|
67
|
+
flash.now[:alert] = t('.failed')
|
68
|
+
render :edit, status: :unprocessable_entity
|
81
69
|
end
|
82
70
|
end
|
83
71
|
|
@@ -33,51 +33,39 @@ module Spina
|
|
33
33
|
|
34
34
|
# Creates an institution.
|
35
35
|
# @return [void]
|
36
|
-
def create
|
36
|
+
def create
|
37
37
|
@institution = Institution.new(conference_params)
|
38
38
|
|
39
39
|
if @institution.save
|
40
40
|
redirect_to admin_conferences_institutions_path, success: t('.saved')
|
41
41
|
else
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
render :new
|
46
|
-
end
|
47
|
-
format.turbo_stream { render partial: 'errors', locals: { errors: @institution.errors } }
|
48
|
-
end
|
42
|
+
add_breadcrumb t('.new')
|
43
|
+
flash.now[:alert] = t('.failed')
|
44
|
+
render :new, status: :unprocessable_entity
|
49
45
|
end
|
50
46
|
end
|
51
47
|
|
52
48
|
# Updates an institution.
|
53
49
|
# @return [void]
|
54
|
-
def update
|
50
|
+
def update
|
55
51
|
if @institution.update(conference_params)
|
56
52
|
redirect_to admin_conferences_institutions_path, success: t('.saved')
|
57
53
|
else
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
render :edit
|
62
|
-
end
|
63
|
-
format.turbo_stream { render partial: 'errors', locals: { errors: @institution.errors } }
|
64
|
-
end
|
54
|
+
add_breadcrumb @institution.name
|
55
|
+
flash.now[:alert] = t('.failed')
|
56
|
+
render :edit, status: :unprocessable_entity
|
65
57
|
end
|
66
58
|
end
|
67
59
|
|
68
60
|
# Destroys an institution.
|
69
61
|
# @return [void]
|
70
|
-
def destroy
|
62
|
+
def destroy
|
71
63
|
if @institution.destroy
|
72
64
|
redirect_to admin_conferences_institutions_path, success: t('.destroyed')
|
73
65
|
else
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
render :edit
|
78
|
-
end
|
79
|
-
format.turbo_stream { render partial: 'errors', locals: { errors: @institution.errors } }
|
80
|
-
end
|
66
|
+
add_breadcrumb @institution.name
|
67
|
+
flash.now[:alert] = t('.failed')
|
68
|
+
render :edit, status: :unprocessable_entity
|
81
69
|
end
|
82
70
|
end
|
83
71
|
|
@@ -32,51 +32,39 @@ module Spina
|
|
32
32
|
|
33
33
|
# Creates a presentation attachment type.
|
34
34
|
# @return [void]
|
35
|
-
def create
|
35
|
+
def create
|
36
36
|
@presentation_attachment_type = PresentationAttachmentType.new presentation_attachment_type_params
|
37
37
|
|
38
38
|
if @presentation_attachment_type.save
|
39
39
|
redirect_to admin_conferences_presentation_attachment_types_path, success: t('.saved')
|
40
40
|
else
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
render :new
|
45
|
-
end
|
46
|
-
format.turbo_stream { render partial: 'errors', locals: { errors: @presentation_attachment_type.errors } }
|
47
|
-
end
|
41
|
+
add_breadcrumb t('.new')
|
42
|
+
flash.now[:alert] = t('.failed')
|
43
|
+
render :new, status: :unprocessable_entity
|
48
44
|
end
|
49
45
|
end
|
50
46
|
|
51
47
|
# Updates a presentation attachment type.
|
52
48
|
# @return [void]
|
53
|
-
def update
|
49
|
+
def update
|
54
50
|
if @presentation_attachment_type.update(presentation_attachment_type_params)
|
55
51
|
redirect_to admin_conferences_presentation_attachment_types_path, success: t('.saved')
|
56
52
|
else
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
render :edit
|
61
|
-
end
|
62
|
-
format.turbo_stream { render partial: 'errors', locals: { errors: @presentation_attachment_type.errors } }
|
63
|
-
end
|
53
|
+
add_breadcrumb @presentation_attachment_type.name
|
54
|
+
flash.now[:alert] = t('.failed')
|
55
|
+
render :edit, status: :unprocessable_entity
|
64
56
|
end
|
65
57
|
end
|
66
58
|
|
67
59
|
# Destroys a presentation attachment type.
|
68
60
|
# @return [void]
|
69
|
-
def destroy
|
61
|
+
def destroy
|
70
62
|
if @presentation_attachment_type.destroy
|
71
63
|
redirect_to admin_conferences_presentation_attachment_types_path, success: t('.destroyed')
|
72
64
|
else
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
render :edit
|
77
|
-
end
|
78
|
-
format.turbo_stream { render partial: 'errors', locals: { errors: @presentation_attachment_type.errors } }
|
79
|
-
end
|
65
|
+
add_breadcrumb @presentation_attachment_type.name
|
66
|
+
flash.now[:alert] = t('.failed')
|
67
|
+
render :edit, status: :unprocessable_entity
|
80
68
|
end
|
81
69
|
end
|
82
70
|
|
@@ -10,8 +10,6 @@ module Spina
|
|
10
10
|
before_action :set_breadcrumbs
|
11
11
|
before_action :set_tabs
|
12
12
|
|
13
|
-
layout 'spina/admin/conferences/conferences'
|
14
|
-
|
15
13
|
# @!group Actions
|
16
14
|
|
17
15
|
# Renders a list of presentation types.
|
@@ -35,51 +33,39 @@ module Spina
|
|
35
33
|
|
36
34
|
# Creates a presentation type.
|
37
35
|
# @return [void]
|
38
|
-
def create
|
36
|
+
def create
|
39
37
|
@presentation_type = PresentationType.new presentation_type_params
|
40
38
|
|
41
39
|
if @presentation_type.save
|
42
40
|
redirect_to admin_conferences_presentation_types_path, success: t('.saved')
|
43
41
|
else
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
render :new
|
48
|
-
end
|
49
|
-
format.turbo_stream { render partial: 'errors', locals: { errors: @presentation_type.errors } }
|
50
|
-
end
|
42
|
+
add_breadcrumb t('.new')
|
43
|
+
flash.now[:alert] = t('.failed')
|
44
|
+
render :new, status: :unprocessable_entity
|
51
45
|
end
|
52
46
|
end
|
53
47
|
|
54
48
|
# Updates a presentation type.
|
55
49
|
# @return [void]
|
56
|
-
def update
|
50
|
+
def update
|
57
51
|
if @presentation_type.update(presentation_type_params)
|
58
52
|
redirect_to admin_conferences_presentation_types_path, success: t('.saved')
|
59
53
|
else
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
render :edit
|
64
|
-
end
|
65
|
-
format.turbo_stream { render partial: 'errors', locals: { errors: @presentation_type.errors } }
|
66
|
-
end
|
54
|
+
add_breadcrumb @presentation_type.name
|
55
|
+
flash.now[:alert] = t('.failed')
|
56
|
+
render :edit, status: :unprocessable_entity
|
67
57
|
end
|
68
58
|
end
|
69
59
|
|
70
60
|
# Destroys a presentation type.
|
71
61
|
# @return [void]
|
72
|
-
def destroy
|
62
|
+
def destroy
|
73
63
|
if @presentation_type.destroy
|
74
64
|
redirect_to admin_conferences_presentation_types_path, success: t('.destroyed')
|
75
65
|
else
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
render :edit
|
80
|
-
end
|
81
|
-
format.turbo_stream { render partial: 'errors', locals: { errors: @presentation_type.errors } }
|
82
|
-
end
|
66
|
+
add_breadcrumb @presentation_type.name
|
67
|
+
flash.now[:alert] = t('.failed')
|
68
|
+
render :edit, status: :unprocessable_entity
|
83
69
|
end
|
84
70
|
end
|
85
71
|
|
@@ -34,51 +34,39 @@ module Spina
|
|
34
34
|
|
35
35
|
# Creates a presentation.
|
36
36
|
# @return [void]
|
37
|
-
def create
|
37
|
+
def create
|
38
38
|
@presentation = Presentation.new presentation_params
|
39
39
|
|
40
40
|
if @presentation.save
|
41
41
|
redirect_to admin_conferences_presentations_path, success: t('.saved')
|
42
42
|
else
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
render :new
|
47
|
-
end
|
48
|
-
format.turbo_stream { render partial: 'errors', locals: { errors: @presentation.errors } }
|
49
|
-
end
|
43
|
+
add_breadcrumb t('.new')
|
44
|
+
flash.now[:alert] = t('.failed')
|
45
|
+
render :new, status: :unprocessable_entity
|
50
46
|
end
|
51
47
|
end
|
52
48
|
|
53
49
|
# Updates a presentation.
|
54
50
|
# @return [void]
|
55
|
-
def update
|
51
|
+
def update
|
56
52
|
if @presentation.update(presentation_params)
|
57
53
|
redirect_to admin_conferences_presentations_path, success: t('.saved')
|
58
54
|
else
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
render :edit
|
63
|
-
end
|
64
|
-
format.turbo_stream { render partial: 'errors', locals: { errors: @presentation.errors } }
|
65
|
-
end
|
55
|
+
add_breadcrumb @presentation.name
|
56
|
+
flash.now[:alert] = t('.failed')
|
57
|
+
render :edit, status: :unprocessable_entity
|
66
58
|
end
|
67
59
|
end
|
68
60
|
|
69
61
|
# Destroys a presentation.
|
70
62
|
# @return [void]
|
71
|
-
def destroy
|
63
|
+
def destroy
|
72
64
|
if @presentation.destroy
|
73
65
|
redirect_to admin_conferences_presentations_path, success: t('.destroyed')
|
74
66
|
else
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
render :edit
|
79
|
-
end
|
80
|
-
format.turbo_stream { render partial: 'errors', locals: { errors: @presentation.errors } }
|
81
|
-
end
|
67
|
+
add_breadcrumb @presentation.name
|
68
|
+
flash.now[:alert] = t('.failed')
|
69
|
+
render :edit, status: :unprocessable_entity
|
82
70
|
end
|
83
71
|
end
|
84
72
|
|
@@ -10,8 +10,6 @@ module Spina
|
|
10
10
|
before_action :set_breadcrumbs
|
11
11
|
before_action :set_tabs
|
12
12
|
|
13
|
-
layout 'spina/admin/conferences/institutions'
|
14
|
-
|
15
13
|
# @!group Actions
|
16
14
|
|
17
15
|
# Renders a list of rooms.
|
@@ -35,51 +33,39 @@ module Spina
|
|
35
33
|
|
36
34
|
# Creates a room.
|
37
35
|
# @return [void]
|
38
|
-
def create
|
36
|
+
def create
|
39
37
|
@room = Room.new(room_params)
|
40
38
|
|
41
39
|
if @room.save
|
42
40
|
redirect_to admin_conferences_rooms_path, success: t('.saved')
|
43
41
|
else
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
render :new
|
48
|
-
end
|
49
|
-
format.turbo_stream { render partial: 'errors', locals: { errors: @room.errors } }
|
50
|
-
end
|
42
|
+
add_breadcrumb t('.new')
|
43
|
+
flash.now[:alert] = t('.failed')
|
44
|
+
render :new, status: :unprocessable_entity
|
51
45
|
end
|
52
46
|
end
|
53
47
|
|
54
48
|
# Updates a room.
|
55
49
|
# @return [void]
|
56
|
-
def update
|
50
|
+
def update
|
57
51
|
if @room.update(room_params)
|
58
52
|
redirect_to admin_conferences_rooms_path, success: t('.saved')
|
59
53
|
else
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
render :edit
|
64
|
-
end
|
65
|
-
format.turbo_stream { render partial: 'errors', locals: { errors: @room.errors } }
|
66
|
-
end
|
54
|
+
add_breadcrumb @room.name
|
55
|
+
flash.now[:alert] = t('.failed')
|
56
|
+
render :edit, status: :unprocessable_entity
|
67
57
|
end
|
68
58
|
end
|
69
59
|
|
70
60
|
# Destroys a room.
|
71
61
|
# @return [void]
|
72
|
-
def destroy
|
62
|
+
def destroy
|
73
63
|
if @room.destroy
|
74
64
|
redirect_to admin_conferences_rooms_path, success: t('.destroyed')
|
75
65
|
else
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
render :edit
|
80
|
-
end
|
81
|
-
format.turbo_stream { render partial: 'errors', locals: { errors: @room.errors } }
|
82
|
-
end
|
66
|
+
add_breadcrumb @room.name
|
67
|
+
flash.now[:alert] = t('.failed')
|
68
|
+
render :edit, status: :unprocessable_entity
|
83
69
|
end
|
84
70
|
end
|
85
71
|
|