spina-admin-conferences-fork 2.1.1 → 3.0.0.rc3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +40 -57
- 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/components/spina/admin/conferences/application_component.rb +11 -0
- data/app/components/spina/admin/conferences/form_group_component.html.haml +4 -0
- data/app/components/spina/admin/conferences/form_group_component.rb +17 -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/_empty_list.html.haml +1 -1
- 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 +29 -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 +6 -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 +25 -5
- 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 +24 -53
- data/app/views/spina/admin/conferences/delegates/_form_presentations.html.haml +1 -0
- data/app/views/spina/admin/conferences/delegates/index.html.haml +17 -11
- 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 +4 -8
- data/app/views/spina/admin/conferences/dietary_requirements/index.html.haml +9 -5
- 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 +25 -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 +22 -5
- data/app/views/spina/admin/conferences/presentation_attachment_types/_form.html.haml +17 -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 +9 -5
- 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 +8 -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 +25 -5
- 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 +56 -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 +18 -11
- 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 +8 -16
- data/app/views/spina/admin/conferences/rooms/_room.html.haml +11 -8
- data/app/views/spina/admin/conferences/rooms/index.html.haml +22 -5
- 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 +14 -19
- data/app/views/spina/admin/conferences/sessions/_session.html.haml +11 -8
- data/app/views/spina/admin/conferences/sessions/index.html.haml +25 -5
- 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 +2 -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 +2 -2
- data/config/locales/en.yml +31 -40
- 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 +65 -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
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: '0924918c23bbaf05550c4f245a658955dc8116dfbdda3e9fe17abfc59576dc97'
|
4
|
+
data.tar.gz: 201b0680cad2c8c4b16a922c11784c1ca170d534288eed0d44c438fe141f2a56
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 71f9d163f9a0e96c5b7202143df4a49e1dc6945fc200fd427c1e3f356aed5f7e04d373916f5a59d9a7827f1c0b4a53ac1a31d554997e507b33b0651c47fefff3
|
7
|
+
data.tar.gz: 805deb378c7202842bf7bbbfaf1bf256341386e978f4566b1a2d71aaaf555fea4bddd5ea6eaa7866f0d8ba08ba51d687981bcccb96f275723c5c1ba353381a2a
|
data/README.md
CHANGED
@@ -1,33 +1,34 @@
|
|
1
1
|
# Conferences
|
2
2
|
|
3
|
-
|
4
|
-
|
5
|
-
[
|
6
|
-
|
7
|
-
|
8
|
-
[![
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
3
|
+
*Conferences* is a plugin for [Spina](https://www.spinacms.com/) that provides conference management functionality. With the plugin, you'll be able to manage details of conferences, delegates, and presentations.
|
4
|
+
|
5
|
+
Spina is a content management system built in [Ruby on Rails](http://rubyonrails.org/). *Conferences* augments Spina by providing an admin interface for managing conferences.
|
6
|
+
|
7
|
+
![Rails tests](https://github.com/louis-vs/spina-admin-conferences-fork/workflows/Verify/badge.svg?branch=main&event=push)
|
8
|
+
[![CodeFactor](https://www.codefactor.io/repository/github/louis-vs/spina-admin-conferences-fork/badge)](https://www.codefactor.io/repository/github/louis-vs/spina-admin-conferences-fork)
|
9
|
+
|
10
|
+
## Features
|
11
|
+
|
12
|
+
The conferences plugin covers many important aspects of managing a conferences, including:
|
13
|
+
|
14
|
+
- Simple interface that builds upon Spina's own.
|
15
|
+
- Manage details about delegates, including dietary requirements.
|
16
|
+
- Manage conferences, supporting conferences with multiple host institutions.
|
17
|
+
- Manage presentations, including presentation types.
|
18
|
+
|
19
|
+
Currently, a submissions management system is not included, but this is planned for a future release. This will allow you to manage the submissions process for conferences in a manner integrated with the CMS.
|
14
20
|
|
15
21
|
## Usage
|
16
22
|
|
17
23
|
The plugin will add a **Conferences** item to Spina's primary navigation menu.
|
18
24
|
The menu structure will then be as follows:
|
19
25
|
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
* Conferences
|
27
|
-
|
28
|
-
* Delegates
|
29
|
-
|
30
|
-
* Presentations
|
26
|
+
- *Other menu items*
|
27
|
+
- Conferences
|
28
|
+
- Institutions
|
29
|
+
- Conferences
|
30
|
+
- Delegates
|
31
|
+
- Presentations
|
31
32
|
|
32
33
|
After installing the plugin, you just need to start your server in the usual way:
|
33
34
|
```bash
|
@@ -37,63 +38,45 @@ $ rails s
|
|
37
38
|
## Installation
|
38
39
|
|
39
40
|
### From scratch
|
41
|
+
Make sure you have a working installation of Ruby on Rails 7. You can find a setup guide [here](https://guides.rubyonrails.org/getting_started.html).
|
40
42
|
|
41
|
-
You
|
42
|
-
Read how to do this in the [Rails getting started guide](https://guides.rubyonrails.org/getting_started.html 'Getting Started with Rails').
|
43
|
+
You then need to install Spina, following the guide [on the Spina website](https://spinacms.com/docs).
|
43
44
|
|
44
|
-
|
45
|
-
```bash
|
46
|
-
$ rails new your_app --database postgresql
|
47
|
-
$ rails db:create
|
48
|
-
$ rails active_storage:install
|
49
|
-
```
|
50
|
-
|
51
|
-
Add this line to your application's Gemfile:
|
45
|
+
To install the plugin, add this line to your application's Gemfile:
|
52
46
|
|
53
47
|
```ruby
|
54
|
-
gem 'spina'
|
48
|
+
gem 'spina-admin-conferences-fork', '~> 3.0'
|
55
49
|
```
|
56
50
|
|
57
|
-
|
58
|
-
```bash
|
59
|
-
$ bundle:install
|
60
|
-
```
|
51
|
+
Then execute:
|
61
52
|
|
62
|
-
Run the Spina install generator:
|
63
53
|
```bash
|
64
|
-
$
|
54
|
+
$ bundle install
|
65
55
|
```
|
66
56
|
|
67
|
-
|
68
|
-
Then follow the instructions below.
|
69
|
-
|
70
|
-
### For existing Spina installations
|
71
|
-
|
72
|
-
Add this line to your application's Gemfile:
|
57
|
+
You'll then need to install and run the migrations from the plugin:
|
73
58
|
|
74
|
-
```
|
75
|
-
|
59
|
+
```bash
|
60
|
+
$ bin/rails spina_admin_conferences:install:migrations
|
61
|
+
$ bin/rails db:migrate
|
76
62
|
```
|
77
63
|
|
78
|
-
You
|
64
|
+
You can then start a local server to test that everything's working.
|
79
65
|
|
80
|
-
First install the migrations and then migrate the database:
|
81
66
|
```bash
|
82
|
-
$
|
83
|
-
$ rake db:migrate
|
67
|
+
$ bin/rails s
|
84
68
|
```
|
85
69
|
|
70
|
+
You can manually populate the database from within the app, or alternatively you can use seed data for testing. A sample `seeds.rb` file can be found [here](../master/test/dummy/db/seeds.rb).
|
71
|
+
|
72
|
+
|
86
73
|
### Configuring the main Rails app
|
87
74
|
|
88
|
-
Conferences requires a job queueing backend for import functionality, and you'll also want to cache pages listing
|
89
|
-
presentations, conferences, and so on. Read about this in the Rails guides covering
|
90
|
-
[Active Job](https://guides.rubyonrails.org/active_job_basics.html) and
|
91
|
-
[caching](https://guides.rubyonrails.org/caching_with_rails.html).
|
75
|
+
Conferences requires a job queueing backend for import functionality, and you'll also want to cache pages listing presentations, conferences, and so on. Read about this in the Rails guides covering [Active Job](https://guides.rubyonrails.org/active_job_basics.html) and [caching](https://guides.rubyonrails.org/caching_with_rails.html).
|
92
76
|
|
93
77
|
## Contributing
|
94
78
|
|
95
|
-
|
96
|
-
If there's a bug, or you have a feature request, make an issue on GitHub first.
|
79
|
+
Bug reports and feature requests are welcome in the [Issues](https://github.com/louis-vs/spina-admin-conferences-fork/issues) section. Translations are also very welcome!
|
97
80
|
|
98
81
|
## License
|
99
82
|
|
@@ -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
|
@@ -0,0 +1,17 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Spina
|
4
|
+
module Admin
|
5
|
+
module Conferences
|
6
|
+
# Correctly styles label, description and content of form fields.
|
7
|
+
class FormGroupComponent < ApplicationComponent
|
8
|
+
attr_reader :label, :description
|
9
|
+
|
10
|
+
def initialize(label:, description: '')
|
11
|
+
@label = label
|
12
|
+
@description = description
|
13
|
+
end
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
@@ -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
|
|