2013-01-07 09:04:09 +01:00
|
|
|
Osem::Application.routes.draw do
|
|
|
|
|
|
2014-11-04 17:42:47 +01:00
|
|
|
if CONFIG['authentication']['ichain']['enabled']
|
|
|
|
|
devise_for :users, controllers: { registrations: :registrations }
|
|
|
|
|
else
|
|
|
|
|
devise_for :users,
|
|
|
|
|
controllers: {
|
2014-11-30 20:06:12 +02:00
|
|
|
registrations: :registrations, confirmations: :confirmations,
|
2014-11-04 17:42:47 +01:00
|
|
|
omniauth_callbacks: 'users/omniauth_callbacks' },
|
|
|
|
|
path: 'accounts'
|
|
|
|
|
end
|
|
|
|
|
|
2016-03-05 14:09:22 +01:00
|
|
|
# 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
|
|
|
|
|
|
2014-11-04 17:42:47 +01:00
|
|
|
resources :users, except: [:new, :index, :create, :destroy]
|
2013-01-07 09:04:09 +01:00
|
|
|
|
|
|
|
|
namespace :admin do
|
|
|
|
|
resources :users
|
|
|
|
|
resources :people
|
2015-08-24 17:17:29 +02:00
|
|
|
resources :comments, only: [:index]
|
2013-01-07 09:04:09 +01:00
|
|
|
resources :conference do
|
2014-08-13 14:37:15 +03:00
|
|
|
resource :contact, except: [:index, :new, :create, :show, :destroy]
|
2014-08-12 22:42:53 +03:00
|
|
|
resources :photos, except: [:show]
|
2014-06-12 19:49:54 +03:00
|
|
|
resource :schedule, only: [:show, :update]
|
2015-04-22 21:30:32 +02:00
|
|
|
get 'commercials/render_commercial' => 'commercials#render_commercial'
|
|
|
|
|
resources :commercials, only: [:index, :create, :update, :destroy]
|
2014-06-12 19:49:54 +03:00
|
|
|
get '/dietary_choices' => 'dietchoices#show', as: 'dietary_list'
|
|
|
|
|
patch '/dietary_choices' => 'dietchoices#update', as: 'dietary_update'
|
|
|
|
|
get '/volunteers_list' => 'volunteers#show'
|
|
|
|
|
get '/volunteers' => 'volunteers#index', as: 'volunteers_info'
|
|
|
|
|
patch '/volunteers' => 'volunteers#update', as: 'volunteers_update'
|
2014-05-15 20:55:27 +03:00
|
|
|
|
2014-11-25 10:47:18 +01:00
|
|
|
resources :registrations, except: [:create, :new] do
|
|
|
|
|
member do
|
2015-07-10 15:40:11 +02:00
|
|
|
patch :toggle_attendance
|
|
|
|
|
|
2014-11-25 10:47:18 +01:00
|
|
|
end
|
|
|
|
|
end
|
2014-08-18 14:33:02 +02:00
|
|
|
|
2014-11-25 10:47:18 +01:00
|
|
|
# Singletons
|
2014-08-30 12:08:24 +02:00
|
|
|
resource :splashpage
|
2015-11-07 11:43:36 +02:00
|
|
|
resource :venue do
|
|
|
|
|
resources :rooms, except: [:show]
|
|
|
|
|
end
|
2014-11-25 10:47:18 +01:00
|
|
|
resource :registration_period
|
2015-10-25 13:29:02 +02:00
|
|
|
resource :program do
|
|
|
|
|
resource :cfp
|
|
|
|
|
resources :tracks
|
|
|
|
|
resources :event_types
|
|
|
|
|
resources :difficulty_levels
|
|
|
|
|
resources :events do
|
|
|
|
|
member do
|
|
|
|
|
post :comment
|
|
|
|
|
patch :accept
|
|
|
|
|
patch :confirm
|
|
|
|
|
patch :cancel
|
|
|
|
|
patch :reject
|
|
|
|
|
patch :unconfirm
|
|
|
|
|
patch :restart
|
|
|
|
|
get :vote
|
|
|
|
|
end
|
|
|
|
|
resource :speaker, only: [:edit, :update]
|
|
|
|
|
end
|
|
|
|
|
end
|
2014-11-12 12:12:57 +01:00
|
|
|
|
2014-11-25 10:47:18 +01:00
|
|
|
resources :tickets
|
|
|
|
|
resources :sponsors, except: [:show]
|
|
|
|
|
resources :lodgings, except: [:show]
|
|
|
|
|
resources :targets, except: [:show]
|
|
|
|
|
resources :campaigns, except: [:show]
|
|
|
|
|
resources :emails, only: [:show, :update, :index]
|
2015-01-12 23:13:10 +02:00
|
|
|
resources :roles, except: [ :new, :create ] do
|
|
|
|
|
member do
|
|
|
|
|
post :toggle_user
|
|
|
|
|
end
|
|
|
|
|
end
|
2014-05-13 14:17:39 +02:00
|
|
|
|
2014-11-14 11:58:36 +01:00
|
|
|
resources :sponsorship_levels, except: [:show] do
|
2014-12-09 15:19:01 +01:00
|
|
|
member do
|
|
|
|
|
patch :up
|
|
|
|
|
patch :down
|
|
|
|
|
end
|
2014-11-14 11:58:36 +01:00
|
|
|
end
|
2014-06-05 14:52:44 +05:30
|
|
|
|
2014-11-25 10:47:18 +01:00
|
|
|
resources :questions do
|
2014-05-13 14:17:39 +02:00
|
|
|
collection do
|
2014-11-25 10:47:18 +01:00
|
|
|
patch :update_conference
|
2014-05-13 14:17:39 +02:00
|
|
|
end
|
|
|
|
|
end
|
2013-01-07 09:04:09 +01:00
|
|
|
end
|
|
|
|
|
end
|
|
|
|
|
|
2014-11-14 17:24:24 +01:00
|
|
|
resources :conference, only: [:index, :show] do
|
2015-10-25 13:29:02 +02:00
|
|
|
resource :program, except: :destroy do
|
|
|
|
|
resources :proposal do
|
|
|
|
|
get 'commercials/render_commercial' => 'commercials#render_commercial'
|
|
|
|
|
resources :commercials, only: [:create, :update, :destroy]
|
|
|
|
|
resources :event_attachment, controller: 'event_attachments'
|
|
|
|
|
member do
|
|
|
|
|
patch '/confirm' => 'proposal#confirm'
|
|
|
|
|
patch '/restart' => 'proposal#restart'
|
|
|
|
|
end
|
2014-07-23 16:24:05 +02:00
|
|
|
end
|
2013-01-07 09:04:09 +01:00
|
|
|
end
|
2014-08-22 15:08:54 +02:00
|
|
|
|
|
|
|
|
resource :conference_registrations, path: 'register'
|
2014-08-28 15:21:05 +02:00
|
|
|
resources :tickets, only: [:index]
|
|
|
|
|
resources :ticket_purchases, only: [:create, :destroy]
|
2014-10-31 22:45:15 +02:00
|
|
|
resource :subscriptions, only: [:create, :destroy]
|
2014-08-22 15:08:54 +02:00
|
|
|
|
2013-01-07 09:04:09 +01:00
|
|
|
member do
|
2014-11-27 14:31:44 +01:00
|
|
|
get :schedule
|
2013-01-07 09:04:09 +01:00
|
|
|
end
|
|
|
|
|
end
|
2013-07-04 14:02:50 +02:00
|
|
|
|
|
|
|
|
namespace :api, defaults: {format: 'json'} do
|
|
|
|
|
namespace :v1 do
|
2015-10-25 00:36:23 +03:00
|
|
|
resources :conferences, only: [ :index, :show ] do
|
2014-07-21 14:49:05 +02:00
|
|
|
resources :rooms, only: :index
|
|
|
|
|
resources :tracks, only: :index
|
|
|
|
|
resources :speakers, only: :index
|
|
|
|
|
resources :events, only: :index
|
2013-07-08 10:07:12 +02:00
|
|
|
end
|
2014-07-21 14:49:05 +02:00
|
|
|
resources :rooms, only: :index
|
|
|
|
|
resources :tracks, only: :index
|
|
|
|
|
resources :speakers, only: :index
|
|
|
|
|
resources :events, only: :index
|
2013-07-04 14:02:50 +02:00
|
|
|
end
|
|
|
|
|
end
|
|
|
|
|
|
2014-08-18 21:54:43 +03:00
|
|
|
get '/admin' => redirect('/admin/conference')
|
2013-01-07 09:04:09 +01:00
|
|
|
|
2014-11-14 17:24:24 +01:00
|
|
|
root to: 'conference#index', via: [:get, :options]
|
2013-01-07 09:04:09 +01:00
|
|
|
end
|