##// 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 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 # 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 14 map.home '', :controller => 'welcome'
13 15 map.signin 'login', :controller => 'account', :action => 'login'
14 16 map.signout 'logout', :controller => 'account', :action => 'logout'
15 17
16 18 map.connect 'wiki/:id/:page/:action', :controller => 'wiki', :page => nil
17 19 map.connect 'roles/workflow/:id/:role_id/:tracker_id', :controller => 'roles', :action => 'workflow'
18 20 map.connect 'help/:ctrl/:page', :controller => 'help'
19 21 #map.connect ':controller/:action/:id/:sort_key/:sort_order'
20 22
21 23 map.connect 'issues/:issue_id/relations/:action/:id', :controller => 'issue_relations'
22 24 map.connect 'projects/:project_id/issues/:action', :controller => 'issues'
23 25 map.connect 'projects/:project_id/news/:action', :controller => 'news'
24 26 map.connect 'projects/:project_id/documents/:action', :controller => 'documents'
25 27 map.connect 'projects/:project_id/boards/:action/:id', :controller => 'boards'
26 28 map.connect 'projects/:project_id/timelog/:action/:id', :controller => 'timelog', :project_id => /.+/
27 29 map.connect 'boards/:board_id/topics/:action/:id', :controller => 'messages'
28 30
29 31 map.with_options :controller => 'repositories' do |omap|
30 32 omap.repositories_show 'repositories/browse/:id/*path', :action => 'browse'
31 33 omap.repositories_changes 'repositories/changes/:id/*path', :action => 'changes'
32 34 omap.repositories_diff 'repositories/diff/:id/*path', :action => 'diff'
33 35 omap.repositories_entry 'repositories/entry/:id/*path', :action => 'entry'
34 36 omap.repositories_entry 'repositories/annotate/:id/*path', :action => 'annotate'
35 37 omap.repositories_revision 'repositories/revision/:id/:rev', :action => 'revision'
36 38 end
37 39
38 40 map.connect 'attachments/:id', :controller => 'attachments', :action => 'show', :id => /\d+/
39 41 map.connect 'attachments/:id/:filename', :controller => 'attachments', :action => 'show', :id => /\d+/, :filename => /.*/
40 42 map.connect 'attachments/download/:id/:filename', :controller => 'attachments', :action => 'download', :id => /\d+/, :filename => /.*/
41 43
42 44 # Allow downloading Web Service WSDL as a file with an extension
43 45 # instead of a file named 'wsdl'
44 46 map.connect ':controller/service.wsdl', :action => 'wsdl'
45 47
46 48
47 49 # Install the default route as the lowest priority.
48 50 map.connect ':controller/:action/:id'
49 51 end
General Comments 0
You need to be logged in to leave comments. Login now