forked from redbooth/teambox
-
Notifications
You must be signed in to change notification settings - Fork 0
/
routes.rb
256 lines (232 loc) · 8.33 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
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
Teambox::Application.routes.draw do
resources :sprockets
match '/logout' => 'sessions#destroy', :as => :logout
match '/login' => 'sessions#new', :as => :login
match '/register' => 'users#create', :as => :register
match '/signup' => 'users#new', :as => :signup
match '/search' => 'search#index', :as => :search
match '/text_styles' => 'users#text_styles', :as => :text_styles
match '/invite_format' => 'invitations#invite_format', :as => :invite_format
match '/feeds' => 'users#feeds', :as => :feeds
match '/calendars' => 'users#calendars', :as => :calendars
match '/disable_splash' => 'users#disable_splash', :as => :disable_splash
match '/forgot' => 'reset_passwords#new', :as => :forgot_password
match '/reset/:reset_code' => 'reset_passwords#reset', :as => :reset_password
match '/forgetting' => 'reset_passwords#update_after_forgetting', :as => :update_after_forgetting, :method => :put
match '/reset_password_sent' => 'reset_passwords#sent', :as => :sent_password
match '/format/:f' => 'sessions#change_format', :as => :change_format
match '/projects/:project_id/invite/:login' => 'invitations#create', :as => :create_project_invitation, :method => :post
match '/auth/:provider/callback' => 'auth#callback', :as => :auth_callback
match '/auth/failure' => 'auth#failure', :as => :auth_failure
match '/complete_signup' => 'users#complete_signup', :as => :complete_signup
match '/auth/:provider/unlink' => 'users#unlink_app', :as => :unlink_app
match '/auth/google' => 'auth#index', :as => :authorize_google_docs, :provider => 'google'
resources :google_docs do
collection do
:search
end
end
match '/i18n/environment.js' => 'javascripts#environment', :as => :javascript_environment
resources :reset_passwords
resource :session
resources :organizations do
resources :memberships do
member do
:change_role
:add
:remove
end
end
end
resources :sites
match '/account/settings' => 'users#edit', :as => :account_settings, :sub_action => 'settings'
match '/account/picture' => 'users#edit', :as => :account_picture, :sub_action => 'picture'
match '/account/profile' => 'users#edit', :as => :account_profile, :sub_action => 'profile'
match '/account/linked_accounts' => 'users#edit', :as => :account_linked_accounts, :sub_action => 'linked_accounts'
match '/account/notifications' => 'users#edit', :as => :account_notifications, :sub_action => 'notifications'
match '/account/delete' => 'users#edit', :as => :account_delete, :sub_action => 'delete'
match '/account/destroy' => 'users#destroy', :as => :destroy_user
resources :teambox_datas
resources :users do
resources :conversations
resources :task_lists do
resources :tasks
end
match 'activities/users/:id/show_more.:format' => 'activities#show_more', :as => :show_more, :method => :get
end
match 'activities.:format' => 'activities#show', :as => :activities, :method => :get
match 'activities/:id/show_new.:format' => 'activities#show_new', :as => :show_new, :method => :get
match 'activities/:id/show_more.:format' => 'activities#show_more', :as => :show_more, :method => :get
match 'activities/:id/show_thread.:format' => 'activities#show_thread', :as => :show_thread, :method => :get
match 'projects/archived.:format' => 'projects#index', :as => :project_archived, :sub_action => 'archived'
match 'hooks/:hook_name' => 'hooks#create', :as => :hooks, :via => :post
resources :projects do
match 'time/:year/:month' => 'hours#index', :as => :hours_by_month, :via => :get
match 'time/by_period' => 'hours#by_period', :as => :hours_by_period, :via => :get
match 'time' => 'hours#index', :as => :time
match 'settings' => 'projects#edit', :as => :settings, :sub_action => 'settings'
match 'picture' => 'projects#edit', :as => :picture, :sub_action => 'picture'
match 'deletion' => 'projects#edit', :as => :deletion, :sub_action => 'deletion'
match 'ownership' => 'projects#edit', :as => :ownership, :sub_action => 'ownership'
resources :invitations do
member do
:accept
:decline
:resend
end
end
match 'activities.:format' => 'activities#show', :as => :activities, :method => :get
match 'activities/:id/show_new.:format' => 'activities#show_new', :as => :show_new, :method => :get
match 'activities/:id/show_more.:format' => 'activities#show_more', :as => :show_more, :method => :get
resources :uploads
match 'hooks/:hook_name' => 'hooks#create', :as => :hooks, :via => :post
resources :tasks do
member do
put :reorder
put :watch
put :unwatch
end
end
resources :task_lists do
resources :tasks do
member do
put :watch
put :unwatch
end
end
end
match 'contacts' => 'people#contacts', :as => :contacts, :method => :get
resources :people do
member do
get :destroy
end
end
resources :conversations do
member do
put :convert_to_task
put :watch
put :unwatch
end
end
resources :pages do
collection do
post :resort
end
member do
post :reorder
end
end
match 'search' => 'search#index', :as => :search
resources :google_docs do
collection do
:search
end
end
end
match '/public' => 'public/projects#index', :as => :public_projects
root :to => 'projects#index'
namespace :public do
match ':id' => 'projects#show', :as => :project
match ':project_id/conversations' => 'conversations#index', :as => :project_conversations
match ':project_id/conversations/:id' => 'conversations#show', :as => :project_conversation
match ':project_id/:id' => 'pages#show', :as => :project_page
end
match 'api' => 'apidocs#index', :as => :api
match 'api/concepts' => 'apidocs#concepts', :as => :api_concepts
match 'api/routes' => 'apidocs#routes', :as => :api_routes
match 'api/changes' => 'apidocs#changes', :as => :api_changes
match 'api/:model' => 'apidocs#model', :as => :api_model
scope 'api/1' do
namespace :api_v1 do
resources :projects do
resources :activities
resources :people
resources :comments
resources :conversations do
resources :comments
end
resources :invitations do
member do
put :resend
end
end
resources :task_lists do
resources :tasks
end
resources :tasks do
resources :comments
end
resources :uploads
resources :pages do
collection do
put :resort
end
member do
put :reorder
end
end
resources :notes
resources :dividers
match 'search' => 'search#index', :as => :search
end
resources :activities
resources :invitations do
member do
put :accept
end
end
resources :users
resources :tasks do
member do
put :watch
put :unwatch
end
end
resources :comments
resources :conversations do
resources :comments
end
resources :task_lists do
resources :tasks
end
resources :tasks do
resources :comments
end
resources :uploads
resources :pages do
collection do
put :resort
end
member do
put :reorder
end
end
resources :notes
resources :dividers
resources :organizations do
resources :projects do
member do
put :transfer
end
end
resources :memberships
end
match 'search' => 'search#index', :as => :search
match 'account' => 'users#current', :as => :account, :via => :get
end
end
resources :task_lists do
collection do
get :gantt_view
end
end
resources :conversations
match 'time/:year/:month' => 'hours#index', :as => :hours_by_month, :via => :get
match 'time/by_period' => 'hours#by_period', :as => :hours_by_period, :via => :get
match 'time' => 'hours#index', :as => :time
match '/' => 'projects#index'
match 'assets/:id/:style/:filename' => 'uploads#download', :constraints => { :filename => /.*/ }, :via => :get
if Rails.env.development?
mount Emailer::Preview => 'mail_view'
end
end