osem-fcy/config/routes.rb

129 lines
3.6 KiB
Ruby
Raw Normal View History

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: {
registrations: :registrations,
omniauth_callbacks: 'users/omniauth_callbacks' },
path: 'accounts'
end
resources :users, except: [:new, :index, :create, :destroy]
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]
resources :commercials, except: [:show]
2014-06-12 19:49:54 +03:00
get '/stats' => 'stats#index'
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
resources :registrations, except: [:create, :new] do
member do
patch :present
patch :absent
end
end
# Singletons
resource :splashpage
resource :call_for_paper
resource :venue
resource :registration_period
2014-11-12 12:12:57 +01:00
resources :tickets
resources :tracks
resources :event_types
resources :difficulty_levels
2014-11-12 11:37:28 +01:00
resources :rooms, except: [:show]
resources :sponsors, except: [:show]
resources :lodgings, except: [:show]
resources :targets, except: [:show]
resources :campaigns, except: [:show]
resources :emails, only: [:show, :update, :index]
resources :sponsorship_levels, except: [:show] do
member do
patch :up
patch :down
end
end
resources :questions do
collection do
patch :update_conference
end
end
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
end
end
2014-11-14 17:24:24 +01:00
resources :conference, only: [:index, :show] do
2013-01-07 09:04:09 +01:00
resources :proposal do
resources :commercials, except: [:show, :index]
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
resource :conference_registrations, path: 'register'
resources :tickets, only: [:index]
resources :ticket_purchases, only: [:create, :destroy]
resource :subscriptions, only: [:create, :destroy]
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
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
end
end
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