osem-fcy/config/routes.rb
AEtherC0r3 7eea930269 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
2017-08-26 00:31:44 +03:00

215 lines
6.5 KiB
Ruby

Osem::Application.routes.draw do
constraints DomainConstraint do
get '/', to: 'conferences#show'
end
if ENV['OSEM_ICHAIN_ENABLED'] == 'true'
devise_for :users, controllers: { registrations: :registrations }
else
devise_for :users,
controllers: {
registrations: :registrations, confirmations: :confirmations,
omniauth_callbacks: 'users/omniauth_callbacks' },
path: 'accounts'
end
# Use letter_opener_web to open mails in browser (e.g. necessary for Vagrant)
if Rails.env.development?
mount LetterOpenerWeb::Engine, at: "/letter_opener"
end
resources :users, except: [:new, :index, :create, :destroy] do
resources :openids, only: :destroy
end
namespace :admin do
resources :organizations do
member do
get :admins
post :assign_org_admins
delete :unassign_org_admins
end
end
resources :users do
member do
patch :toggle_confirmation
end
end
resource :ticket_scanning, only: [:create]
resources :comments, only: [:index]
resources :conferences do
resource :contact, except: [:index, :new, :create, :show, :destroy]
resources :schedules, except: [:edit, :update]
resources :event_schedules, only: [:create, :update, :destroy]
get 'commercials/render_commercial' => 'commercials#render_commercial'
resources :commercials, only: [:index, :create, :update, :destroy]
get '/volunteers_list' => 'volunteers#show'
get '/volunteers' => 'volunteers#index', as: 'volunteers_info'
patch '/volunteers' => 'volunteers#update', as: 'volunteers_update'
resources :booths do
member do
patch :accept
patch :restart
patch :to_accept
patch :reject
patch :reset
patch :to_reject
patch :cancel
patch :confirm
end
end
resources :registrations, except: [:create, :new] do
member do
patch :toggle_attendance
end
end
# Singletons
resource :splashpage
resource :venue do
get 'venue_commercial/render_commercial' => 'venue_commercials#render_commercial'
resource :venue_commercial, only: [:create, :update, :destroy]
resources :rooms, except: [:show]
end
resource :registration_period
resource :program do
resources :cfps
resources :tracks do
member do
patch :toggle_cfp_inclusion
patch :restart
patch :to_accept
patch :accept
patch :confirm
patch :to_reject
patch :reject
patch :cancel
patch :update_selected_schedule
end
end
resources :event_types
resources :difficulty_levels
resources :events do
member do
patch :toggle_attendance
get :registrations
post :comment
patch :accept
patch :confirm
patch :cancel
patch :reject
patch :unconfirm
patch :restart
get :vote
end
end
resources :reports, only: :index
end
resources :resources
resources :tickets
resources :sponsors, except: [:show]
resources :lodgings, except: [:show]
resources :targets, except: [:show]
resources :campaigns, except: [:show]
resources :emails, only: [:show, :update, :index]
resources :physical_ticket, only: [:index]
resources :roles, only: [:edit]
resources :roles, except: [ :new, :create, :edit ] do
member do
post :toggle_user
get ':track_name' => 'roles#show', as: 'track'
get ':track_name/edit' => 'roles#edit', as: 'track_edit'
patch ':track_name' => 'roles#update'
put ':track_name' => 'roles#update'
post ':track_name/toggle_user' => 'roles#toggle_user', as: 'toggle_user_track'
end
end
resources :sponsorship_levels, except: [:show] do
member do
patch :up
patch :down
end
end
resources :questions do
collection do
patch :update_conference
end
end
get '/revision_history' => 'versions#index'
end
get '/revision_history' => 'versions#index'
get '/revision_history/:id/revert_object' => 'versions#revert_object', as: 'revision_history_revert_object'
get '/revision_history/:id/revert_attribute' => 'versions#revert_attribute', as: 'revision_history_revert_attribute'
end
resources :organizations, only: [:index]
resources :conferences, only: [:index, :show] do
resources :booths do
member do
patch :withdraw
patch :confirm
patch :restart
end
end
resource :program, only: [] do
resources :proposals, except: :destroy do
get 'commercials/render_commercial' => 'commercials#render_commercial'
resources :commercials, only: [:create, :update, :destroy]
member do
get :registrations
patch '/withdraw' => 'proposals#withdraw'
get :registrations
patch '/confirm' => 'proposals#confirm'
patch '/restart' => 'proposals#restart'
end
end
resources :tracks, except: :destroy do
member do
patch :restart
patch :confirm
patch :withdraw
end
end
end
# TODO: change conference_registrations to singular resource
resource :conference_registration, path: 'register'
resources :tickets, only: [:index]
resources :ticket_purchases, only: [:create, :destroy, :index]
resources :payments, only: [:index, :new, :create]
resources :physical_ticket, only: [:index, :show]
resource :subscriptions, only: [:create, :destroy]
resource :schedule, only: [:show] do
member do
get :events
end
end
end
namespace :api, defaults: {format: 'json'} do
namespace :v1 do
resources :conferences, only: [ :index, :show ] do
resources :rooms, only: :index
resources :tracks, only: :index
resources :speakers, only: :index
resources :events, only: :index
end
resources :rooms, only: :index
resources :tracks, only: :index
resources :speakers, only: :index
resources :events, only: :index
end
end
get '/admin' => redirect('/admin/conferences')
root to: 'conferences#index', via: [:get, :options]
end