New associations and models: schedule versioning
For the schedule versioning in the admin interface (having multiple possible shcedules) we need to change some models and associations. It has also been create a rake:move_events_attributes task to migrate the data. User Interface addapted to make use of the introduced associations and models
This commit is contained in:
parent
e34a1904e0
commit
c047ffd699
21 changed files with 165 additions and 49 deletions
|
|
@ -49,7 +49,7 @@
|
|||
|
||||
= f.inputs 'Enable pre-registration' do
|
||||
= f.input :require_registration, label: 'Require participants to register to your event'
|
||||
- message = @event.room ? "Value must be between 1 and #{@event.room.size}" : 'Check room capacity after scheduling.'
|
||||
- message = @event.scheduled_room ? "Value must be between 1 and #{@event.scheduled_room.size}" : 'Check room capacity after scheduling.'
|
||||
= f.input :max_attendees, hint: 'The maximum number of participants. ' + message
|
||||
|
||||
- if current_user.has_any_role? :admin, { name: :organizer, resource: @conference }, { name: :cfp, resource: @conference }
|
||||
|
|
|
|||
|
|
@ -67,15 +67,15 @@
|
|||
%dl#proposal-info
|
||||
.col-md-12
|
||||
%dt Date:
|
||||
%dd= @event.start_time.strftime("%Y %B %e %H:%M") if @event.start_time
|
||||
%dd= @event.scheduled_start_time.strftime("%Y %B %e %H:%M") if @event.scheduled_start_time.present?
|
||||
.col-md-12
|
||||
%dt Duration:
|
||||
%dd= show_time(@event.event_type.length)
|
||||
.col-md-12
|
||||
%dt Room:
|
||||
%dd
|
||||
- if @event.room
|
||||
= @event.room.name
|
||||
- if @event.scheduled_room
|
||||
= @event.scheduled_room.name
|
||||
.col-md-12
|
||||
%dt Conference:
|
||||
%dd= @event.program.conference.title
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue