##// END OF EJS Templates
route: code layout clean up journals route...
Toshi MARUYAMA -
r8253:7785ad191aa4
parent child
Show More
@@ -1,281 +1,284
1 ActionController::Routing::Routes.draw do |map|
1 ActionController::Routing::Routes.draw do |map|
2 # Add your own custom routes here.
2 # Add your own custom routes here.
3 # The priority is based upon order of creation: first created -> highest priority.
3 # The priority is based upon order of creation: first created -> highest priority.
4
4
5 # Here's a sample route:
5 # Here's a sample route:
6 # map.connect 'products/:id', :controller => 'catalog', :action => 'view'
6 # map.connect 'products/:id', :controller => 'catalog', :action => 'view'
7 # Keep in mind you can assign values other than :controller and :action
7 # Keep in mind you can assign values other than :controller and :action
8
8
9 map.home '', :controller => 'welcome', :conditions => {:method => :get}
9 map.home '', :controller => 'welcome', :conditions => {:method => :get}
10
10
11 map.signin 'login', :controller => 'account', :action => 'login',
11 map.signin 'login', :controller => 'account', :action => 'login',
12 :conditions => {:method => [:get, :post]}
12 :conditions => {:method => [:get, :post]}
13 map.signout 'logout', :controller => 'account', :action => 'logout',
13 map.signout 'logout', :controller => 'account', :action => 'logout',
14 :conditions => {:method => :get}
14 :conditions => {:method => :get}
15 map.connect 'account/register', :controller => 'account', :action => 'register',
15 map.connect 'account/register', :controller => 'account', :action => 'register',
16 :conditions => {:method => [:get, :post]}
16 :conditions => {:method => [:get, :post]}
17 map.connect 'account/lost_password', :controller => 'account', :action => 'lost_password',
17 map.connect 'account/lost_password', :controller => 'account', :action => 'lost_password',
18 :conditions => {:method => [:get, :post]}
18 :conditions => {:method => [:get, :post]}
19 map.connect 'account/activate', :controller => 'account', :action => 'activate',
19 map.connect 'account/activate', :controller => 'account', :action => 'activate',
20 :conditions => {:method => :get}
20 :conditions => {:method => :get}
21
21
22 map.connect 'roles/workflow/:id/:role_id/:tracker_id', :controller => 'roles', :action => 'workflow'
22 map.connect 'roles/workflow/:id/:role_id/:tracker_id', :controller => 'roles', :action => 'workflow'
23
23
24 map.connect '/time_entries/destroy',
24 map.connect '/time_entries/destroy',
25 :controller => 'timelog', :action => 'destroy', :conditions => { :method => :delete }
25 :controller => 'timelog', :action => 'destroy', :conditions => { :method => :delete }
26 map.time_entries_context_menu '/time_entries/context_menu',
26 map.time_entries_context_menu '/time_entries/context_menu',
27 :controller => 'context_menus', :action => 'time_entries'
27 :controller => 'context_menus', :action => 'time_entries'
28
28
29 map.resources :time_entries, :controller => 'timelog', :collection => {:report => :get, :bulk_edit => :get, :bulk_update => :post}
29 map.resources :time_entries, :controller => 'timelog', :collection => {:report => :get, :bulk_edit => :get, :bulk_update => :post}
30
30
31 map.connect 'projects/:id/wiki', :controller => 'wikis', :action => 'edit', :conditions => {:method => :post}
31 map.connect 'projects/:id/wiki', :controller => 'wikis', :action => 'edit', :conditions => {:method => :post}
32 map.connect 'projects/:id/wiki/destroy', :controller => 'wikis', :action => 'destroy', :conditions => {:method => [:get, :post]}
32 map.connect 'projects/:id/wiki/destroy', :controller => 'wikis', :action => 'destroy', :conditions => {:method => [:get, :post]}
33
33
34 map.with_options :controller => 'messages' do |messages_routes|
34 map.with_options :controller => 'messages' do |messages_routes|
35 messages_routes.with_options :conditions => {:method => :get} do |messages_views|
35 messages_routes.with_options :conditions => {:method => :get} do |messages_views|
36 messages_views.connect 'boards/:board_id/topics/new', :action => 'new'
36 messages_views.connect 'boards/:board_id/topics/new', :action => 'new'
37 messages_views.connect 'boards/:board_id/topics/:id', :action => 'show'
37 messages_views.connect 'boards/:board_id/topics/:id', :action => 'show'
38 messages_views.connect 'boards/:board_id/topics/quote/:id', :action => 'quote'
38 messages_views.connect 'boards/:board_id/topics/quote/:id', :action => 'quote'
39 messages_views.connect 'boards/:board_id/topics/:id/edit', :action => 'edit'
39 messages_views.connect 'boards/:board_id/topics/:id/edit', :action => 'edit'
40 end
40 end
41 messages_routes.with_options :conditions => {:method => :post} do |messages_actions|
41 messages_routes.with_options :conditions => {:method => :post} do |messages_actions|
42 messages_actions.connect 'boards/:board_id/topics/new', :action => 'new'
42 messages_actions.connect 'boards/:board_id/topics/new', :action => 'new'
43 messages_actions.connect 'boards/:board_id/topics/preview', :action => 'preview'
43 messages_actions.connect 'boards/:board_id/topics/preview', :action => 'preview'
44 messages_actions.connect 'boards/:board_id/topics/:id/replies', :action => 'reply'
44 messages_actions.connect 'boards/:board_id/topics/:id/replies', :action => 'reply'
45 messages_actions.connect 'boards/:board_id/topics/:id/edit', :action => 'edit'
45 messages_actions.connect 'boards/:board_id/topics/:id/edit', :action => 'edit'
46 messages_actions.connect 'boards/:board_id/topics/:id/destroy', :action => 'destroy'
46 messages_actions.connect 'boards/:board_id/topics/:id/destroy', :action => 'destroy'
47 end
47 end
48 end
48 end
49
49
50 map.resources :issue_moves, :only => [:new, :create], :path_prefix => '/issues', :as => 'move'
50 map.resources :issue_moves, :only => [:new, :create], :path_prefix => '/issues', :as => 'move'
51 map.resources :queries, :except => [:show]
51 map.resources :queries, :except => [:show]
52
52
53 # Misc issue routes. TODO: move into resources
53 # Misc issue routes. TODO: move into resources
54 map.auto_complete_issues '/issues/auto_complete', :controller => 'auto_completes', :action => 'issues', :conditions => { :method => :get }
54 map.auto_complete_issues '/issues/auto_complete', :controller => 'auto_completes', :action => 'issues', :conditions => { :method => :get }
55 map.preview_issue '/issues/preview/:id', :controller => 'previews', :action => 'issue' # TODO: would look nicer as /issues/:id/preview
55 map.preview_issue '/issues/preview/:id', :controller => 'previews', :action => 'issue' # TODO: would look nicer as /issues/:id/preview
56 map.issues_context_menu '/issues/context_menu', :controller => 'context_menus', :action => 'issues'
56 map.issues_context_menu '/issues/context_menu', :controller => 'context_menus', :action => 'issues'
57 map.issue_changes '/issues/changes', :controller => 'journals', :action => 'index'
57 map.issue_changes '/issues/changes', :controller => 'journals', :action => 'index'
58 map.quoted_issue '/issues/:id/quoted', :controller => 'journals', :action => 'new', :id => /\d+/, :conditions => { :method => :post }
58 map.quoted_issue '/issues/:id/quoted', :controller => 'journals', :action => 'new',
59 :id => /\d+/, :conditions => { :method => :post }
59
60
60 map.connect '/journals/diff/:id', :controller => 'journals', :action => 'diff', :id => /\d+/, :conditions => { :method => :get }
61 map.connect '/journals/diff/:id', :controller => 'journals', :action => 'diff',
61 map.connect '/journals/edit/:id', :controller => 'journals', :action => 'edit', :id => /\d+/, :conditions => { :method => [:get, :post] }
62 :id => /\d+/, :conditions => { :method => :get }
63 map.connect '/journals/edit/:id', :controller => 'journals', :action => 'edit',
64 :id => /\d+/, :conditions => { :method => [:get, :post] }
62
65
63 map.with_options :controller => 'gantts', :action => 'show' do |gantts_routes|
66 map.with_options :controller => 'gantts', :action => 'show' do |gantts_routes|
64 gantts_routes.connect '/projects/:project_id/issues/gantt'
67 gantts_routes.connect '/projects/:project_id/issues/gantt'
65 gantts_routes.connect '/projects/:project_id/issues/gantt.:format'
68 gantts_routes.connect '/projects/:project_id/issues/gantt.:format'
66 gantts_routes.connect '/issues/gantt.:format'
69 gantts_routes.connect '/issues/gantt.:format'
67 end
70 end
68
71
69 map.with_options :controller => 'calendars', :action => 'show' do |calendars_routes|
72 map.with_options :controller => 'calendars', :action => 'show' do |calendars_routes|
70 calendars_routes.connect '/projects/:project_id/issues/calendar'
73 calendars_routes.connect '/projects/:project_id/issues/calendar'
71 calendars_routes.connect '/issues/calendar'
74 calendars_routes.connect '/issues/calendar'
72 end
75 end
73
76
74 map.with_options :controller => 'reports', :conditions => {:method => :get} do |reports|
77 map.with_options :controller => 'reports', :conditions => {:method => :get} do |reports|
75 reports.connect 'projects/:id/issues/report', :action => 'issue_report'
78 reports.connect 'projects/:id/issues/report', :action => 'issue_report'
76 reports.connect 'projects/:id/issues/report/:detail', :action => 'issue_report_details'
79 reports.connect 'projects/:id/issues/report/:detail', :action => 'issue_report_details'
77 end
80 end
78
81
79 map.connect 'my/account', :controller => 'my', :action => 'account',
82 map.connect 'my/account', :controller => 'my', :action => 'account',
80 :conditions => {:method => [:get, :post]}
83 :conditions => {:method => [:get, :post]}
81 map.connect 'my/page', :controller => 'my', :action => 'page',
84 map.connect 'my/page', :controller => 'my', :action => 'page',
82 :conditions => {:method => :get}
85 :conditions => {:method => :get}
83 # Redirects to my/page
86 # Redirects to my/page
84 map.connect 'my', :controller => 'my', :action => 'index',
87 map.connect 'my', :controller => 'my', :action => 'index',
85 :conditions => {:method => :get}
88 :conditions => {:method => :get}
86 map.connect 'my/reset_rss_key', :controller => 'my', :action => 'reset_rss_key',
89 map.connect 'my/reset_rss_key', :controller => 'my', :action => 'reset_rss_key',
87 :conditions => {:method => :post}
90 :conditions => {:method => :post}
88 map.connect 'my/reset_api_key', :controller => 'my', :action => 'reset_api_key',
91 map.connect 'my/reset_api_key', :controller => 'my', :action => 'reset_api_key',
89 :conditions => {:method => :post}
92 :conditions => {:method => :post}
90 map.connect 'my/password', :controller => 'my', :action => 'password',
93 map.connect 'my/password', :controller => 'my', :action => 'password',
91 :conditions => {:method => [:get, :post]}
94 :conditions => {:method => [:get, :post]}
92 map.connect 'my/page_layout', :controller => 'my', :action => 'page_layout',
95 map.connect 'my/page_layout', :controller => 'my', :action => 'page_layout',
93 :conditions => {:method => :get}
96 :conditions => {:method => :get}
94 map.connect 'my/add_block', :controller => 'my', :action => 'add_block',
97 map.connect 'my/add_block', :controller => 'my', :action => 'add_block',
95 :conditions => {:method => :post}
98 :conditions => {:method => :post}
96 map.connect 'my/remove_block', :controller => 'my', :action => 'remove_block',
99 map.connect 'my/remove_block', :controller => 'my', :action => 'remove_block',
97 :conditions => {:method => :post}
100 :conditions => {:method => :post}
98 map.connect 'my/order_blocks', :controller => 'my', :action => 'order_blocks',
101 map.connect 'my/order_blocks', :controller => 'my', :action => 'order_blocks',
99 :conditions => {:method => :post}
102 :conditions => {:method => :post}
100
103
101 map.resources :issues, :collection => {:bulk_edit => :get, :bulk_update => :post} do |issues|
104 map.resources :issues, :collection => {:bulk_edit => :get, :bulk_update => :post} do |issues|
102 issues.resources :time_entries, :controller => 'timelog', :collection => {:report => :get}
105 issues.resources :time_entries, :controller => 'timelog', :collection => {:report => :get}
103 issues.resources :relations, :shallow => true, :controller => 'issue_relations', :only => [:index, :show, :create, :destroy]
106 issues.resources :relations, :shallow => true, :controller => 'issue_relations', :only => [:index, :show, :create, :destroy]
104 end
107 end
105 # Bulk deletion
108 # Bulk deletion
106 map.connect '/issues', :controller => 'issues', :action => 'destroy', :conditions => {:method => :delete}
109 map.connect '/issues', :controller => 'issues', :action => 'destroy', :conditions => {:method => :delete}
107
110
108 map.connect 'projects/:id/members/new', :controller => 'members', :action => 'new', :conditions => { :method => :post }
111 map.connect 'projects/:id/members/new', :controller => 'members', :action => 'new', :conditions => { :method => :post }
109 map.connect 'members/edit/:id', :controller => 'members', :action => 'edit', :id => /\d+/, :conditions => { :method => :post }
112 map.connect 'members/edit/:id', :controller => 'members', :action => 'edit', :id => /\d+/, :conditions => { :method => :post }
110 map.connect 'members/destroy/:id', :controller => 'members', :action => 'destroy', :id => /\d+/, :conditions => { :method => :post }
113 map.connect 'members/destroy/:id', :controller => 'members', :action => 'destroy', :id => /\d+/, :conditions => { :method => :post }
111 map.connect 'members/autocomplete_for_member/:id', :controller => 'members', :action => 'autocomplete_for_member', :conditions => { :method => :post }
114 map.connect 'members/autocomplete_for_member/:id', :controller => 'members', :action => 'autocomplete_for_member', :conditions => { :method => :post }
112
115
113 map.resources :users
116 map.resources :users
114 map.with_options :controller => 'users' do |users|
117 map.with_options :controller => 'users' do |users|
115 users.user_memberships 'users/:id/memberships', :action => 'edit_membership', :conditions => {:method => :post}
118 users.user_memberships 'users/:id/memberships', :action => 'edit_membership', :conditions => {:method => :post}
116 users.user_membership 'users/:id/memberships/:membership_id', :action => 'edit_membership', :conditions => {:method => :put}
119 users.user_membership 'users/:id/memberships/:membership_id', :action => 'edit_membership', :conditions => {:method => :put}
117 users.connect 'users/:id/memberships/:membership_id', :action => 'destroy_membership', :conditions => {:method => :delete}
120 users.connect 'users/:id/memberships/:membership_id', :action => 'destroy_membership', :conditions => {:method => :delete}
118 end
121 end
119
122
120 # For nice "roadmap" in the url for the index action
123 # For nice "roadmap" in the url for the index action
121 map.connect 'projects/:project_id/roadmap', :controller => 'versions', :action => 'index'
124 map.connect 'projects/:project_id/roadmap', :controller => 'versions', :action => 'index'
122
125
123 map.connect 'news', :controller => 'news', :action => 'index'
126 map.connect 'news', :controller => 'news', :action => 'index'
124 map.connect 'news.:format', :controller => 'news', :action => 'index'
127 map.connect 'news.:format', :controller => 'news', :action => 'index'
125 map.preview_news '/news/preview', :controller => 'previews', :action => 'news'
128 map.preview_news '/news/preview', :controller => 'previews', :action => 'news'
126 map.connect 'news/:id/comments', :controller => 'comments', :action => 'create', :conditions => {:method => :post}
129 map.connect 'news/:id/comments', :controller => 'comments', :action => 'create', :conditions => {:method => :post}
127 map.connect 'news/:id/comments/:comment_id', :controller => 'comments', :action => 'destroy', :conditions => {:method => :delete}
130 map.connect 'news/:id/comments/:comment_id', :controller => 'comments', :action => 'destroy', :conditions => {:method => :delete}
128
131
129 map.connect 'watchers/new', :controller=> 'watchers', :action => 'new', :conditions => {:method => [:get, :post]}
132 map.connect 'watchers/new', :controller=> 'watchers', :action => 'new', :conditions => {:method => [:get, :post]}
130 map.connect 'watchers/destroy', :controller=> 'watchers', :action => 'destroy', :conditions => {:method => :post}
133 map.connect 'watchers/destroy', :controller=> 'watchers', :action => 'destroy', :conditions => {:method => :post}
131 map.connect 'watchers/watch', :controller=> 'watchers', :action => 'watch', :conditions => {:method => :post}
134 map.connect 'watchers/watch', :controller=> 'watchers', :action => 'watch', :conditions => {:method => :post}
132 map.connect 'watchers/unwatch', :controller=> 'watchers', :action => 'unwatch', :conditions => {:method => :post}
135 map.connect 'watchers/unwatch', :controller=> 'watchers', :action => 'unwatch', :conditions => {:method => :post}
133
136
134 map.resources :projects, :member => {
137 map.resources :projects, :member => {
135 :copy => [:get, :post],
138 :copy => [:get, :post],
136 :settings => :get,
139 :settings => :get,
137 :modules => :post,
140 :modules => :post,
138 :archive => :post,
141 :archive => :post,
139 :unarchive => :post
142 :unarchive => :post
140 } do |project|
143 } do |project|
141 project.resource :project_enumerations, :as => 'enumerations', :only => [:update, :destroy]
144 project.resource :project_enumerations, :as => 'enumerations', :only => [:update, :destroy]
142 project.resources :issues, :only => [:index, :new, :create] do |issues|
145 project.resources :issues, :only => [:index, :new, :create] do |issues|
143 issues.resources :time_entries, :controller => 'timelog', :collection => {:report => :get}
146 issues.resources :time_entries, :controller => 'timelog', :collection => {:report => :get}
144 end
147 end
145 # issue form update
148 # issue form update
146 project.issue_form 'issues/new', :controller => 'issues', :action => 'new', :conditions => {:method => :post}
149 project.issue_form 'issues/new', :controller => 'issues', :action => 'new', :conditions => {:method => :post}
147
150
148 project.resources :files, :only => [:index, :new, :create]
151 project.resources :files, :only => [:index, :new, :create]
149 project.resources :versions, :shallow => true, :collection => {:close_completed => :put}, :member => {:status_by => :post}
152 project.resources :versions, :shallow => true, :collection => {:close_completed => :put}, :member => {:status_by => :post}
150 project.resources :news, :shallow => true
153 project.resources :news, :shallow => true
151 project.resources :time_entries, :controller => 'timelog', :path_prefix => 'projects/:project_id', :collection => {:report => :get}
154 project.resources :time_entries, :controller => 'timelog', :path_prefix => 'projects/:project_id', :collection => {:report => :get}
152 project.resources :queries, :only => [:new, :create]
155 project.resources :queries, :only => [:new, :create]
153 project.resources :issue_categories, :shallow => true
156 project.resources :issue_categories, :shallow => true
154 project.resources :documents, :shallow => true, :member => {:add_attachment => :post}
157 project.resources :documents, :shallow => true, :member => {:add_attachment => :post}
155 project.resources :boards
158 project.resources :boards
156
159
157 project.wiki_start_page 'wiki', :controller => 'wiki', :action => 'show', :conditions => {:method => :get}
160 project.wiki_start_page 'wiki', :controller => 'wiki', :action => 'show', :conditions => {:method => :get}
158 project.wiki_index 'wiki/index', :controller => 'wiki', :action => 'index', :conditions => {:method => :get}
161 project.wiki_index 'wiki/index', :controller => 'wiki', :action => 'index', :conditions => {:method => :get}
159 project.wiki_diff 'wiki/:id/diff/:version', :controller => 'wiki', :action => 'diff', :version => nil
162 project.wiki_diff 'wiki/:id/diff/:version', :controller => 'wiki', :action => 'diff', :version => nil
160 project.wiki_diff 'wiki/:id/diff/:version/vs/:version_from', :controller => 'wiki', :action => 'diff'
163 project.wiki_diff 'wiki/:id/diff/:version/vs/:version_from', :controller => 'wiki', :action => 'diff'
161 project.wiki_annotate 'wiki/:id/annotate/:version', :controller => 'wiki', :action => 'annotate'
164 project.wiki_annotate 'wiki/:id/annotate/:version', :controller => 'wiki', :action => 'annotate'
162 project.resources :wiki, :except => [:new, :create], :member => {
165 project.resources :wiki, :except => [:new, :create], :member => {
163 :rename => [:get, :post],
166 :rename => [:get, :post],
164 :history => :get,
167 :history => :get,
165 :preview => :any,
168 :preview => :any,
166 :protect => :post,
169 :protect => :post,
167 :add_attachment => :post
170 :add_attachment => :post
168 }, :collection => {
171 }, :collection => {
169 :export => :get,
172 :export => :get,
170 :date_index => :get
173 :date_index => :get
171 }
174 }
172
175
173 end
176 end
174
177
175 # TODO: port to be part of the resources route(s)
178 # TODO: port to be part of the resources route(s)
176 map.with_options :controller => 'projects' do |project_mapper|
179 map.with_options :controller => 'projects' do |project_mapper|
177 project_mapper.with_options :conditions => {:method => :get} do |project_views|
180 project_mapper.with_options :conditions => {:method => :get} do |project_views|
178 project_views.connect 'projects/:id/settings/:tab', :controller => 'projects', :action => 'settings'
181 project_views.connect 'projects/:id/settings/:tab', :controller => 'projects', :action => 'settings'
179 project_views.connect 'projects/:project_id/issues/:copy_from/copy', :controller => 'issues', :action => 'new'
182 project_views.connect 'projects/:project_id/issues/:copy_from/copy', :controller => 'issues', :action => 'new'
180 end
183 end
181 end
184 end
182
185
183 map.with_options :controller => 'activities', :action => 'index', :conditions => {:method => :get} do |activity|
186 map.with_options :controller => 'activities', :action => 'index', :conditions => {:method => :get} do |activity|
184 activity.connect 'projects/:id/activity'
187 activity.connect 'projects/:id/activity'
185 activity.connect 'projects/:id/activity.:format'
188 activity.connect 'projects/:id/activity.:format'
186 activity.connect 'activity', :id => nil
189 activity.connect 'activity', :id => nil
187 activity.connect 'activity.:format', :id => nil
190 activity.connect 'activity.:format', :id => nil
188 end
191 end
189
192
190 map.with_options :controller => 'repositories' do |repositories|
193 map.with_options :controller => 'repositories' do |repositories|
191 repositories.with_options :conditions => {:method => :get} do |repository_views|
194 repositories.with_options :conditions => {:method => :get} do |repository_views|
192 repository_views.connect 'projects/:id/repository', :action => 'show'
195 repository_views.connect 'projects/:id/repository', :action => 'show'
193 repository_views.connect 'projects/:id/repository/edit', :action => 'edit'
196 repository_views.connect 'projects/:id/repository/edit', :action => 'edit'
194 repository_views.connect 'projects/:id/repository/statistics', :action => 'stats'
197 repository_views.connect 'projects/:id/repository/statistics', :action => 'stats'
195 repository_views.connect 'projects/:id/repository/revisions', :action => 'revisions'
198 repository_views.connect 'projects/:id/repository/revisions', :action => 'revisions'
196 repository_views.connect 'projects/:id/repository/revisions.:format', :action => 'revisions'
199 repository_views.connect 'projects/:id/repository/revisions.:format', :action => 'revisions'
197 repository_views.connect 'projects/:id/repository/revisions/:rev', :action => 'revision'
200 repository_views.connect 'projects/:id/repository/revisions/:rev', :action => 'revision'
198 repository_views.connect 'projects/:id/repository/revisions/:rev/diff', :action => 'diff'
201 repository_views.connect 'projects/:id/repository/revisions/:rev/diff', :action => 'diff'
199 repository_views.connect 'projects/:id/repository/revisions/:rev/diff.:format', :action => 'diff'
202 repository_views.connect 'projects/:id/repository/revisions/:rev/diff.:format', :action => 'diff'
200 repository_views.connect 'projects/:id/repository/revisions/:rev/raw/*path', :action => 'entry', :format => 'raw', :requirements => { :rev => /[a-z0-9\.\-_]+/ }
203 repository_views.connect 'projects/:id/repository/revisions/:rev/raw/*path', :action => 'entry', :format => 'raw', :requirements => { :rev => /[a-z0-9\.\-_]+/ }
201 repository_views.connect 'projects/:id/repository/revisions/:rev/:action/*path', :requirements => { :rev => /[a-z0-9\.\-_]+/ }
204 repository_views.connect 'projects/:id/repository/revisions/:rev/:action/*path', :requirements => { :rev => /[a-z0-9\.\-_]+/ }
202 repository_views.connect 'projects/:id/repository/raw/*path', :action => 'entry', :format => 'raw'
205 repository_views.connect 'projects/:id/repository/raw/*path', :action => 'entry', :format => 'raw'
203 repository_views.connect 'projects/:id/repository/browse/*path', :action => 'browse'
206 repository_views.connect 'projects/:id/repository/browse/*path', :action => 'browse'
204 repository_views.connect 'projects/:id/repository/entry/*path', :action => 'entry'
207 repository_views.connect 'projects/:id/repository/entry/*path', :action => 'entry'
205 repository_views.connect 'projects/:id/repository/changes/*path', :action => 'changes'
208 repository_views.connect 'projects/:id/repository/changes/*path', :action => 'changes'
206 repository_views.connect 'projects/:id/repository/annotate/*path', :action => 'annotate'
209 repository_views.connect 'projects/:id/repository/annotate/*path', :action => 'annotate'
207 repository_views.connect 'projects/:id/repository/diff/*path', :action => 'diff'
210 repository_views.connect 'projects/:id/repository/diff/*path', :action => 'diff'
208 repository_views.connect 'projects/:id/repository/show/*path', :action => 'show'
211 repository_views.connect 'projects/:id/repository/show/*path', :action => 'show'
209 repository_views.connect 'projects/:id/repository/graph', :action => 'graph'
212 repository_views.connect 'projects/:id/repository/graph', :action => 'graph'
210 end
213 end
211
214
212 repositories.connect 'projects/:id/repository/revision', :action => 'revision', :conditions => {:method => [:get, :post]}
215 repositories.connect 'projects/:id/repository/revision', :action => 'revision', :conditions => {:method => [:get, :post]}
213 repositories.connect 'projects/:id/repository/committers', :action => 'committers', :conditions => {:method => [:get, :post]}
216 repositories.connect 'projects/:id/repository/committers', :action => 'committers', :conditions => {:method => [:get, :post]}
214 repositories.connect 'projects/:id/repository/edit', :action => 'edit', :conditions => {:method => :post}
217 repositories.connect 'projects/:id/repository/edit', :action => 'edit', :conditions => {:method => :post}
215 repositories.connect 'projects/:id/repository/destroy', :action => 'destroy', :conditions => {:method => :post}
218 repositories.connect 'projects/:id/repository/destroy', :action => 'destroy', :conditions => {:method => :post}
216 end
219 end
217
220
218 map.resources :attachments, :only => [:show, :destroy]
221 map.resources :attachments, :only => [:show, :destroy]
219 # additional routes for having the file name at the end of url
222 # additional routes for having the file name at the end of url
220 map.connect 'attachments/:id/:filename', :controller => 'attachments', :action => 'show', :id => /\d+/, :filename => /.*/, :conditions => {:method => :get}
223 map.connect 'attachments/:id/:filename', :controller => 'attachments', :action => 'show', :id => /\d+/, :filename => /.*/, :conditions => {:method => :get}
221 map.connect 'attachments/download/:id/:filename', :controller => 'attachments', :action => 'download', :id => /\d+/, :filename => /.*/, :conditions => {:method => :get}
224 map.connect 'attachments/download/:id/:filename', :controller => 'attachments', :action => 'download', :id => /\d+/, :filename => /.*/, :conditions => {:method => :get}
222 map.connect 'attachments/download/:id', :controller => 'attachments', :action => 'download', :id => /\d+/, :conditions => {:method => :get}
225 map.connect 'attachments/download/:id', :controller => 'attachments', :action => 'download', :id => /\d+/, :conditions => {:method => :get}
223
226
224 map.resources :groups, :member => {:autocomplete_for_user => :get}
227 map.resources :groups, :member => {:autocomplete_for_user => :get}
225 map.group_users 'groups/:id/users', :controller => 'groups', :action => 'add_users', :id => /\d+/, :conditions => {:method => :post}
228 map.group_users 'groups/:id/users', :controller => 'groups', :action => 'add_users', :id => /\d+/, :conditions => {:method => :post}
226 map.group_user 'groups/:id/users/:user_id', :controller => 'groups', :action => 'remove_user', :id => /\d+/, :conditions => {:method => :delete}
229 map.group_user 'groups/:id/users/:user_id', :controller => 'groups', :action => 'remove_user', :id => /\d+/, :conditions => {:method => :delete}
227 map.connect 'groups/destroy_membership/:id', :controller => 'groups', :action => 'destroy_membership', :id => /\d+/, :conditions => {:method => :post}
230 map.connect 'groups/destroy_membership/:id', :controller => 'groups', :action => 'destroy_membership', :id => /\d+/, :conditions => {:method => :post}
228 map.connect 'groups/edit_membership/:id', :controller => 'groups', :action => 'edit_membership', :id => /\d+/, :conditions => {:method => :post}
231 map.connect 'groups/edit_membership/:id', :controller => 'groups', :action => 'edit_membership', :id => /\d+/, :conditions => {:method => :post}
229
232
230 map.resources :trackers, :except => :show
233 map.resources :trackers, :except => :show
231 map.resources :issue_statuses, :except => :show, :collection => {:update_issue_done_ratio => :post}
234 map.resources :issue_statuses, :except => :show, :collection => {:update_issue_done_ratio => :post}
232 map.resources :custom_fields, :except => :show
235 map.resources :custom_fields, :except => :show
233 map.resources :roles, :except => :show, :collection => {:permissions => [:get, :post]}
236 map.resources :roles, :except => :show, :collection => {:permissions => [:get, :post]}
234 map.resources :enumerations, :except => :show
237 map.resources :enumerations, :except => :show
235
238
236 map.connect 'search', :controller => 'search', :action => 'index', :conditions => {:method => :get}
239 map.connect 'search', :controller => 'search', :action => 'index', :conditions => {:method => :get}
237
240
238 map.connect 'mail_handler', :controller => 'mail_handler', :action => 'index', :conditions => {:method => :post}
241 map.connect 'mail_handler', :controller => 'mail_handler', :action => 'index', :conditions => {:method => :post}
239
242
240 map.connect 'admin', :controller => 'admin', :action => 'index', :conditions => {:method => :get}
243 map.connect 'admin', :controller => 'admin', :action => 'index', :conditions => {:method => :get}
241 map.connect 'admin/projects', :controller => 'admin', :action => 'projects', :conditions => {:method => :get}
244 map.connect 'admin/projects', :controller => 'admin', :action => 'projects', :conditions => {:method => :get}
242 map.connect 'admin/plugins', :controller => 'admin', :action => 'plugins', :conditions => {:method => :get}
245 map.connect 'admin/plugins', :controller => 'admin', :action => 'plugins', :conditions => {:method => :get}
243 map.connect 'admin/info', :controller => 'admin', :action => 'info', :conditions => {:method => :get}
246 map.connect 'admin/info', :controller => 'admin', :action => 'info', :conditions => {:method => :get}
244 map.connect 'admin/test_email', :controller => 'admin', :action => 'test_email', :conditions => {:method => :get}
247 map.connect 'admin/test_email', :controller => 'admin', :action => 'test_email', :conditions => {:method => :get}
245 map.connect 'admin/default_configuration', :controller => 'admin', :action => 'default_configuration', :conditions => {:method => :post}
248 map.connect 'admin/default_configuration', :controller => 'admin', :action => 'default_configuration', :conditions => {:method => :post}
246
249
247 # Used by AuthSourcesControllerTest
250 # Used by AuthSourcesControllerTest
248 # TODO : refactor *AuthSourcesController to remove these routes
251 # TODO : refactor *AuthSourcesController to remove these routes
249 map.connect 'auth_sources', :controller => 'auth_sources', :action => 'index', :conditions => {:method => :get}
252 map.connect 'auth_sources', :controller => 'auth_sources', :action => 'index', :conditions => {:method => :get}
250 map.connect 'auth_sources/new', :controller => 'auth_sources', :action => 'new', :conditions => {:method => :get}
253 map.connect 'auth_sources/new', :controller => 'auth_sources', :action => 'new', :conditions => {:method => :get}
251 map.connect 'auth_sources/create', :controller => 'auth_sources', :action => 'create', :conditions => {:method => :post}
254 map.connect 'auth_sources/create', :controller => 'auth_sources', :action => 'create', :conditions => {:method => :post}
252 map.connect 'auth_sources/destroy/:id', :controller => 'auth_sources', :action => 'destroy', :id => /\d+/, :conditions => {:method => :post}
255 map.connect 'auth_sources/destroy/:id', :controller => 'auth_sources', :action => 'destroy', :id => /\d+/, :conditions => {:method => :post}
253 map.connect 'auth_sources/test_connection/:id', :controller => 'auth_sources', :action => 'test_connection', :conditions => {:method => :get}
256 map.connect 'auth_sources/test_connection/:id', :controller => 'auth_sources', :action => 'test_connection', :conditions => {:method => :get}
254 map.connect 'auth_sources/edit/:id', :controller => 'auth_sources', :action => 'edit', :id => /\d+/, :conditions => {:method => :get}
257 map.connect 'auth_sources/edit/:id', :controller => 'auth_sources', :action => 'edit', :id => /\d+/, :conditions => {:method => :get}
255 map.connect 'auth_sources/update/:id', :controller => 'auth_sources', :action => 'update', :id => /\d+/, :conditions => {:method => :post}
258 map.connect 'auth_sources/update/:id', :controller => 'auth_sources', :action => 'update', :id => /\d+/, :conditions => {:method => :post}
256
259
257 map.connect 'ldap_auth_sources', :controller => 'ldap_auth_sources', :action => 'index', :conditions => {:method => :get}
260 map.connect 'ldap_auth_sources', :controller => 'ldap_auth_sources', :action => 'index', :conditions => {:method => :get}
258 map.connect 'ldap_auth_sources/new', :controller => 'ldap_auth_sources', :action => 'new', :conditions => {:method => :get}
261 map.connect 'ldap_auth_sources/new', :controller => 'ldap_auth_sources', :action => 'new', :conditions => {:method => :get}
259 map.connect 'ldap_auth_sources/create', :controller => 'ldap_auth_sources', :action => 'create', :conditions => {:method => :post}
262 map.connect 'ldap_auth_sources/create', :controller => 'ldap_auth_sources', :action => 'create', :conditions => {:method => :post}
260 map.connect 'ldap_auth_sources/destroy/:id', :controller => 'ldap_auth_sources', :action => 'destroy', :id => /\d+/, :conditions => {:method => :post}
263 map.connect 'ldap_auth_sources/destroy/:id', :controller => 'ldap_auth_sources', :action => 'destroy', :id => /\d+/, :conditions => {:method => :post}
261 map.connect 'ldap_auth_sources/test_connection/:id', :controller => 'ldap_auth_sources', :action => 'test_connection', :conditions => {:method => :get}
264 map.connect 'ldap_auth_sources/test_connection/:id', :controller => 'ldap_auth_sources', :action => 'test_connection', :conditions => {:method => :get}
262 map.connect 'ldap_auth_sources/edit/:id', :controller => 'ldap_auth_sources', :action => 'edit', :id => /\d+/, :conditions => {:method => :get}
265 map.connect 'ldap_auth_sources/edit/:id', :controller => 'ldap_auth_sources', :action => 'edit', :id => /\d+/, :conditions => {:method => :get}
263 map.connect 'ldap_auth_sources/update/:id', :controller => 'ldap_auth_sources', :action => 'update', :id => /\d+/, :conditions => {:method => :post}
266 map.connect 'ldap_auth_sources/update/:id', :controller => 'ldap_auth_sources', :action => 'update', :id => /\d+/, :conditions => {:method => :post}
264 map.connect 'workflows', :controller => 'workflows', :action => 'index', :conditions => {:method => :get}
267 map.connect 'workflows', :controller => 'workflows', :action => 'index', :conditions => {:method => :get}
265 map.connect 'workflows/edit', :controller => 'workflows', :action => 'edit', :conditions => {:method => [:get, :post]}
268 map.connect 'workflows/edit', :controller => 'workflows', :action => 'edit', :conditions => {:method => [:get, :post]}
266 map.connect 'workflows/copy', :controller => 'workflows', :action => 'copy', :conditions => {:method => [:get, :post]}
269 map.connect 'workflows/copy', :controller => 'workflows', :action => 'copy', :conditions => {:method => [:get, :post]}
267 map.connect 'settings', :controller => 'settings', :action => 'index', :conditions => {:method => :get}
270 map.connect 'settings', :controller => 'settings', :action => 'index', :conditions => {:method => :get}
268 map.connect 'settings/edit', :controller => 'settings', :action => 'edit', :conditions => {:method => [:get, :post]}
271 map.connect 'settings/edit', :controller => 'settings', :action => 'edit', :conditions => {:method => [:get, :post]}
269 map.connect 'settings/plugin/:id', :controller => 'settings', :action => 'plugin', :conditions => {:method => [:get, :post]}
272 map.connect 'settings/plugin/:id', :controller => 'settings', :action => 'plugin', :conditions => {:method => [:get, :post]}
270
273
271 map.with_options :controller => 'sys' do |sys|
274 map.with_options :controller => 'sys' do |sys|
272 sys.connect 'sys/projects.:format', :action => 'projects', :conditions => {:method => :get}
275 sys.connect 'sys/projects.:format', :action => 'projects', :conditions => {:method => :get}
273 sys.connect 'sys/projects/:id/repository.:format', :action => 'create_project_repository', :conditions => {:method => :post}
276 sys.connect 'sys/projects/:id/repository.:format', :action => 'create_project_repository', :conditions => {:method => :post}
274 sys.connect 'sys/fetch_changesets', :action => 'fetch_changesets', :conditions => {:method => :get}
277 sys.connect 'sys/fetch_changesets', :action => 'fetch_changesets', :conditions => {:method => :get}
275 end
278 end
276
279
277 map.connect 'robots.txt', :controller => 'welcome', :action => 'robots', :conditions => {:method => :get}
280 map.connect 'robots.txt', :controller => 'welcome', :action => 'robots', :conditions => {:method => :get}
278
281
279 # Used for OpenID
282 # Used for OpenID
280 map.root :controller => 'account', :action => 'login'
283 map.root :controller => 'account', :action => 'login'
281 end
284 end
General Comments 0
You need to be logged in to leave comments. Login now