2013-01-07 09:04:09 +01:00
|
|
|
Osem::Application.routes.draw do
|
|
|
|
|
|
2014-06-18 18:05:28 +03:00
|
|
|
devise_for :users, controllers: { registrations: :registrations,
|
2014-06-18 18:59:01 +03:00
|
|
|
omniauth_callbacks: 'users/omniauth_callbacks' },
|
|
|
|
|
path: 'accounts'
|
2013-01-07 09:04:09 +01:00
|
|
|
|
|
|
|
|
namespace :admin do
|
|
|
|
|
resources :users
|
|
|
|
|
resources :people
|
|
|
|
|
resources :conference do
|
2014-08-12 11:51:59 +03:00
|
|
|
member do
|
|
|
|
|
get :roles
|
|
|
|
|
post :roles
|
|
|
|
|
post :add_user
|
|
|
|
|
delete :remove_user
|
|
|
|
|
end
|
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]
|
2014-08-05 18:23:42 +02:00
|
|
|
resources :commercials, except: [:show]
|
2014-06-12 19:49:54 +03:00
|
|
|
get '/stats' => 'stats#index'
|
|
|
|
|
get '/venue' => 'venue#show', as: 'venue_info'
|
|
|
|
|
patch '/venue' => 'venue#update', as: 'venue_update'
|
|
|
|
|
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
|
|
|
|
|
|
|
|
patch '/registrations/change_field' => 'registrations#change_field'
|
2014-05-15 20:30:01 +03:00
|
|
|
resources :registrations
|
2014-04-28 19:58:49 +02:00
|
|
|
|
2014-04-28 21:42:09 +02:00
|
|
|
resources :difficulty_levels, only: [:show, :update, :index]
|
2014-05-13 14:17:39 +02:00
|
|
|
|
2014-04-28 21:42:09 +02:00
|
|
|
resources :rooms, only: [:show, :update, :index]
|
2014-05-13 14:17:39 +02:00
|
|
|
|
2014-04-28 21:42:09 +02:00
|
|
|
resources :tracks, only: [:show, :update, :index]
|
2014-05-13 14:17:39 +02:00
|
|
|
|
2014-06-05 14:52:44 +05:30
|
|
|
resources :sponsorship_levels, only: [:show, :update, :index]
|
|
|
|
|
|
2014-06-05 20:05:20 +05:30
|
|
|
resources :sponsors, only: [:show, :update, :index]
|
|
|
|
|
|
2014-06-14 21:48:43 +05:30
|
|
|
resources :lodgings, only: [:show, :update, :index]
|
|
|
|
|
|
2014-06-26 09:08:26 +02:00
|
|
|
resources :targets, only: [:update, :index]
|
|
|
|
|
|
|
|
|
|
resources :campaigns
|
|
|
|
|
|
2014-08-12 11:51:59 +03:00
|
|
|
resources :event_types, only: [:show, :index] do
|
2014-04-30 16:11:14 +02:00
|
|
|
collection do
|
|
|
|
|
patch :update
|
|
|
|
|
end
|
|
|
|
|
end
|
2014-05-13 14:17:39 +02:00
|
|
|
|
2014-04-28 21:42:09 +02:00
|
|
|
resources :social_events, only: [:show, :update, :index]
|
2014-05-13 14:17:39 +02:00
|
|
|
|
2014-04-28 21:42:09 +02:00
|
|
|
resources :supporter_levels, only: [:show, :update, :index]
|
2014-05-13 14:17:39 +02:00
|
|
|
|
2014-04-28 21:42:09 +02:00
|
|
|
resources :emails, only: [:show, :update, :index]
|
2014-05-13 14:17:39 +02:00
|
|
|
|
|
|
|
|
resources :callforpapers, only: [:create] do
|
|
|
|
|
collection do
|
|
|
|
|
patch :update
|
|
|
|
|
get :show
|
|
|
|
|
end
|
|
|
|
|
end
|
|
|
|
|
|
2014-05-08 14:18:06 +05:30
|
|
|
patch "/questions/update_conference" => "questions#update_conference"
|
2014-02-09 18:05:57 +02:00
|
|
|
resources :questions
|
2014-05-13 14:17:39 +02:00
|
|
|
|
2013-01-07 09:04:09 +01:00
|
|
|
resources :events do
|
|
|
|
|
member do
|
|
|
|
|
post :comment
|
2014-06-06 10:23:01 +02:00
|
|
|
patch :accept
|
|
|
|
|
patch :confirm
|
|
|
|
|
patch :cancel
|
|
|
|
|
patch :reject
|
|
|
|
|
patch :unconfirm
|
|
|
|
|
patch :restart
|
2013-08-16 12:46:49 +03:00
|
|
|
get :vote
|
2013-01-07 09:04:09 +01:00
|
|
|
end
|
2014-07-21 14:49:05 +02:00
|
|
|
resource :speaker, only: [:edit, :update]
|
2013-01-07 09:04:09 +01:00
|
|
|
end
|
2014-05-13 14:17:39 +02:00
|
|
|
|
2013-02-03 18:12:44 +01:00
|
|
|
resources :supporters
|
2013-01-07 09:04:09 +01:00
|
|
|
end
|
|
|
|
|
end
|
|
|
|
|
|
2014-05-19 21:21:06 +05:30
|
|
|
resources :conference, only: [:show] do
|
2013-01-07 09:04:09 +01:00
|
|
|
resources :proposal do
|
2014-08-05 18:23:42 +02:00
|
|
|
resources :commercials, except: [:show, :index]
|
2014-07-21 14:49:05 +02:00
|
|
|
resources :event_attachment, controller: "event_attachments"
|
2014-07-23 16:24:05 +02:00
|
|
|
member do
|
|
|
|
|
patch '/confirm' => 'proposal#confirm'
|
|
|
|
|
patch '/restart' => 'proposal#restart'
|
|
|
|
|
end
|
2013-01-07 09:04:09 +01:00
|
|
|
end
|
2014-07-21 14:49:05 +02:00
|
|
|
resource :schedule, only: [] do
|
2013-06-19 13:58:48 +02:00
|
|
|
get "/" => "schedule#index"
|
|
|
|
|
end
|
2014-08-13 22:46:41 +03:00
|
|
|
|
|
|
|
|
get "/register" => "conference_registration#register"
|
|
|
|
|
patch "/register" => "conference_registration#update"
|
|
|
|
|
delete "/register" => "conference_registration#unregister"
|
2013-01-07 09:04:09 +01:00
|
|
|
member do
|
2014-07-02 00:25:09 +05:30
|
|
|
get "gallery_photos"
|
2014-07-25 13:13:35 +05:30
|
|
|
patch "subscription" => "conference#subscribe"
|
|
|
|
|
delete "subscription" => "conference#unsubscribe"
|
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
|
2014-07-21 14:49:05 +02:00
|
|
|
resources :conferences, only: :index do
|
|
|
|
|
resources :conferences, only: :index
|
|
|
|
|
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-04-23 15:45:55 +02:00
|
|
|
get "/admin" => redirect("/admin/conference")
|
2013-01-07 09:04:09 +01:00
|
|
|
|
2014-07-08 09:14:16 +02:00
|
|
|
root to: 'home#index', via: [:get, :options]
|
2013-01-07 09:04:09 +01:00
|
|
|
end
|