spina-admin-conferences-fork 3.0.0.rc1 → 3.0.0.rc4
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/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/conferences_controller.rb +1 -1
- data/app/views/spina/admin/conferences/application/_empty_list.html.haml +1 -1
- data/app/views/spina/admin/conferences/conferences/_event_fields.html.haml +7 -7
- data/app/views/spina/admin/conferences/conferences/_form.html.haml +1 -1
- data/app/views/spina/admin/conferences/conferences/_form_conference_details.html.haml +6 -5
- data/app/views/spina/admin/conferences/conferences/_form_parts.html.haml +1 -0
- data/app/views/spina/admin/conferences/conferences/index.html.haml +3 -1
- data/app/views/spina/admin/conferences/delegates/_form.html.haml +1 -1
- data/app/views/spina/admin/conferences/delegates/_form_delegate_details.html.haml +18 -23
- data/app/views/spina/admin/conferences/delegates/index.html.haml +3 -1
- data/app/views/spina/admin/conferences/dietary_requirements/_form.html.haml +1 -1
- data/app/views/spina/admin/conferences/dietary_requirements/_form_dietary_requirement_details.html.haml +2 -1
- data/app/views/spina/admin/conferences/dietary_requirements/index.html.haml +3 -1
- data/app/views/spina/admin/conferences/institutions/_form.html.haml +1 -1
- data/app/views/spina/admin/conferences/institutions/_form_institution_details.html.haml +3 -2
- data/app/views/spina/admin/conferences/institutions/index.html.haml +3 -1
- data/app/views/spina/admin/conferences/presentation_attachment_types/_form.html.haml +5 -3
- data/app/views/spina/admin/conferences/presentation_attachment_types/index.html.haml +3 -1
- data/app/views/spina/admin/conferences/presentation_types/_form.html.haml +1 -1
- data/app/views/spina/admin/conferences/presentation_types/_form_presentation_type_details.html.haml +4 -3
- data/app/views/spina/admin/conferences/presentation_types/index.html.haml +3 -1
- data/app/views/spina/admin/conferences/presentations/_attachment_fields.html.haml +5 -5
- data/app/views/spina/admin/conferences/presentations/_form.html.haml +1 -1
- data/app/views/spina/admin/conferences/presentations/_form_presentation_details.html.haml +18 -21
- data/app/views/spina/admin/conferences/presentations/index.html.haml +3 -1
- data/app/views/spina/admin/conferences/rooms/_form.html.haml +1 -1
- data/app/views/spina/admin/conferences/rooms/_form_room_details.html.haml +4 -3
- data/app/views/spina/admin/conferences/rooms/index.html.haml +3 -1
- data/app/views/spina/admin/conferences/sessions/_form.html.haml +1 -1
- data/app/views/spina/admin/conferences/sessions/_form_session_details.html.haml +6 -5
- data/app/views/spina/admin/conferences/sessions/index.html.haml +3 -1
- 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 -4
- 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 -4
- data/config/locales/en.yml +0 -31
- data/lib/spina/admin/conferences/version.rb +1 -1
- metadata +7 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3895d8e79d889fc4c09bf348f59bf712666d373dcb225fc323495b15edd06cac
|
4
|
+
data.tar.gz: 1f51a98f1cd209bc0f5f259d0e930cfb3e4cb2a7b5acd2e4f535ab8a6c05c23c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 99b94b4ac17247911e03176f5b65d3b0205114b662e60d93342acba73e90ff48effad4b6a7c96ef73c07b4a587039ab6d25ecddca01cc08020ead960a95e8d6b
|
7
|
+
data.tar.gz: 5a944c229a833c76cd3f5feddceece0fcea1f859fa6faba170390d10f03a464d4d74e8091fe3b7f7c3aa931ff2fd8f7cee939a70bca8539315af13b543d370a0
|
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
|
|
@@ -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
|
@@ -20,7 +20,7 @@ module Spina
|
|
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
22
|
events_attributes: %i[id name start_datetime finish_datetime description location]].freeze
|
23
|
-
PARTS = %w[text submission_url submission_email_address submission_date submission_text gallery sponsors].freeze
|
23
|
+
PARTS = %w[text submission_url submission_email_address submission_date submission_text gallery sponsors documents].freeze
|
24
24
|
|
25
25
|
before_action :set_conference, only: %i[edit update destroy]
|
26
26
|
before_action :set_conferences_breadcrumb
|
@@ -1,16 +1,16 @@
|
|
1
1
|
%div{ data: { 'part-id': "#{f.object.object_id}", 'tabs-target': 'pane' }, id: "pane_#{f.object.object_id}" }
|
2
2
|
= f.hidden_field :id
|
3
3
|
|
4
|
-
= render Spina::
|
4
|
+
= render Spina::Admin::Conferences::FormGroupComponent.new(label: Spina::Admin::Conferences::Event.human_attribute_name(:name)) do
|
5
5
|
= render Spina::Forms::TextFieldComponent.new(f, :name)
|
6
|
-
= render Spina::
|
7
|
-
= f.datetime_field :start_datetime
|
8
|
-
= render Spina::
|
9
|
-
= f.datetime_field :finish_datetime
|
10
|
-
= render Spina::
|
6
|
+
= render Spina::Admin::Conferences::FormGroupComponent.new(label: Spina::Admin::Conferences::Event.human_attribute_name(:start_datetime)) do
|
7
|
+
= f.datetime_field :start_datetime, class: 'form-input'
|
8
|
+
= render Spina::Admin::Conferences::FormGroupComponent.new(label: Spina::Admin::Conferences::Event.human_attribute_name(:finish_datetime)) do
|
9
|
+
= f.datetime_field :finish_datetime, class: 'form-input'
|
10
|
+
= render Spina::Admin::Conferences::FormGroupComponent.new(label: Spina::Admin::Conferences::Event.human_attribute_name(:location)) do
|
11
11
|
= render Spina::Forms::TextFieldComponent.new(f, :location)
|
12
12
|
|
13
|
-
= render Spina::
|
13
|
+
= render Spina::Admin::Conferences::FormGroupComponent.new(label: Spina::Admin::Conferences::Event.human_attribute_name(:description)) do
|
14
14
|
.mt-1.relative
|
15
15
|
= f.hidden_field :description, id: "#{f.object.object_id}_input"
|
16
16
|
|
@@ -26,4 +26,4 @@
|
|
26
26
|
= form_with model: [spina, :admin_conferences, @conference], id: dom_id(@conference), html: { autocomplete: 'off' } do |f|
|
27
27
|
- @tabs.each_with_index do |tab, i|
|
28
28
|
%div{ 'data-tabs-target': 'pane', id: tab, hidden: i != 0 }
|
29
|
-
= render "form_#{tab}", f: f
|
29
|
+
.max-w-5xl= render "form_#{tab}", f: f
|
@@ -1,9 +1,10 @@
|
|
1
|
-
|
1
|
+
.-mt-6
|
2
|
+
= render Spina::Admin::Conferences::FormGroupComponent.new(label: Spina::Admin::Conferences::Conference.human_attribute_name(:name)) do
|
2
3
|
= render Spina::Forms::TextFieldComponent.new(f, :name)
|
3
|
-
= render Spina::
|
4
|
-
= f.date_field :start_date, value: (@conference.start_date.strftime("%Y-%m-%d") if @conference.start_date.present?), placeholder: Spina::Admin::Conferences::Conference.human_attribute_name(:start_date)
|
5
|
-
= render Spina::
|
6
|
-
= f.date_field :finish_date, value: (@conference.finish_date.strftime("%Y-%m-%d") if @conference.finish_date.present?), placeholder: Spina::Admin::Conferences::Conference.human_attribute_name(:finish_date)
|
4
|
+
= render Spina::Admin::Conferences::FormGroupComponent.new(label: Spina::Admin::Conferences::Conference.human_attribute_name(:start_date)) do
|
5
|
+
= f.date_field :start_date, value: (@conference.start_date.strftime("%Y-%m-%d") if @conference.start_date.present?), placeholder: Spina::Admin::Conferences::Conference.human_attribute_name(:start_date), class: 'form-input'
|
6
|
+
= render Spina::Admin::Conferences::FormGroupComponent.new(label: Spina::Admin::Conferences::Conference.human_attribute_name(:finish_date)) do
|
7
|
+
= f.date_field :finish_date, value: (@conference.finish_date.strftime("%Y-%m-%d") if @conference.finish_date.present?), placeholder: Spina::Admin::Conferences::Conference.human_attribute_name(:finish_date), class: 'form-input'
|
7
8
|
|
8
9
|
|
9
10
|
.mt-6{ 'data-controller': 'repeater' }
|
@@ -22,4 +22,6 @@
|
|
22
22
|
active: controller_name == 'sessions')
|
23
23
|
|
24
24
|
= render partial: 'conferences', object: @conferences
|
25
|
-
|
25
|
+
.ml-8.inline-flex
|
26
|
+
.btn.btn-primary= link_to_prev_page @conferences, 'Previous'
|
27
|
+
.btn.btn-primary= link_to_next_page @conferences, 'Next'
|
@@ -1,29 +1,24 @@
|
|
1
1
|
= form_with model: [spina, :admin_conferences, @delegate], id: dom_id(@delegate), html: { autocomplete: 'off' } do |f|
|
2
|
-
|
2
|
+
.-mt-6
|
3
|
+
= render Spina::Admin::Conferences::FormGroupComponent.new(label: Spina::Admin::Conferences::Delegate.human_attribute_name(:first_name)) do
|
3
4
|
= render Spina::Forms::TextFieldComponent.new(f, :first_name)
|
4
|
-
= render Spina::
|
5
|
+
= render Spina::Admin::Conferences::FormGroupComponent.new(label: Spina::Admin::Conferences::Delegate.human_attribute_name(:last_name)) do
|
5
6
|
= render Spina::Forms::TextFieldComponent.new(f, :last_name)
|
6
|
-
= render Spina::
|
7
|
+
= render Spina::Admin::Conferences::FormGroupComponent.new(label: Spina::Admin::Conferences::Room.human_attribute_name(:institution)) do
|
7
8
|
= f.collection_select :institution_id, Spina::Admin::Conferences::Institution.all, :id, :name, {}, class: 'form-select'
|
8
|
-
= render Spina::
|
9
|
+
= render Spina::Admin::Conferences::FormGroupComponent.new(label: Spina::Admin::Conferences::Room.human_attribute_name(:email_address)) do
|
9
10
|
= f.email_field :email_address, class: 'form-input block w-full max-w-5xl sm:text-sm sm:leading-5'
|
10
|
-
= render Spina::
|
11
|
+
= render Spina::Admin::Conferences::FormGroupComponent.new(label: Spina::Admin::Conferences::Room.human_attribute_name(:url)) do
|
11
12
|
= f.url_field :url, class: 'form-input block w-full max-w-5xl sm:text-sm sm:leading-5'
|
12
|
-
= render Spina::
|
13
|
-
%
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
= f.collection_check_boxes :conference_ids, Spina::Admin::Conferences::Conference.all, :id, :name do |builder|
|
25
|
-
%tr
|
26
|
-
%td{ style: "padding-left: 16px" }
|
27
|
-
.form-checkbox
|
28
|
-
= builder.check_box
|
29
|
-
= builder.label
|
13
|
+
= render Spina::Admin::Conferences::FormGroupComponent.new(label: Spina::Admin::Conferences::Delegate.human_attribute_name(:dietary_requirements)) do
|
14
|
+
%ul.list-none.ml-4
|
15
|
+
= f.collection_check_boxes :dietary_requirement_ids, Spina::Admin::Conferences::DietaryRequirement.all, :id, :name, {}, class: 'form-checkbox rounded' do |builder|
|
16
|
+
%li
|
17
|
+
= builder.check_box
|
18
|
+
%span.text-sm.font-medium.text-gray-600= builder.label
|
19
|
+
= render Spina::Admin::Conferences::FormGroupComponent.new(label: Spina::Admin::Conferences::Delegate.human_attribute_name(:conferences)) do |builder|
|
20
|
+
%ul.list-none.ml-4
|
21
|
+
= f.collection_check_boxes :conference_ids, Spina::Admin::Conferences::Conference.all, :id, :name, {}, class: 'form-checkbox rounded' do |builder|
|
22
|
+
%li
|
23
|
+
= builder.check_box
|
24
|
+
%span.text-sm.font-medium.text-gray-600= builder.label
|
@@ -1,3 +1,4 @@
|
|
1
1
|
= form_with model: [spina, :admin_conferences, @dietary_requirement], id: dom_id(@dietary_requirement), html: { autocomplete: 'off' } do |f|
|
2
|
-
|
2
|
+
.-mt-6
|
3
|
+
= render Spina::Admin::Conferences::FormGroupComponent.new(label: Spina::Admin::Conferences::DietaryRequirement.human_attribute_name(:name)) do
|
3
4
|
= render Spina::Forms::TextFieldComponent.new(f, :name)
|
@@ -6,4 +6,6 @@
|
|
6
6
|
= t '.new'
|
7
7
|
|
8
8
|
= render partial: 'dietary_requirements', object: @dietary_requirements
|
9
|
-
|
9
|
+
.ml-8.inline-flex
|
10
|
+
.btn.btn-primary= link_to_prev_page @dietary_requirements, 'Previous'
|
11
|
+
.btn.btn-primary= link_to_next_page @dietary_requirements, 'Next'
|
@@ -1,7 +1,8 @@
|
|
1
1
|
= form_with model: [spina, :admin_conferences, @institution], id: dom_id(@institution), html: { autocomplete: 'off' } do |f|
|
2
|
-
|
2
|
+
.-mt-6
|
3
|
+
= render Spina::Admin::Conferences::FormGroupComponent.new(label: Spina::Admin::Conferences::Institution.human_attribute_name(:name)) do
|
3
4
|
= render Spina::Forms::TextFieldComponent.new(f, :name)
|
4
|
-
= render Spina::
|
5
|
+
= render Spina::Admin::Conferences::FormGroupComponent.new(label: Spina::Admin::Conferences::Institution.human_attribute_name(:city)) do
|
5
6
|
= render Spina::Forms::TextFieldComponent.new(f, :city)
|
6
7
|
|
7
8
|
|
@@ -13,6 +13,8 @@
|
|
13
13
|
= t '.save'
|
14
14
|
|
15
15
|
.p-4.md:p-8
|
16
|
-
|
17
|
-
=
|
18
|
-
|
16
|
+
.max-w-5xl
|
17
|
+
= form_with model: [spina, :admin_conferences, @presentation_attachment_type], id: dom_id(@presentation_attachment_type), html: { autocomplete: 'off' } do |f|
|
18
|
+
.-mt-6
|
19
|
+
= render Spina::Admin::Conferences::FormGroupComponent.new(label: Spina::Admin::Conferences::DietaryRequirement.human_attribute_name(:name)) do
|
20
|
+
= render Spina::Forms::TextFieldComponent.new(f, :name)
|
@@ -6,4 +6,6 @@
|
|
6
6
|
= t '.new'
|
7
7
|
|
8
8
|
= render partial: 'presentation_attachment_types', object: @presentation_attachment_types
|
9
|
-
|
9
|
+
.ml-8.inline-flex
|
10
|
+
.btn.btn-primary= link_to_prev_page @presentation_attachment_types, 'Previous'
|
11
|
+
.btn.btn-primary= link_to_next_page @presentation_attachment_types, 'Next'
|
data/app/views/spina/admin/conferences/presentation_types/_form_presentation_type_details.html.haml
CHANGED
@@ -1,7 +1,8 @@
|
|
1
1
|
= form_with model: [spina, :admin_conferences, @presentation_type], id: dom_id(@presentation_type), html: { autocomplete: 'off' } do |f|
|
2
|
-
|
2
|
+
.-mt-6
|
3
|
+
= render Spina::Admin::Conferences::FormGroupComponent.new(label: Spina::Admin::Conferences::PresentationType.human_attribute_name(:conference)) do
|
3
4
|
= f.collection_select :conference_id, Spina::Admin::Conferences::Conference.order(:dates).reverse_order, :id, :name
|
4
|
-
= render Spina::
|
5
|
+
= render Spina::Admin::Conferences::FormGroupComponent.new(label: Spina::Admin::Conferences::PresentationType.human_attribute_name(:name)) do
|
5
6
|
= render Spina::Forms::TextFieldComponent.new(f, :name)
|
6
|
-
= render Spina::
|
7
|
+
= render Spina::Admin::Conferences::FormGroupComponent.new(label: Spina::Admin::Conferences::PresentationType.human_attribute_name(:duration)) do
|
7
8
|
= f.number_field :minutes, value: @presentation_type.minutes, placeholder: Spina::Admin::Conferences::PresentationType.human_attribute_name(:duration), required: true, step: 5, min: 5
|
@@ -22,4 +22,6 @@
|
|
22
22
|
active: controller_name == 'sessions')
|
23
23
|
|
24
24
|
= render partial: 'presentation_types', object: @presentation_types
|
25
|
-
|
25
|
+
.ml-8.inline-flex
|
26
|
+
.btn.btn-primary= link_to_prev_page @presentation_types, 'Previous'
|
27
|
+
.btn.btn-primary= link_to_next_page @presentation_types, 'Next'
|
@@ -1,12 +1,12 @@
|
|
1
1
|
%div{ data: { 'part-id': "#{f.object.object_id}", 'tabs-target': 'pane' }, id: "pane_#{f.object.object_id}" }
|
2
2
|
= f.hidden_field :id
|
3
3
|
|
4
|
-
= render Spina::
|
5
|
-
= f.collection_select :attachment_type_id, Spina::Admin::Conferences::PresentationAttachmentType.all, :id, :name
|
4
|
+
= render Spina::Admin::Conferences::FormGroupComponent.new(label: Spina::Admin::Conferences::PresentationAttachment.human_attribute_name(:attachment_type)) do
|
5
|
+
= f.collection_select :attachment_type_id, Spina::Admin::Conferences::PresentationAttachmentType.all, :id, :name, {}, class: 'form-select'
|
6
6
|
|
7
|
-
= render Spina::
|
8
|
-
|
9
|
-
= f.collection_select :attachment_id, Spina::Attachment.sorted, :id, :name, { include_blank: t('spina.attachments.choose_attachment') }, { class: 'form-select
|
7
|
+
= render Spina::Admin::Conferences::FormGroupComponent.new(label: Spina::Admin::Conferences::PresentationAttachment.human_attribute_name(:attachment)) do
|
8
|
+
%div{ data: { controller: 'attachment-picker' } }
|
9
|
+
= f.collection_select :attachment_id, Spina::Attachment.sorted, :id, :name, { include_blank: t('spina.attachments.choose_attachment') }, { class: 'form-select', data: { action: 'attachment-picker#pick' } }
|
10
10
|
|
11
11
|
.text-right
|
12
12
|
= button_tag t('spina.ui.delete'), type: :button, class: 'btn btn-default bg-transparent hover:bg-white hover:text-red-500 h-8 px-3 inline-block mt-3', data: { action: 'repeater#removeFields', id: "pane_#{f.object.object_id}" }
|
@@ -1,18 +1,19 @@
|
|
1
1
|
= form_with model: [spina, :admin_conferences, @presentation], id: dom_id(@presentation), html: { autocomplete: 'off' } do |f|
|
2
2
|
%div{ data: { controller: 'select-options', select_options: { record_value: @conferences } } }
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
3
|
+
.-mt-6
|
4
|
+
= render Spina::Admin::Conferences::FormGroupComponent.new(label: Spina::Admin::Conferences::Presentation.human_attribute_name(:conference)) do
|
5
|
+
= 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: 'select-options#setVisibility', 'select_options_target': 'select', text_key: 'name' }, class: 'form-select'
|
6
|
+
= render Spina::Admin::Conferences::FormGroupComponent.new(label: Spina::Admin::Conferences::Presentation.human_attribute_name(:presentation_type)) do
|
7
|
+
= 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: 'select-options#setVisibility','select_options_target': 'select', key_path: 'presentation_types', text_key: 'name' }, class: 'form-select'
|
8
|
+
= render Spina::Admin::Conferences::FormGroupComponent.new(label: Spina::Admin::Conferences::Presentation.human_attribute_name(:session)) do
|
9
|
+
= f.collection_select :session_id, (@presentation.presentation_type || Spina::Admin::Conferences::Conference.first).sessions, :id, :name, { include_blank: true }, required: true, data: {'select_options_target': 'select', key_path: 'presentation_types:sessions', text_key: 'name' }, class: 'form-select'
|
10
|
+
|
11
|
+
= render Spina::Admin::Conferences::FormGroupComponent.new(label: Spina::Admin::Conferences::Presentation.human_attribute_name(:start_datetime)) do
|
12
|
+
= f.datetime_field :start_datetime, class: 'form-input'
|
13
|
+
= render Spina::Admin::Conferences::FormGroupComponent.new(label: Spina::Admin::Conferences::Presentation.human_attribute_name(:title)) do
|
13
14
|
= render Spina::Forms::TextFieldComponent.new(f, :title)
|
14
15
|
|
15
|
-
= render Spina::
|
16
|
+
= render Spina::Admin::Conferences::FormGroupComponent.new(label: Spina::Admin::Conferences::Presentation.human_attribute_name(:abstract)) do
|
16
17
|
.mt-1.relative
|
17
18
|
= f.hidden_field :abstract, id: "#{f.object.object_id}_input"
|
18
19
|
|
@@ -21,16 +22,12 @@
|
|
21
22
|
|
22
23
|
%trix-editor(class='prose prose-sm focus:outline-none max-w-3xl xl:border-r border-dashed border-gray-200 pr-3' toolbar="#{f.object.object_id}_trix-toolbar" input="#{f.object.object_id}_input" data-trix-target='editor' data-action='trix-file-accept->trix#preventDefault')
|
23
24
|
|
24
|
-
= render Spina::
|
25
|
-
%
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
.form-checkbox
|
31
|
-
= builder.check_box
|
32
|
-
= builder.label
|
33
|
-
|
25
|
+
= render Spina::Admin::Conferences::FormGroupComponent.new(label: Spina::Admin::Conferences::Presentation.human_attribute_name(:presenters)) do
|
26
|
+
%ul.list-none.ml-4
|
27
|
+
= f.collection_check_boxes :presenter_ids, Spina::Admin::Conferences::Delegate.order(:last_name, :first_name), :id, :reversed_name_and_institution, {}, class: 'form-checkbox rounded' do |builder|
|
28
|
+
%li
|
29
|
+
= builder.check_box
|
30
|
+
%span.text-sm.font-medium.text-gray-600= builder.label
|
34
31
|
|
35
32
|
.mt-6{ 'data-controller': 'repeater' }
|
36
33
|
%label.block.text-sm.leading-5.font-medium.text-gray-700= Spina::Admin::Conferences::Presentation.human_attribute_name :attachments
|
@@ -1,7 +1,8 @@
|
|
1
1
|
= form_with model: [spina, :admin_conferences, @room], id: dom_id(@room), html: { autocomplete: 'off' } do |f|
|
2
|
-
|
2
|
+
.-mt-6
|
3
|
+
= render Spina::Admin::Conferences::FormGroupComponent.new(label: Spina::Admin::Conferences::Room.human_attribute_name(:institution)) do
|
3
4
|
= f.collection_select :institution_id, Spina::Admin::Conferences::Institution.all, :id, :name, {}, class: 'form-select'
|
4
|
-
= render Spina::
|
5
|
+
= render Spina::Admin::Conferences::FormGroupComponent.new(label: Spina::Admin::Conferences::Institution.human_attribute_name(:building)) do
|
5
6
|
= render Spina::Forms::TextFieldComponent.new(f, :building)
|
6
|
-
= render Spina::
|
7
|
+
= render Spina::Admin::Conferences::FormGroupComponent.new(label: Spina::Admin::Conferences::Institution.human_attribute_name(:number)) do
|
7
8
|
= render Spina::Forms::TextFieldComponent.new(f, :number)
|
@@ -1,15 +1,16 @@
|
|
1
1
|
= form_with model: [spina, :admin_conferences, @session], id: dom_id(@session), html: { autocomplete: 'off' } do |f|
|
2
|
-
|
2
|
+
.-mt-6
|
3
|
+
= render Spina::Admin::Conferences::FormGroupComponent.new(label: Spina::Admin::Conferences::Session.human_attribute_name(:name)) do
|
3
4
|
= render Spina::Forms::TextFieldComponent.new(f, :name)
|
4
5
|
|
5
6
|
%div{ data: { controller: 'select-options', 'select_options': { record_value: @conferences } } }
|
6
|
-
= render Spina::
|
7
|
+
= render Spina::Admin::Conferences::FormGroupComponent.new(label: Spina::Admin::Conferences::Session.human_attribute_name(:conference)) do
|
7
8
|
= 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, data: { action: 'select-options#setVisibility','select_options_target': 'select', text_key: 'name' }
|
8
|
-
= render Spina::
|
9
|
+
= render Spina::Admin::Conferences::FormGroupComponent.new(label: Spina::Admin::Conferences::Session.human_attribute_name(:presentation_type)) do
|
9
10
|
= 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 }, data: {'select_options_target': 'select', text_key: 'name', key_path: 'presentation_types' }
|
10
11
|
|
11
12
|
%div{ data: { controller: 'select-options', 'select_options': { record_value: @institutions } } }
|
12
|
-
= render Spina::
|
13
|
+
= render Spina::Admin::Conferences::FormGroupComponent.new(label: Spina::Admin::Conferences::Session.human_attribute_name(:institution)) do
|
13
14
|
= 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, data: { action: 'select-options#setVisibility','select_options_target': 'select', text_key: 'name' }
|
14
|
-
= render Spina::
|
15
|
+
= render Spina::Admin::Conferences::FormGroupComponent.new(label: Spina::Admin::Conferences::Session.human_attribute_name(:room)) do
|
15
16
|
= f.collection_select :room_id, @session.institution.present? ? @session.institution.rooms : Spina::Admin::Conferences::Institution.first.rooms, :id, :name, { include_blank: true }, data: {'select_options_target': 'select', text_key: 'name', key_path: 'rooms' }
|
@@ -22,4 +22,6 @@
|
|
22
22
|
active: controller_name == 'sessions')
|
23
23
|
|
24
24
|
= render partial: 'sessions', object: @sessions
|
25
|
-
|
25
|
+
.ml-8.inline-flex
|
26
|
+
.btn.btn-primary= link_to_prev_page @sessions, 'Previous'
|
27
|
+
.btn.btn-primary= link_to_next_page @sessions, 'Next'
|
@@ -1,2 +1,2 @@
|
|
1
|
-
= render Spina::
|
2
|
-
= f.date_field :content, placeholder: f.object.title
|
1
|
+
= render Spina::Admin::Conferences::FormGroupComponent.new(label: f.object.title) do
|
2
|
+
= f.date_field :content, placeholder: f.object.title, class: 'form-select'
|
@@ -1,4 +1,2 @@
|
|
1
|
-
.
|
2
|
-
|
3
|
-
.mt-1
|
4
|
-
= f.email_field :content, class: 'form-input block w-full max-w-5xl sm:text-sm sm:leading-5'
|
1
|
+
= render Spina::Admin::Conferences::FormGroupComponent.new(label: f.object.title) do
|
2
|
+
= f.email_field :content, class: 'form-input block w-full max-w-5xl sm:text-sm sm:leading-5'
|
@@ -1,2 +1,2 @@
|
|
1
|
-
= render Spina::
|
2
|
-
= f.datetime_field :content, placeholder: f.object.title
|
1
|
+
= render Spina::Admin::Conferences::FormGroupComponent.new(label: f.object.title) do
|
2
|
+
= f.datetime_field :content, placeholder: f.object.title, class: 'form-select'
|
@@ -1,4 +1,2 @@
|
|
1
|
-
.
|
2
|
-
|
3
|
-
.mt-1
|
4
|
-
= f.url_field :content, class: 'form-input block w-full max-w-5xl sm:text-sm sm:leading-5'
|
1
|
+
= render Spina::Admin::Conferences::FormGroupComponent.new(label: f.object.title) do
|
2
|
+
= f.url_field :content, class: 'form-input block w-full max-w-5xl sm:text-sm sm:leading-5'
|
data/config/locales/en.yml
CHANGED
@@ -1,34 +1,3 @@
|
|
1
|
-
# Files in the config/locales directory are used for internationalization
|
2
|
-
# and are automatically loaded by Rails. If you want to use locales other
|
3
|
-
# than English, add the necessary files in this directory.
|
4
|
-
#
|
5
|
-
# To use the locales, use `I18n.t`:
|
6
|
-
#
|
7
|
-
# I18n.t 'hello'
|
8
|
-
#
|
9
|
-
# In views, this is aliased to just `t`:
|
10
|
-
#
|
11
|
-
# <%= t('hello') %>
|
12
|
-
#
|
13
|
-
# To use a different locale, set it with `I18n.locale`:
|
14
|
-
#
|
15
|
-
# I18n.locale = :es
|
16
|
-
#
|
17
|
-
# This would use the information in config/locales/es.yml.
|
18
|
-
#
|
19
|
-
# The following keys must be escaped otherwise they will not be retrieved by
|
20
|
-
# the default I18n backend:
|
21
|
-
#
|
22
|
-
# true, false, on, off, yes, no
|
23
|
-
#
|
24
|
-
# Instead, surround them with single quotes.
|
25
|
-
#
|
26
|
-
# en:
|
27
|
-
# 'true': 'foo'
|
28
|
-
#
|
29
|
-
# To learn more, please read the Rails Internationalization guide
|
30
|
-
# available at http://guides.rubyonrails.org/i18n.html.
|
31
|
-
|
32
1
|
en:
|
33
2
|
spina:
|
34
3
|
show: Show
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: spina-admin-conferences-fork
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.0.0.
|
4
|
+
version: 3.0.0.rc4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Louis Van Steene
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2022-
|
12
|
+
date: 2022-03-18 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: haml-rails
|
@@ -337,14 +337,14 @@ dependencies:
|
|
337
337
|
requirements:
|
338
338
|
- - "~>"
|
339
339
|
- !ruby/object:Gem::Version
|
340
|
-
version: '
|
340
|
+
version: '5.0'
|
341
341
|
type: :development
|
342
342
|
prerelease: false
|
343
343
|
version_requirements: !ruby/object:Gem::Requirement
|
344
344
|
requirements:
|
345
345
|
- - "~>"
|
346
346
|
- !ruby/object:Gem::Version
|
347
|
-
version: '
|
347
|
+
version: '5.0'
|
348
348
|
description: Keep track of conference attendees and presentations with this plugin.
|
349
349
|
email:
|
350
350
|
- louis@lvs.me.uk
|
@@ -360,6 +360,9 @@ files:
|
|
360
360
|
- app/assets/javascripts/spina/admin/conferences/application.js
|
361
361
|
- app/assets/javascripts/spina/admin/conferences/controllers/select_options_controller.js
|
362
362
|
- app/assets/stylesheets/spina/admin/conferences/application.tailwind.css
|
363
|
+
- app/components/spina/admin/conferences/application_component.rb
|
364
|
+
- app/components/spina/admin/conferences/form_group_component.html.haml
|
365
|
+
- app/components/spina/admin/conferences/form_group_component.rb
|
363
366
|
- app/controllers/spina/admin/conferences/application_controller.rb
|
364
367
|
- app/controllers/spina/admin/conferences/conferences_controller.rb
|
365
368
|
- app/controllers/spina/admin/conferences/delegates_controller.rb
|