##// END OF EJS Templates
Removing the custom Redmine hook in routes in favor of Engine's hook....
Eric Davis -
r1989:81eee10d5b00
parent child
Show More
@@ -1,49 +1,51
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 # Allow Redmine plugins to map routes and potentially override them
9 # Allow Redmine plugins to map routes and potentially override them
10 Redmine::Hook.call_hook :routes, :map => map
10 Rails.plugins.each do |plugin|
11 map.from_plugin plugin.name.to_sym
12 end
11
13
12 map.home '', :controller => 'welcome'
14 map.home '', :controller => 'welcome'
13 map.signin 'login', :controller => 'account', :action => 'login'
15 map.signin 'login', :controller => 'account', :action => 'login'
14 map.signout 'logout', :controller => 'account', :action => 'logout'
16 map.signout 'logout', :controller => 'account', :action => 'logout'
15
17
16 map.connect 'wiki/:id/:page/:action', :controller => 'wiki', :page => nil
18 map.connect 'wiki/:id/:page/:action', :controller => 'wiki', :page => nil
17 map.connect 'roles/workflow/:id/:role_id/:tracker_id', :controller => 'roles', :action => 'workflow'
19 map.connect 'roles/workflow/:id/:role_id/:tracker_id', :controller => 'roles', :action => 'workflow'
18 map.connect 'help/:ctrl/:page', :controller => 'help'
20 map.connect 'help/:ctrl/:page', :controller => 'help'
19 #map.connect ':controller/:action/:id/:sort_key/:sort_order'
21 #map.connect ':controller/:action/:id/:sort_key/:sort_order'
20
22
21 map.connect 'issues/:issue_id/relations/:action/:id', :controller => 'issue_relations'
23 map.connect 'issues/:issue_id/relations/:action/:id', :controller => 'issue_relations'
22 map.connect 'projects/:project_id/issues/:action', :controller => 'issues'
24 map.connect 'projects/:project_id/issues/:action', :controller => 'issues'
23 map.connect 'projects/:project_id/news/:action', :controller => 'news'
25 map.connect 'projects/:project_id/news/:action', :controller => 'news'
24 map.connect 'projects/:project_id/documents/:action', :controller => 'documents'
26 map.connect 'projects/:project_id/documents/:action', :controller => 'documents'
25 map.connect 'projects/:project_id/boards/:action/:id', :controller => 'boards'
27 map.connect 'projects/:project_id/boards/:action/:id', :controller => 'boards'
26 map.connect 'projects/:project_id/timelog/:action/:id', :controller => 'timelog', :project_id => /.+/
28 map.connect 'projects/:project_id/timelog/:action/:id', :controller => 'timelog', :project_id => /.+/
27 map.connect 'boards/:board_id/topics/:action/:id', :controller => 'messages'
29 map.connect 'boards/:board_id/topics/:action/:id', :controller => 'messages'
28
30
29 map.with_options :controller => 'repositories' do |omap|
31 map.with_options :controller => 'repositories' do |omap|
30 omap.repositories_show 'repositories/browse/:id/*path', :action => 'browse'
32 omap.repositories_show 'repositories/browse/:id/*path', :action => 'browse'
31 omap.repositories_changes 'repositories/changes/:id/*path', :action => 'changes'
33 omap.repositories_changes 'repositories/changes/:id/*path', :action => 'changes'
32 omap.repositories_diff 'repositories/diff/:id/*path', :action => 'diff'
34 omap.repositories_diff 'repositories/diff/:id/*path', :action => 'diff'
33 omap.repositories_entry 'repositories/entry/:id/*path', :action => 'entry'
35 omap.repositories_entry 'repositories/entry/:id/*path', :action => 'entry'
34 omap.repositories_entry 'repositories/annotate/:id/*path', :action => 'annotate'
36 omap.repositories_entry 'repositories/annotate/:id/*path', :action => 'annotate'
35 omap.repositories_revision 'repositories/revision/:id/:rev', :action => 'revision'
37 omap.repositories_revision 'repositories/revision/:id/:rev', :action => 'revision'
36 end
38 end
37
39
38 map.connect 'attachments/:id', :controller => 'attachments', :action => 'show', :id => /\d+/
40 map.connect 'attachments/:id', :controller => 'attachments', :action => 'show', :id => /\d+/
39 map.connect 'attachments/:id/:filename', :controller => 'attachments', :action => 'show', :id => /\d+/, :filename => /.*/
41 map.connect 'attachments/:id/:filename', :controller => 'attachments', :action => 'show', :id => /\d+/, :filename => /.*/
40 map.connect 'attachments/download/:id/:filename', :controller => 'attachments', :action => 'download', :id => /\d+/, :filename => /.*/
42 map.connect 'attachments/download/:id/:filename', :controller => 'attachments', :action => 'download', :id => /\d+/, :filename => /.*/
41
43
42 # Allow downloading Web Service WSDL as a file with an extension
44 # Allow downloading Web Service WSDL as a file with an extension
43 # instead of a file named 'wsdl'
45 # instead of a file named 'wsdl'
44 map.connect ':controller/service.wsdl', :action => 'wsdl'
46 map.connect ':controller/service.wsdl', :action => 'wsdl'
45
47
46
48
47 # Install the default route as the lowest priority.
49 # Install the default route as the lowest priority.
48 map.connect ':controller/:action/:id'
50 map.connect ':controller/:action/:id'
49 end
51 end
General Comments 0
You need to be logged in to leave comments. Login now