-
Notifications
You must be signed in to change notification settings - Fork 154
/
routes.rb
178 lines (149 loc) · 5.76 KB
/
routes.rb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
Rails.application.routes.draw do
# For details on the DSL available within this file, see https://guides.rubyonrails.org/routing.html
constraints DomainConstraint.new do
get '/', to: 'pages#show'
get '/(:slug)/program', to: 'programs#show'
get '/(:slug)/schedule', to: 'schedule#show'
get '/(:slug)/sponsors', to: 'sponsors#show'
get '/(:slug)/banner_ads', to: 'sponsors#banner_ads'
get '/(:slug)/sponsors_footer', to: 'sponsors#sponsors_footer'
get '/:domain_page_or_slug', to: 'pages#show'
get '/:slug/:page', to: 'pages#show'
end
root 'home#show'
devise_for :users, controllers: { omniauth_callbacks: 'users/omniauth_callbacks' }
mount ActionCable.server => '/cable'
get '/profile' => 'profiles#edit', as: :edit_profile
patch '/profile' => 'profiles#update'
get '/my-proposals' => 'proposals#index', as: :proposals
resources :notifications, only: [:index, :show] do
post :mark_all_as_read, on: :collection
end
resources :events, param: :slug do
get '/' => 'events#show', as: :event
post '/proposals' => 'proposals#create', as: :event_proposals
resources :proposals, param: :uuid do
member { post :confirm }
member { post :withdraw }
member { post :decline }
member { post :update_notes }
member { delete :destroy }
member { get :finalized_notification }
end
get 'parse_edit_field' => 'proposals#parse_edit_field', as: :parse_edit_field_proposal
#Staff URLS
namespace 'staff' do
get '/' => 'events#show'
get :show
get :info
get :edit
patch :update
patch 'update-status' => 'events#update_status'
patch :open_cfp
get '/config' => 'events#configuration', as: :config
get 'custom-fields', as: :custom_fields
put :update_custom_fields
get 'reviewer-tags', as: :reviewer_tags
put :update_reviewer_tags
get 'proposal-tags', as: :proposal_tags
put :update_proposal_tags
get :guidelines
patch :update_guidelines
post :test_speaker_template
get '/speaker-emails' => 'events#speaker_emails', as: :speaker_email_notifications
patch :update_speaker_emails
patch '/remove_speaker_email_template/:type' => 'events#remove_speaker_email_template', as: :remove_speaker_email_template
resources :teammates, path: 'team'
# Reviewer flow for proposals
resources :proposals, controller: 'proposal_reviews', only: [:index, :show, :update], param: :uuid do
resources :ratings, only: [:create, :update], defaults: {format: :js}
end
scope :program, as: 'program' do
resources :proposals, param: :uuid do
collection do
get 'selection'
get 'session_counts'
get 'bulk_finalize'
post 'finalize_by_state'
end
post :finalize
post :update_state
post :update_track
post :update_session_format
end
resources :speakers, only: [:index, :show, :edit, :update, :destroy]
resources :program_sessions, as: 'sessions', path: 'sessions' do
resources :speakers, only: [:new, :create]
post :update_state
member do
post :confirm_for_speaker
patch :promote
end
end
end
scope :schedule, as: 'schedule' do
resources :rooms, only: [:index, :create, :update, :destroy]
resources :time_slots, except: :show
resource :grid do
resources :time_slots, module: 'grids', only: [:new, :create, :edit, :update]
resources :program_sessions, module: 'grids', only: [:show]
resource :bulk_time_slot, module: 'grids', only: [] do
collection do
get 'new/:day', to: 'bulk_time_slots#new', as: 'new', constraints: { day: /\d+/ }
get 'cancel/:day', to: 'bulk_time_slots#cancel', as: 'cancel', constraints: { day: /\d+/ }
post :preview
post :edit
post :create
end
end
end
end
resources :session_formats, except: :show
resources :tracks, except: [:show]
resource :website, only: [:new, :create, :edit, :update] do
member do
post :purge
end
end
resources :pages do
member do
get :preview
post :show
patch :publish
patch :promote
end
end
resources :sponsors, only: [:index, :new, :create, :edit, :update, :destroy]
end
end
resources :image_uploads, only: :create
resource :public_comments, only: [:create], controller: :comments, type: 'PublicComment'
resource :internal_comments, only: [:create], controller: :comments, type: 'InternalComment'
resources :speakers, only: [:destroy]
resources :events, only: [:index]
get 'teammates/:token/accept', :to => 'teammates#accept', as: :accept_teammate
get 'teammates/:token/decline', :to => 'teammates#decline', as: :decline_teammate
resources :invitations, only: [:show, :create, :destroy], param: :invitation_slug do
member do
get :accept
get :decline
get :resend
end
end
namespace 'admin' do
resources :events, except: [:show, :edit, :update], param: :slug do
post :archive
post :unarchive
end
resources :users
end
get '/current-styleguide', :to => 'pages#current_styleguide'
get '/404', :to => 'errors#not_found', as: :not_found
get '/422', :to => 'errors#unacceptable'
get '/500', :to => 'errors#internal_error'
get '/(:slug)', to: 'pages#show', as: :landing
get '/(:slug)/program', to: 'programs#show', as: :program
get '/(:slug)/schedule', to: 'schedule#show', as: :schedule
get '/(:slug)/sponsors', to: 'sponsors#show', as: :sponsors
get '/(:slug)/:page', to: 'pages#show', as: :page
end