Implement track scheduling

Add track association to schedule
Show schedules in admin sidebar to track organizers
Allow track organizers to manage the schedules of their tracks
Don't allow self-organized track events to be dragged or unscheduled in
a conference schedule
Make scheduled events of self-organized tracks appear semitransparent in
conference schedules
Make the rooms of confirmed self_organized tracks appear semitransparent
and don't allow events to be scheduled to it in the conference schedules
during the dates of its track
Create admin/SchedulesController#new action
Add a button in admin/Schedules#index to create schedules for tracks
Add self_organized scope to Track
Modify Schedules#show to handle track schedules and show a unified
schedule
Allow track organizers to create new schedules for their tracks
Correctly identify scheduled and unscheduled events in Schedules#events
Fix Event#room and Event#time for when the event is scheduled in a track
schedule
Modify Program#selected_event_schedules to include the event_schedules
of selected track schedules
Modify Track#revoke_role_and_cleanup to destroy the track's schedules
and revert its events' state to new
Add tabs for conference and track schedules in admin/Schedules#index
Add button to Create/Show a tracks schedule in Tracks#index and #show
Fix concurrent_events in application_helper because of changes in
Program#selected_event_schedules
Do not take into account cfp_active in Event#valid_track
Modify EventsController#get_tracks accordingly
Enforce cfp_active of track to be enabled for proposals in
ProposalsController#create and #update
Add support for multiple schedules per track
Add selected_schedule_id to Track
Load EventSchedules of selected track schedules for conference schedules
in admin/SchedulesController#show
Modify SchedulesController#show to take into account only the selected
track schedules
Create Event#selected_schedule_id and use it in Event#scheduled? and
Event#time
Validate that an EventSchedule for an event of a self-organized track
belongs to one of the track's schedules
Add 'Manage' button in Tracks#index, #show that sends you to the admin
side of things
Add admin/TracksController#update_selected_schedule to update the
selected_schedule_id of tracks
This commit is contained in:
AEtherC0r3 2017-08-09 18:12:20 +03:00 committed by Stella Rouzi
parent af7efdb6fe
commit 7eea930269
37 changed files with 443 additions and 118 deletions

View file

@ -431,9 +431,11 @@ ActiveRecord::Schema.define(version: 20170816203325) do
t.integer "program_id"
t.datetime "created_at", null: false
t.datetime "updated_at", null: false
t.integer "track_id"
end
add_index "schedules", ["program_id"], name: "index_schedules_on_program_id"
add_index "schedules", ["track_id"], name: "index_schedules_on_track_id"
create_table "splashpages", force: :cascade do |t|
t.integer "conference_id"
@ -520,24 +522,26 @@ ActiveRecord::Schema.define(version: 20170816203325) do
end
create_table "tracks", force: :cascade do |t|
t.string "guid", null: false
t.string "name", null: false
t.string "guid", null: false
t.string "name", null: false
t.text "description"
t.string "color"
t.datetime "created_at"
t.datetime "updated_at"
t.integer "program_id"
t.string "short_name", null: false
t.string "state", default: "new", null: false
t.boolean "cfp_active", null: false
t.string "short_name", null: false
t.string "state", default: "new", null: false
t.boolean "cfp_active", null: false
t.integer "submitter_id"
t.integer "room_id"
t.date "start_date"
t.date "end_date"
t.text "relevance"
t.integer "selected_schedule_id"
end
add_index "tracks", ["room_id"], name: "index_tracks_on_room_id"
add_index "tracks", ["selected_schedule_id"], name: "index_tracks_on_selected_schedule_id"
add_index "tracks", ["submitter_id"], name: "index_tracks_on_submitter_id"
create_table "users", force: :cascade do |t|