|
@@
-1,395
+1,396
|
|
1
|
1
|
ActionController::Routing::Routes.draw do |map|
|
|
2
|
2
|
# Add your own custom routes here.
|
|
3
|
3
|
# The priority is based upon order of creation: first created -> highest priority.
|
|
4
|
4
|
|
|
5
|
5
|
# Here's a sample route:
|
|
6
|
6
|
# map.connect 'products/:id', :controller => 'catalog', :action => 'view'
|
|
7
|
7
|
# Keep in mind you can assign values other than :controller and :action
|
|
8
|
8
|
|
|
9
|
9
|
map.home '', :controller => 'welcome', :conditions => {:method => :get}
|
|
10
|
10
|
|
|
11
|
11
|
map.signin 'login', :controller => 'account', :action => 'login',
|
|
12
|
12
|
:conditions => {:method => [:get, :post]}
|
|
13
|
13
|
map.signout 'logout', :controller => 'account', :action => 'logout',
|
|
14
|
14
|
:conditions => {:method => :get}
|
|
15
|
15
|
map.connect 'account/register', :controller => 'account', :action => 'register',
|
|
16
|
16
|
:conditions => {:method => [:get, :post]}
|
|
17
|
17
|
map.connect 'account/lost_password', :controller => 'account', :action => 'lost_password',
|
|
18
|
18
|
:conditions => {:method => [:get, :post]}
|
|
19
|
19
|
map.connect 'account/activate', :controller => 'account', :action => 'activate',
|
|
20
|
20
|
:conditions => {:method => :get}
|
|
21
|
21
|
|
|
22
|
22
|
map.connect 'projects/:id/wiki', :controller => 'wikis',
|
|
23
|
23
|
:action => 'edit', :conditions => {:method => :post}
|
|
24
|
24
|
map.connect 'projects/:id/wiki/destroy', :controller => 'wikis',
|
|
25
|
25
|
:action => 'destroy', :conditions => {:method => [:get, :post]}
|
|
26
|
26
|
|
|
27
|
27
|
map.with_options :controller => 'messages' do |messages_routes|
|
|
28
|
28
|
messages_routes.with_options :conditions => {:method => :get} do |messages_views|
|
|
29
|
29
|
messages_views.connect 'boards/:board_id/topics/new', :action => 'new'
|
|
30
|
30
|
messages_views.connect 'boards/:board_id/topics/:id', :action => 'show'
|
|
31
|
31
|
messages_views.connect 'boards/:board_id/topics/:id/edit', :action => 'edit'
|
|
32
|
32
|
end
|
|
33
|
33
|
messages_routes.with_options :conditions => {:method => :post} do |messages_actions|
|
|
34
|
34
|
messages_actions.connect 'boards/:board_id/topics/new', :action => 'new'
|
|
35
|
35
|
messages_actions.connect 'boards/:board_id/topics/preview', :action => 'preview'
|
|
36
|
36
|
messages_actions.connect 'boards/:board_id/topics/quote/:id', :action => 'quote'
|
|
37
|
37
|
messages_actions.connect 'boards/:board_id/topics/:id/replies', :action => 'reply'
|
|
38
|
38
|
messages_actions.connect 'boards/:board_id/topics/:id/edit', :action => 'edit'
|
|
39
|
39
|
messages_actions.connect 'boards/:board_id/topics/:id/destroy', :action => 'destroy'
|
|
40
|
40
|
end
|
|
41
|
41
|
end
|
|
42
|
42
|
|
|
43
|
43
|
# Misc issue routes. TODO: move into resources
|
|
44
|
44
|
map.auto_complete_issues '/issues/auto_complete', :controller => 'auto_completes',
|
|
45
|
45
|
:action => 'issues', :conditions => { :method => :get }
|
|
46
|
46
|
# TODO: would look nicer as /issues/:id/preview
|
|
47
|
47
|
map.preview_new_issue '/issues/preview/new/:project_id', :controller => 'previews',
|
|
48
|
48
|
:action => 'issue'
|
|
49
|
49
|
map.preview_edit_issue '/issues/preview/edit/:id', :controller => 'previews',
|
|
50
|
50
|
:action => 'issue'
|
|
51
|
51
|
map.issues_context_menu '/issues/context_menu',
|
|
52
|
52
|
:controller => 'context_menus', :action => 'issues'
|
|
53
|
53
|
|
|
54
|
54
|
map.issue_changes '/issues/changes', :controller => 'journals', :action => 'index'
|
|
55
|
55
|
map.quoted_issue '/issues/:id/quoted', :controller => 'journals', :action => 'new',
|
|
56
|
56
|
:id => /\d+/, :conditions => { :method => :post }
|
|
57
|
57
|
|
|
58
|
58
|
map.connect '/journals/diff/:id', :controller => 'journals', :action => 'diff',
|
|
59
|
59
|
:id => /\d+/, :conditions => { :method => :get }
|
|
60
|
60
|
map.connect '/journals/edit/:id', :controller => 'journals', :action => 'edit',
|
|
61
|
61
|
:id => /\d+/, :conditions => { :method => [:get, :post] }
|
|
62
|
62
|
|
|
63
|
63
|
map.with_options :controller => 'gantts', :action => 'show' do |gantts_routes|
|
|
64
|
64
|
gantts_routes.connect '/projects/:project_id/issues/gantt'
|
|
65
|
65
|
gantts_routes.connect '/projects/:project_id/issues/gantt.:format'
|
|
66
|
66
|
gantts_routes.connect '/issues/gantt.:format'
|
|
67
|
67
|
end
|
|
68
|
68
|
|
|
69
|
69
|
map.with_options :controller => 'calendars', :action => 'show' do |calendars_routes|
|
|
70
|
70
|
calendars_routes.connect '/projects/:project_id/issues/calendar'
|
|
71
|
71
|
calendars_routes.connect '/issues/calendar'
|
|
72
|
72
|
end
|
|
73
|
73
|
|
|
74
|
74
|
map.with_options :controller => 'reports', :conditions => {:method => :get} do |reports|
|
|
75
|
75
|
reports.connect 'projects/:id/issues/report', :action => 'issue_report'
|
|
76
|
76
|
reports.connect 'projects/:id/issues/report/:detail', :action => 'issue_report_details'
|
|
77
|
77
|
end
|
|
78
|
78
|
|
|
79
|
79
|
map.connect 'my/account', :controller => 'my', :action => 'account',
|
|
80
|
80
|
:conditions => {:method => [:get, :post]}
|
|
81
|
81
|
map.connect 'my/page', :controller => 'my', :action => 'page',
|
|
82
|
82
|
:conditions => {:method => :get}
|
|
83
|
83
|
# Redirects to my/page
|
|
84
|
84
|
map.connect 'my', :controller => 'my', :action => 'index',
|
|
85
|
85
|
:conditions => {:method => :get}
|
|
86
|
86
|
map.connect 'my/reset_rss_key', :controller => 'my', :action => 'reset_rss_key',
|
|
87
|
87
|
:conditions => {:method => :post}
|
|
88
|
88
|
map.connect 'my/reset_api_key', :controller => 'my', :action => 'reset_api_key',
|
|
89
|
89
|
:conditions => {:method => :post}
|
|
90
|
90
|
map.connect 'my/password', :controller => 'my', :action => 'password',
|
|
91
|
91
|
:conditions => {:method => [:get, :post]}
|
|
92
|
92
|
map.connect 'my/page_layout', :controller => 'my', :action => 'page_layout',
|
|
93
|
93
|
:conditions => {:method => :get}
|
|
94
|
94
|
map.connect 'my/add_block', :controller => 'my', :action => 'add_block',
|
|
95
|
95
|
:conditions => {:method => :post}
|
|
96
|
96
|
map.connect 'my/remove_block', :controller => 'my', :action => 'remove_block',
|
|
97
|
97
|
:conditions => {:method => :post}
|
|
98
|
98
|
map.connect 'my/order_blocks', :controller => 'my', :action => 'order_blocks',
|
|
99
|
99
|
:conditions => {:method => :post}
|
|
100
|
100
|
|
|
101
|
101
|
map.with_options :controller => 'users' do |users|
|
|
102
|
102
|
users.user_membership 'users/:id/memberships/:membership_id',
|
|
103
|
103
|
:action => 'edit_membership',
|
|
104
|
104
|
:conditions => {:method => :put}
|
|
105
|
105
|
users.connect 'users/:id/memberships/:membership_id',
|
|
106
|
106
|
:action => 'destroy_membership',
|
|
107
|
107
|
:conditions => {:method => :delete}
|
|
108
|
108
|
users.user_memberships 'users/:id/memberships',
|
|
109
|
109
|
:action => 'edit_membership',
|
|
110
|
110
|
:conditions => {:method => :post}
|
|
111
|
111
|
end
|
|
112
|
112
|
map.resources :users
|
|
113
|
113
|
|
|
114
|
114
|
# For nice "roadmap" in the url for the index action
|
|
115
|
115
|
map.connect 'projects/:project_id/roadmap', :controller => 'versions', :action => 'index'
|
|
116
|
116
|
|
|
117
|
117
|
map.preview_news '/news/preview', :controller => 'previews', :action => 'news'
|
|
118
|
118
|
map.connect 'news/:id/comments', :controller => 'comments',
|
|
119
|
119
|
:action => 'create', :conditions => {:method => :post}
|
|
120
|
120
|
map.connect 'news/:id/comments/:comment_id', :controller => 'comments',
|
|
121
|
121
|
:action => 'destroy', :conditions => {:method => :delete}
|
|
122
|
122
|
|
|
123
|
123
|
map.connect 'watchers/new', :controller=> 'watchers', :action => 'new',
|
|
124
|
124
|
:conditions => {:method => :get}
|
|
125
|
125
|
map.connect 'watchers', :controller=> 'watchers', :action => 'create',
|
|
126
|
126
|
:conditions => {:method => :post}
|
|
127
|
127
|
map.connect 'watchers/append', :controller=> 'watchers', :action => 'append',
|
|
128
|
128
|
:conditions => {:method => :post}
|
|
129
|
129
|
map.connect 'watchers/destroy', :controller=> 'watchers', :action => 'destroy',
|
|
130
|
130
|
:conditions => {:method => :post}
|
|
131
|
131
|
map.connect 'watchers/watch', :controller=> 'watchers', :action => 'watch',
|
|
132
|
132
|
:conditions => {:method => :post}
|
|
133
|
133
|
map.connect 'watchers/unwatch', :controller=> 'watchers', :action => 'unwatch',
|
|
134
|
134
|
:conditions => {:method => :post}
|
|
135
|
135
|
map.connect 'watchers/autocomplete_for_user', :controller=> 'watchers', :action => 'autocomplete_for_user',
|
|
136
|
136
|
:conditions => {:method => :get}
|
|
137
|
137
|
|
|
138
|
138
|
# TODO: port to be part of the resources route(s)
|
|
139
|
139
|
map.with_options :conditions => {:method => :get} do |project_views|
|
|
140
|
140
|
project_views.connect 'projects/:id/settings/:tab',
|
|
141
|
141
|
:controller => 'projects', :action => 'settings'
|
|
142
|
142
|
project_views.connect 'projects/:project_id/issues/:copy_from/copy',
|
|
143
|
143
|
:controller => 'issues', :action => 'new'
|
|
144
|
144
|
end
|
|
145
|
145
|
|
|
146
|
146
|
map.resources :projects, :member => {
|
|
147
|
147
|
:copy => [:get, :post],
|
|
148
|
148
|
:settings => :get,
|
|
149
|
149
|
:modules => :post,
|
|
150
|
150
|
:archive => :post,
|
|
151
|
151
|
:unarchive => :post
|
|
152
|
152
|
} do |project|
|
|
153
|
153
|
project.resource :enumerations, :controller => 'project_enumerations',
|
|
154
|
154
|
:only => [:update, :destroy]
|
|
155
|
155
|
# issue form update
|
|
156
|
156
|
project.issue_form 'issues/new', :controller => 'issues',
|
|
157
|
157
|
:action => 'new', :conditions => {:method => [:post, :put]}
|
|
158
|
158
|
project.resources :issues, :only => [:index, :new, :create] do |issues|
|
|
159
|
159
|
issues.resources :time_entries, :controller => 'timelog',
|
|
160
|
160
|
:collection => {:report => :get}
|
|
161
|
161
|
end
|
|
162
|
162
|
|
|
163
|
163
|
project.resources :files, :only => [:index, :new, :create]
|
|
164
|
164
|
project.resources :versions, :shallow => true,
|
|
165
|
165
|
:collection => {:close_completed => :put},
|
|
166
|
166
|
:member => {:status_by => :post}
|
|
167
|
167
|
project.resources :news, :shallow => true
|
|
168
|
168
|
project.resources :time_entries, :controller => 'timelog',
|
|
169
|
169
|
:collection => {:report => :get}
|
|
170
|
170
|
project.resources :queries, :only => [:new, :create]
|
|
171
|
171
|
project.resources :issue_categories, :shallow => true
|
|
172
|
172
|
project.resources :documents, :shallow => true, :member => {:add_attachment => :post}
|
|
173
|
173
|
project.resources :boards
|
|
174
|
174
|
project.resources :repositories, :shallow => true, :except => [:index, :show],
|
|
175
|
175
|
:member => {:committers => [:get, :post]}
|
|
176
|
176
|
project.resources :memberships, :shallow => true, :controller => 'members',
|
|
177
|
177
|
:only => [:index, :show, :create, :update, :destroy],
|
|
178
|
178
|
:collection => {:autocomplete => :get}
|
|
179
|
179
|
|
|
180
|
180
|
project.wiki_start_page 'wiki', :controller => 'wiki', :action => 'show', :conditions => {:method => :get}
|
|
181
|
181
|
project.wiki_index 'wiki/index', :controller => 'wiki', :action => 'index', :conditions => {:method => :get}
|
|
182
|
182
|
project.wiki_diff 'wiki/:id/diff/:version', :controller => 'wiki', :action => 'diff', :version => nil
|
|
183
|
183
|
project.wiki_diff 'wiki/:id/diff/:version/vs/:version_from', :controller => 'wiki', :action => 'diff'
|
|
184
|
184
|
project.wiki_annotate 'wiki/:id/annotate/:version', :controller => 'wiki', :action => 'annotate'
|
|
185
|
185
|
project.resources :wiki, :except => [:new, :create], :member => {
|
|
186
|
186
|
:rename => [:get, :post],
|
|
187
|
187
|
:history => :get,
|
|
188
|
188
|
:preview => :any,
|
|
189
|
189
|
:protect => :post,
|
|
190
|
190
|
:add_attachment => :post
|
|
191
|
191
|
}, :collection => {
|
|
192
|
192
|
:export => :get,
|
|
193
|
193
|
:date_index => :get
|
|
194
|
194
|
}
|
|
195
|
195
|
end
|
|
196
|
196
|
|
|
197
|
197
|
map.connect 'news', :controller => 'news', :action => 'index'
|
|
198
|
198
|
map.connect 'news.:format', :controller => 'news', :action => 'index'
|
|
199
|
199
|
|
|
200
|
200
|
map.resources :queries, :except => [:show]
|
|
201
|
201
|
map.resources :issues,
|
|
202
|
202
|
:collection => {:bulk_edit => [:get, :post], :bulk_update => :post} do |issues|
|
|
203
|
203
|
issues.resources :time_entries, :controller => 'timelog',
|
|
204
|
204
|
:collection => {:report => :get}
|
|
205
|
205
|
issues.resources :relations, :shallow => true,
|
|
206
|
206
|
:controller => 'issue_relations',
|
|
207
|
207
|
:only => [:index, :show, :create, :destroy]
|
|
208
|
208
|
end
|
|
209
|
209
|
# Bulk deletion
|
|
210
|
210
|
map.connect '/issues', :controller => 'issues', :action => 'destroy',
|
|
211
|
211
|
:conditions => {:method => :delete}
|
|
212
|
212
|
|
|
213
|
213
|
map.connect '/time_entries/destroy',
|
|
214
|
214
|
:controller => 'timelog', :action => 'destroy',
|
|
215
|
215
|
:conditions => { :method => :delete }
|
|
216
|
216
|
map.time_entries_context_menu '/time_entries/context_menu',
|
|
217
|
217
|
:controller => 'context_menus', :action => 'time_entries'
|
|
218
|
218
|
|
|
219
|
219
|
map.resources :time_entries, :controller => 'timelog',
|
|
220
|
220
|
:collection => {:report => :get, :bulk_edit => :get, :bulk_update => :post}
|
|
221
|
221
|
|
|
222
|
222
|
map.with_options :controller => 'activities', :action => 'index',
|
|
223
|
223
|
:conditions => {:method => :get} do |activity|
|
|
224
|
224
|
activity.connect 'projects/:id/activity'
|
|
225
|
225
|
activity.connect 'projects/:id/activity.:format'
|
|
226
|
226
|
activity.connect 'activity', :id => nil
|
|
227
|
227
|
activity.connect 'activity.:format', :id => nil
|
|
228
|
228
|
end
|
|
229
|
229
|
|
|
230
|
230
|
map.with_options :controller => 'repositories' do |repositories|
|
|
231
|
231
|
repositories.with_options :conditions => {:method => :get} do |repository_views|
|
|
232
|
232
|
repository_views.connect 'projects/:id/repository',
|
|
233
|
233
|
:action => 'show'
|
|
234
|
234
|
|
|
235
|
235
|
repository_views.connect 'projects/:id/repository/:repository_id/statistics',
|
|
236
|
236
|
:action => 'stats'
|
|
237
|
237
|
repository_views.connect 'projects/:id/repository/:repository_id/graph',
|
|
238
|
238
|
:action => 'graph'
|
|
239
|
239
|
|
|
240
|
240
|
repository_views.connect 'projects/:id/repository/statistics',
|
|
241
|
241
|
:action => 'stats'
|
|
242
|
242
|
repository_views.connect 'projects/:id/repository/graph',
|
|
243
|
243
|
:action => 'graph'
|
|
244
|
244
|
|
|
245
|
245
|
repository_views.connect 'projects/:id/repository/:repository_id/revisions',
|
|
246
|
246
|
:action => 'revisions'
|
|
247
|
247
|
repository_views.connect 'projects/:id/repository/:repository_id/revisions.:format',
|
|
248
|
248
|
:action => 'revisions'
|
|
249
|
249
|
repository_views.connect 'projects/:id/repository/:repository_id/revisions/:rev',
|
|
250
|
250
|
:action => 'revision'
|
|
251
|
251
|
repository_views.connect 'projects/:id/repository/:repository_id/revisions/:rev/issues',
|
|
252
|
252
|
:action => 'add_related_issue', :conditions => {:method => :post}
|
|
253
|
253
|
repository_views.connect 'projects/:id/repository/:repository_id/revisions/:rev/issues/:issue_id',
|
|
254
|
254
|
:action => 'remove_related_issue', :conditions => {:method => :delete}
|
|
255
|
255
|
repository_views.connect 'projects/:id/repository/:repository_id/revisions/:rev/diff',
|
|
256
|
256
|
:action => 'diff'
|
|
257
|
257
|
repository_views.connect 'projects/:id/repository/:repository_id/revisions/:rev/diff.:format',
|
|
258
|
258
|
:action => 'diff'
|
|
259
|
259
|
repository_views.connect 'projects/:id/repository/:repository_id/revisions/:rev/raw/*path',
|
|
260
|
260
|
:action => 'entry', :format => 'raw'
|
|
261
|
261
|
repository_views.connect 'projects/:id/repository/:repository_id/revisions/:rev/:action/*path',
|
|
262
|
262
|
:requirements => {
|
|
263
|
263
|
:action => /(browse|show|entry|changes|annotate|diff)/,
|
|
264
|
264
|
:rev => /[a-z0-9\.\-_]+/
|
|
265
|
265
|
}
|
|
266
|
266
|
repository_views.connect 'projects/:id/repository/:repository_id/raw/*path',
|
|
267
|
267
|
:action => 'entry', :format => 'raw'
|
|
268
|
268
|
repository_views.connect 'projects/:id/repository/:repository_id/:action/*path',
|
|
269
|
269
|
:requirements => { :action => /(browse|entry|changes|annotate|diff)/ }
|
|
270
|
270
|
repository_views.connect 'projects/:id/repository/:repository_id/show/*path',
|
|
271
|
271
|
:requirements => { :path => /.+/ }
|
|
272
|
272
|
|
|
273
|
273
|
repository_views.connect 'projects/:id/repository/:repository_id/revision',
|
|
274
|
274
|
:action => 'revision'
|
|
275
|
275
|
|
|
276
|
276
|
repository_views.connect 'projects/:id/repository/revisions',
|
|
277
|
277
|
:action => 'revisions'
|
|
278
|
278
|
repository_views.connect 'projects/:id/repository/revisions.:format',
|
|
279
|
279
|
:action => 'revisions'
|
|
280
|
280
|
repository_views.connect 'projects/:id/repository/revisions/:rev',
|
|
281
|
281
|
:action => 'revision'
|
|
282
|
282
|
repository_views.connect 'projects/:id/repository/revisions/:rev/issues',
|
|
283
|
283
|
:action => 'add_related_issue', :conditions => {:method => :post}
|
|
284
|
284
|
repository_views.connect 'projects/:id/repository/revisions/:rev/issues/:issue_id',
|
|
285
|
285
|
:action => 'remove_related_issue', :conditions => {:method => :delete}
|
|
286
|
286
|
repository_views.connect 'projects/:id/repository/revisions/:rev/diff',
|
|
287
|
287
|
:action => 'diff'
|
|
288
|
288
|
repository_views.connect 'projects/:id/repository/revisions/:rev/diff.:format',
|
|
289
|
289
|
:action => 'diff'
|
|
290
|
290
|
repository_views.connect 'projects/:id/repository/revisions/:rev/raw/*path',
|
|
291
|
291
|
:action => 'entry', :format => 'raw'
|
|
292
|
292
|
repository_views.connect 'projects/:id/repository/revisions/:rev/:action/*path',
|
|
293
|
293
|
:requirements => {
|
|
294
|
294
|
:action => /(browse|show|entry|changes|annotate|diff)/,
|
|
295
|
295
|
:rev => /[a-z0-9\.\-_]+/
|
|
296
|
296
|
}
|
|
297
|
297
|
repository_views.connect 'projects/:id/repository/raw/*path',
|
|
298
|
298
|
:action => 'entry', :format => 'raw'
|
|
299
|
299
|
repository_views.connect 'projects/:id/repository/:action/*path',
|
|
300
|
300
|
:requirements => { :action => /(browse|show|entry|changes|annotate|diff)/ }
|
|
301
|
301
|
|
|
302
|
302
|
repository_views.connect 'projects/:id/repository/revision',
|
|
303
|
303
|
:action => 'revision'
|
|
304
|
304
|
|
|
305
|
305
|
repository_views.connect 'projects/:id/repository/:repository_id',
|
|
306
|
306
|
:action => 'show'
|
|
307
|
307
|
end
|
|
308
|
308
|
end
|
|
309
|
309
|
|
|
310
|
310
|
# additional routes for having the file name at the end of url
|
|
311
|
311
|
map.connect 'attachments/:id/:filename', :controller => 'attachments',
|
|
312
|
312
|
:action => 'show', :id => /\d+/, :filename => /.*/,
|
|
313
|
313
|
:conditions => {:method => :get}
|
|
314
|
314
|
map.connect 'attachments/download/:id/:filename', :controller => 'attachments',
|
|
315
|
315
|
:action => 'download', :id => /\d+/, :filename => /.*/,
|
|
316
|
316
|
:conditions => {:method => :get}
|
|
317
|
317
|
map.connect 'attachments/download/:id', :controller => 'attachments',
|
|
318
|
318
|
:action => 'download', :id => /\d+/,
|
|
319
|
319
|
:conditions => {:method => :get}
|
|
320
|
320
|
map.resources :attachments, :only => [:show, :destroy]
|
|
321
|
321
|
|
|
322
|
322
|
map.resources :groups, :member => {:autocomplete_for_user => :get}
|
|
323
|
323
|
map.group_users 'groups/:id/users', :controller => 'groups',
|
|
324
|
324
|
:action => 'add_users', :id => /\d+/,
|
|
325
|
325
|
:conditions => {:method => :post}
|
|
326
|
326
|
map.group_user 'groups/:id/users/:user_id', :controller => 'groups',
|
|
327
|
327
|
:action => 'remove_user', :id => /\d+/,
|
|
328
|
328
|
:conditions => {:method => :delete}
|
|
329
|
329
|
map.connect 'groups/destroy_membership/:id', :controller => 'groups',
|
|
330
|
330
|
:action => 'destroy_membership', :id => /\d+/,
|
|
331
|
331
|
:conditions => {:method => :post}
|
|
332
|
332
|
map.connect 'groups/edit_membership/:id', :controller => 'groups',
|
|
333
|
333
|
:action => 'edit_membership', :id => /\d+/,
|
|
334
|
334
|
:conditions => {:method => :post}
|
|
335
|
335
|
|
|
336
|
336
|
map.resources :trackers, :except => :show
|
|
337
|
337
|
map.resources :issue_statuses, :except => :show, :collection => {:update_issue_done_ratio => :post}
|
|
338
|
338
|
map.resources :custom_fields, :except => :show
|
|
339
|
339
|
map.resources :roles, :except => :show, :collection => {:permissions => [:get, :post]}
|
|
340
|
340
|
map.resources :enumerations, :except => :show
|
|
341
|
341
|
|
|
|
342
|
map.connect 'projects/:id/search', :controller => 'search', :action => 'index', :conditions => {:method => :get}
|
|
342
|
343
|
map.connect 'search', :controller => 'search', :action => 'index', :conditions => {:method => :get}
|
|
343
|
344
|
|
|
344
|
345
|
map.connect 'mail_handler', :controller => 'mail_handler',
|
|
345
|
346
|
:action => 'index', :conditions => {:method => :post}
|
|
346
|
347
|
|
|
347
|
348
|
map.connect 'admin', :controller => 'admin', :action => 'index',
|
|
348
|
349
|
:conditions => {:method => :get}
|
|
349
|
350
|
map.connect 'admin/projects', :controller => 'admin', :action => 'projects',
|
|
350
|
351
|
:conditions => {:method => :get}
|
|
351
|
352
|
map.connect 'admin/plugins', :controller => 'admin', :action => 'plugins',
|
|
352
|
353
|
:conditions => {:method => :get}
|
|
353
|
354
|
map.connect 'admin/info', :controller => 'admin', :action => 'info',
|
|
354
|
355
|
:conditions => {:method => :get}
|
|
355
|
356
|
map.connect 'admin/test_email', :controller => 'admin', :action => 'test_email',
|
|
356
|
357
|
:conditions => {:method => :get}
|
|
357
|
358
|
map.connect 'admin/default_configuration', :controller => 'admin',
|
|
358
|
359
|
:action => 'default_configuration', :conditions => {:method => :post}
|
|
359
|
360
|
|
|
360
|
361
|
map.resources :auth_sources, :member => {:test_connection => :get}
|
|
361
|
362
|
|
|
362
|
363
|
map.connect 'workflows', :controller => 'workflows',
|
|
363
|
364
|
:action => 'index', :conditions => {:method => :get}
|
|
364
|
365
|
map.connect 'workflows/edit', :controller => 'workflows',
|
|
365
|
366
|
:action => 'edit', :conditions => {:method => [:get, :post]}
|
|
366
|
367
|
map.connect 'workflows/copy', :controller => 'workflows',
|
|
367
|
368
|
:action => 'copy', :conditions => {:method => [:get, :post]}
|
|
368
|
369
|
|
|
369
|
370
|
map.connect 'settings', :controller => 'settings',
|
|
370
|
371
|
:action => 'index', :conditions => {:method => :get}
|
|
371
|
372
|
map.connect 'settings/edit', :controller => 'settings',
|
|
372
|
373
|
:action => 'edit', :conditions => {:method => [:get, :post]}
|
|
373
|
374
|
map.connect 'settings/plugin/:id', :controller => 'settings',
|
|
374
|
375
|
:action => 'plugin', :conditions => {:method => [:get, :post]}
|
|
375
|
376
|
|
|
376
|
377
|
map.with_options :controller => 'sys' do |sys|
|
|
377
|
378
|
sys.connect 'sys/projects.:format',
|
|
378
|
379
|
:action => 'projects',
|
|
379
|
380
|
:conditions => {:method => :get}
|
|
380
|
381
|
sys.connect 'sys/projects/:id/repository.:format',
|
|
381
|
382
|
:action => 'create_project_repository',
|
|
382
|
383
|
:conditions => {:method => :post}
|
|
383
|
384
|
sys.connect 'sys/fetch_changesets',
|
|
384
|
385
|
:action => 'fetch_changesets',
|
|
385
|
386
|
:conditions => {:method => :get}
|
|
386
|
387
|
end
|
|
387
|
388
|
|
|
388
|
389
|
map.connect 'uploads.:format', :controller => 'attachments', :action => 'upload', :conditions => {:method => :post}
|
|
389
|
390
|
|
|
390
|
391
|
map.connect 'robots.txt', :controller => 'welcome',
|
|
391
|
392
|
:action => 'robots', :conditions => {:method => :get}
|
|
392
|
393
|
|
|
393
|
394
|
# Used for OpenID
|
|
394
|
395
|
map.root :controller => 'account', :action => 'login'
|
|
395
|
396
|
end
|