@@ -1,260 +1,260 | |||||
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 | Rails.plugins.each do |plugin| |
|
10 | Rails.plugins.each do |plugin| | |
11 | map.from_plugin plugin.name.to_sym |
|
11 | map.from_plugin plugin.name.to_sym | |
12 | end |
|
12 | end | |
13 |
|
13 | |||
14 | map.home '', :controller => 'welcome' |
|
14 | map.home '', :controller => 'welcome' | |
15 |
|
15 | |||
16 | map.signin 'login', :controller => 'account', :action => 'login' |
|
16 | map.signin 'login', :controller => 'account', :action => 'login' | |
17 | map.signout 'logout', :controller => 'account', :action => 'logout' |
|
17 | map.signout 'logout', :controller => 'account', :action => 'logout' | |
18 |
|
18 | |||
19 | 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' | |
20 | map.connect 'help/:ctrl/:page', :controller => 'help' |
|
20 | map.connect 'help/:ctrl/:page', :controller => 'help' | |
21 |
|
21 | |||
22 | map.connect 'time_entries/:id/edit', :action => 'edit', :controller => 'timelog' |
|
22 | map.connect 'time_entries/:id/edit', :action => 'edit', :controller => 'timelog' | |
23 | map.connect 'projects/:project_id/time_entries/new', :action => 'edit', :controller => 'timelog' |
|
23 | map.connect 'projects/:project_id/time_entries/new', :action => 'edit', :controller => 'timelog' | |
24 | map.connect 'projects/:project_id/issues/:issue_id/time_entries/new', :action => 'edit', :controller => 'timelog' |
|
24 | map.connect 'projects/:project_id/issues/:issue_id/time_entries/new', :action => 'edit', :controller => 'timelog' | |
25 |
|
25 | |||
26 | map.with_options :controller => 'timelog' do |timelog| |
|
26 | map.with_options :controller => 'timelog' do |timelog| | |
27 | timelog.connect 'projects/:project_id/time_entries', :action => 'details' |
|
27 | timelog.connect 'projects/:project_id/time_entries', :action => 'details' | |
28 |
|
28 | |||
29 | timelog.with_options :action => 'details', :conditions => {:method => :get} do |time_details| |
|
29 | timelog.with_options :action => 'details', :conditions => {:method => :get} do |time_details| | |
30 | time_details.connect 'time_entries' |
|
30 | time_details.connect 'time_entries' | |
31 | time_details.connect 'time_entries.:format' |
|
31 | time_details.connect 'time_entries.:format' | |
32 | time_details.connect 'issues/:issue_id/time_entries' |
|
32 | time_details.connect 'issues/:issue_id/time_entries' | |
33 | time_details.connect 'issues/:issue_id/time_entries.:format' |
|
33 | time_details.connect 'issues/:issue_id/time_entries.:format' | |
34 | time_details.connect 'projects/:project_id/time_entries.:format' |
|
34 | time_details.connect 'projects/:project_id/time_entries.:format' | |
35 | time_details.connect 'projects/:project_id/issues/:issue_id/time_entries' |
|
35 | time_details.connect 'projects/:project_id/issues/:issue_id/time_entries' | |
36 | time_details.connect 'projects/:project_id/issues/:issue_id/time_entries.:format' |
|
36 | time_details.connect 'projects/:project_id/issues/:issue_id/time_entries.:format' | |
37 | end |
|
37 | end | |
38 | timelog.connect 'projects/:project_id/time_entries/report', :action => 'report' |
|
38 | timelog.connect 'projects/:project_id/time_entries/report', :action => 'report' | |
39 | timelog.with_options :action => 'report',:conditions => {:method => :get} do |time_report| |
|
39 | timelog.with_options :action => 'report',:conditions => {:method => :get} do |time_report| | |
40 | time_report.connect 'time_entries/report' |
|
40 | time_report.connect 'time_entries/report' | |
41 | time_report.connect 'time_entries/report.:format' |
|
41 | time_report.connect 'time_entries/report.:format' | |
42 | time_report.connect 'projects/:project_id/time_entries/report.:format' |
|
42 | time_report.connect 'projects/:project_id/time_entries/report.:format' | |
43 | end |
|
43 | end | |
44 |
|
44 | |||
45 | timelog.with_options :action => 'edit', :conditions => {:method => :get} do |time_edit| |
|
45 | timelog.with_options :action => 'edit', :conditions => {:method => :get} do |time_edit| | |
46 | time_edit.connect 'issues/:issue_id/time_entries/new' |
|
46 | time_edit.connect 'issues/:issue_id/time_entries/new' | |
47 | end |
|
47 | end | |
48 |
|
48 | |||
49 | timelog.connect 'time_entries/:id/destroy', :action => 'destroy', :conditions => {:method => :post} |
|
49 | timelog.connect 'time_entries/:id/destroy', :action => 'destroy', :conditions => {:method => :post} | |
50 | end |
|
50 | end | |
51 |
|
51 | |||
52 | map.connect 'projects/:id/wiki', :controller => 'wikis', :action => 'edit', :conditions => {:method => :post} |
|
52 | map.connect 'projects/:id/wiki', :controller => 'wikis', :action => 'edit', :conditions => {:method => :post} | |
53 | map.connect 'projects/:id/wiki/destroy', :controller => 'wikis', :action => 'destroy', :conditions => {:method => :get} |
|
53 | map.connect 'projects/:id/wiki/destroy', :controller => 'wikis', :action => 'destroy', :conditions => {:method => :get} | |
54 | map.connect 'projects/:id/wiki/destroy', :controller => 'wikis', :action => 'destroy', :conditions => {:method => :post} |
|
54 | map.connect 'projects/:id/wiki/destroy', :controller => 'wikis', :action => 'destroy', :conditions => {:method => :post} | |
55 | map.with_options :controller => 'wiki' do |wiki_routes| |
|
55 | map.with_options :controller => 'wiki' do |wiki_routes| | |
56 | wiki_routes.with_options :conditions => {:method => :get} do |wiki_views| |
|
56 | wiki_routes.with_options :conditions => {:method => :get} do |wiki_views| | |
57 | wiki_views.connect 'projects/:id/wiki/:page', :action => 'special', :page => /page_index|date_index|export/i |
|
57 | wiki_views.connect 'projects/:id/wiki/:page', :action => 'special', :page => /page_index|date_index|export/i | |
58 | wiki_views.connect 'projects/:id/wiki/:page', :action => 'index', :page => nil |
|
58 | wiki_views.connect 'projects/:id/wiki/:page', :action => 'index', :page => nil | |
59 | wiki_views.connect 'projects/:id/wiki/:page/edit', :action => 'edit' |
|
59 | wiki_views.connect 'projects/:id/wiki/:page/edit', :action => 'edit' | |
60 | wiki_views.connect 'projects/:id/wiki/:page/rename', :action => 'rename' |
|
60 | wiki_views.connect 'projects/:id/wiki/:page/rename', :action => 'rename' | |
61 | wiki_views.connect 'projects/:id/wiki/:page/history', :action => 'history' |
|
61 | wiki_views.connect 'projects/:id/wiki/:page/history', :action => 'history' | |
62 | wiki_views.connect 'projects/:id/wiki/:page/diff/:version/vs/:version_from', :action => 'diff' |
|
62 | wiki_views.connect 'projects/:id/wiki/:page/diff/:version/vs/:version_from', :action => 'diff' | |
63 | wiki_views.connect 'projects/:id/wiki/:page/annotate/:version', :action => 'annotate' |
|
63 | wiki_views.connect 'projects/:id/wiki/:page/annotate/:version', :action => 'annotate' | |
64 | end |
|
64 | end | |
65 |
|
65 | |||
66 | wiki_routes.connect 'projects/:id/wiki/:page/:action', |
|
66 | wiki_routes.connect 'projects/:id/wiki/:page/:action', | |
67 | :action => /edit|rename|destroy|preview|protect/, |
|
67 | :action => /edit|rename|destroy|preview|protect/, | |
68 | :conditions => {:method => :post} |
|
68 | :conditions => {:method => :post} | |
69 | end |
|
69 | end | |
70 |
|
70 | |||
71 | map.with_options :controller => 'messages' do |messages_routes| |
|
71 | map.with_options :controller => 'messages' do |messages_routes| | |
72 | messages_routes.with_options :conditions => {:method => :get} do |messages_views| |
|
72 | messages_routes.with_options :conditions => {:method => :get} do |messages_views| | |
73 | messages_views.connect 'boards/:board_id/topics/new', :action => 'new' |
|
73 | messages_views.connect 'boards/:board_id/topics/new', :action => 'new' | |
74 | messages_views.connect 'boards/:board_id/topics/:id', :action => 'show' |
|
74 | messages_views.connect 'boards/:board_id/topics/:id', :action => 'show' | |
75 | messages_views.connect 'boards/:board_id/topics/:id/edit', :action => 'edit' |
|
75 | messages_views.connect 'boards/:board_id/topics/:id/edit', :action => 'edit' | |
76 | end |
|
76 | end | |
77 | messages_routes.with_options :conditions => {:method => :post} do |messages_actions| |
|
77 | messages_routes.with_options :conditions => {:method => :post} do |messages_actions| | |
78 | messages_actions.connect 'boards/:board_id/topics/new', :action => 'new' |
|
78 | messages_actions.connect 'boards/:board_id/topics/new', :action => 'new' | |
79 | messages_actions.connect 'boards/:board_id/topics/:id/replies', :action => 'reply' |
|
79 | messages_actions.connect 'boards/:board_id/topics/:id/replies', :action => 'reply' | |
80 | messages_actions.connect 'boards/:board_id/topics/:id/:action', :action => /edit|destroy/ |
|
80 | messages_actions.connect 'boards/:board_id/topics/:id/:action', :action => /edit|destroy/ | |
81 | end |
|
81 | end | |
82 | end |
|
82 | end | |
83 |
|
83 | |||
84 | map.with_options :controller => 'boards' do |board_routes| |
|
84 | map.with_options :controller => 'boards' do |board_routes| | |
85 | board_routes.with_options :conditions => {:method => :get} do |board_views| |
|
85 | board_routes.with_options :conditions => {:method => :get} do |board_views| | |
86 | board_views.connect 'projects/:project_id/boards', :action => 'index' |
|
86 | board_views.connect 'projects/:project_id/boards', :action => 'index' | |
87 | board_views.connect 'projects/:project_id/boards/new', :action => 'new' |
|
87 | board_views.connect 'projects/:project_id/boards/new', :action => 'new' | |
88 | board_views.connect 'projects/:project_id/boards/:id', :action => 'show' |
|
88 | board_views.connect 'projects/:project_id/boards/:id', :action => 'show' | |
89 | board_views.connect 'projects/:project_id/boards/:id/edit', :action => 'edit' |
|
89 | board_views.connect 'projects/:project_id/boards/:id/edit', :action => 'edit' | |
90 | end |
|
90 | end | |
91 | board_routes.with_options :conditions => {:method => :post} do |board_actions| |
|
91 | board_routes.with_options :conditions => {:method => :post} do |board_actions| | |
92 | board_actions.connect 'projects/:project_id/boards', :action => 'new' |
|
92 | board_actions.connect 'projects/:project_id/boards', :action => 'new' | |
93 | board_actions.connect 'projects/:project_id/boards/:id/:action', :action => /edit|destroy/ |
|
93 | board_actions.connect 'projects/:project_id/boards/:id/:action', :action => /edit|destroy/ | |
94 | end |
|
94 | end | |
95 | end |
|
95 | end | |
96 |
|
96 | |||
97 | map.with_options :controller => 'documents' do |document_routes| |
|
97 | map.with_options :controller => 'documents' do |document_routes| | |
98 | document_routes.with_options :conditions => {:method => :get} do |document_views| |
|
98 | document_routes.with_options :conditions => {:method => :get} do |document_views| | |
99 | document_views.connect 'projects/:project_id/documents', :action => 'index' |
|
99 | document_views.connect 'projects/:project_id/documents', :action => 'index' | |
100 | document_views.connect 'projects/:project_id/documents/new', :action => 'new' |
|
100 | document_views.connect 'projects/:project_id/documents/new', :action => 'new' | |
101 | document_views.connect 'documents/:id', :action => 'show' |
|
101 | document_views.connect 'documents/:id', :action => 'show' | |
102 | document_views.connect 'documents/:id/edit', :action => 'edit' |
|
102 | document_views.connect 'documents/:id/edit', :action => 'edit' | |
103 | end |
|
103 | end | |
104 | document_routes.with_options :conditions => {:method => :post} do |document_actions| |
|
104 | document_routes.with_options :conditions => {:method => :post} do |document_actions| | |
105 | document_actions.connect 'projects/:project_id/documents', :action => 'new' |
|
105 | document_actions.connect 'projects/:project_id/documents', :action => 'new' | |
106 | document_actions.connect 'documents/:id/:action', :action => /destroy|edit/ |
|
106 | document_actions.connect 'documents/:id/:action', :action => /destroy|edit/ | |
107 | end |
|
107 | end | |
108 | end |
|
108 | end | |
109 |
|
109 | |||
110 | map.with_options :controller => 'issues' do |issues_routes| |
|
110 | map.with_options :controller => 'issues' do |issues_routes| | |
111 | issues_routes.with_options :conditions => {:method => :get} do |issues_views| |
|
111 | issues_routes.with_options :conditions => {:method => :get} do |issues_views| | |
112 | issues_views.connect 'issues', :action => 'index' |
|
112 | issues_views.connect 'issues', :action => 'index' | |
113 | issues_views.connect 'issues.:format', :action => 'index' |
|
113 | issues_views.connect 'issues.:format', :action => 'index' | |
114 | issues_views.connect 'projects/:project_id/issues', :action => 'index' |
|
114 | issues_views.connect 'projects/:project_id/issues', :action => 'index' | |
115 | issues_views.connect 'projects/:project_id/issues.:format', :action => 'index' |
|
115 | issues_views.connect 'projects/:project_id/issues.:format', :action => 'index' | |
116 | issues_views.connect 'projects/:project_id/issues/new', :action => 'new' |
|
116 | issues_views.connect 'projects/:project_id/issues/new', :action => 'new' | |
117 | issues_views.connect 'projects/:project_id/issues/gantt', :action => 'gantt' |
|
117 | issues_views.connect 'projects/:project_id/issues/gantt', :action => 'gantt' | |
118 | issues_views.connect 'projects/:project_id/issues/calendar', :action => 'calendar' |
|
118 | issues_views.connect 'projects/:project_id/issues/calendar', :action => 'calendar' | |
119 | issues_views.connect 'projects/:project_id/issues/:copy_from/copy', :action => 'new' |
|
119 | issues_views.connect 'projects/:project_id/issues/:copy_from/copy', :action => 'new' | |
120 | issues_views.connect 'issues/:id', :action => 'show', :id => /\d+/ |
|
120 | issues_views.connect 'issues/:id', :action => 'show', :id => /\d+/ | |
121 | issues_views.connect 'issues/:id.:format', :action => 'show', :id => /\d+/ |
|
121 | issues_views.connect 'issues/:id.:format', :action => 'show', :id => /\d+/ | |
122 | issues_views.connect 'issues/:id/edit', :action => 'edit', :id => /\d+/ |
|
122 | issues_views.connect 'issues/:id/edit', :action => 'edit', :id => /\d+/ | |
123 | issues_views.connect 'issues/:id/move', :action => 'move', :id => /\d+/ |
|
123 | issues_views.connect 'issues/:id/move', :action => 'move', :id => /\d+/ | |
124 | end |
|
124 | end | |
125 | issues_routes.with_options :conditions => {:method => :post} do |issues_actions| |
|
125 | issues_routes.with_options :conditions => {:method => :post} do |issues_actions| | |
126 | issues_actions.connect 'projects/:project_id/issues', :action => 'new' |
|
126 | issues_actions.connect 'projects/:project_id/issues', :action => 'new' | |
127 | issues_actions.connect 'issues/:id/quoted', :action => 'reply', :id => /\d+/ |
|
127 | issues_actions.connect 'issues/:id/quoted', :action => 'reply', :id => /\d+/ | |
128 | issues_actions.connect 'issues/:id/:action', :action => /edit|move|destroy/, :id => /\d+/ |
|
128 | issues_actions.connect 'issues/:id/:action', :action => /edit|move|destroy/, :id => /\d+/ | |
129 | end |
|
129 | end | |
130 | issues_routes.connect 'issues/:action' |
|
130 | issues_routes.connect 'issues/:action' | |
131 | end |
|
131 | end | |
132 |
|
132 | |||
133 | map.with_options :controller => 'issue_relations', :conditions => {:method => :post} do |relations| |
|
133 | map.with_options :controller => 'issue_relations', :conditions => {:method => :post} do |relations| | |
134 | relations.connect 'issues/:issue_id/relations/:id', :action => 'new' |
|
134 | relations.connect 'issues/:issue_id/relations/:id', :action => 'new' | |
135 | relations.connect 'issues/:issue_id/relations/:id/destroy', :action => 'destroy' |
|
135 | relations.connect 'issues/:issue_id/relations/:id/destroy', :action => 'destroy' | |
136 | end |
|
136 | end | |
137 |
|
137 | |||
138 | map.with_options :controller => 'reports', :action => 'issue_report', :conditions => {:method => :get} do |reports| |
|
138 | map.with_options :controller => 'reports', :action => 'issue_report', :conditions => {:method => :get} do |reports| | |
139 | reports.connect 'projects/:id/issues/report' |
|
139 | reports.connect 'projects/:id/issues/report' | |
140 | reports.connect 'projects/:id/issues/report/:detail' |
|
140 | reports.connect 'projects/:id/issues/report/:detail' | |
141 | end |
|
141 | end | |
142 |
|
142 | |||
143 | map.with_options :controller => 'news' do |news_routes| |
|
143 | map.with_options :controller => 'news' do |news_routes| | |
144 | news_routes.with_options :conditions => {:method => :get} do |news_views| |
|
144 | news_routes.with_options :conditions => {:method => :get} do |news_views| | |
145 | news_views.connect 'news', :action => 'index' |
|
145 | news_views.connect 'news', :action => 'index' | |
146 | news_views.connect 'projects/:project_id/news', :action => 'index' |
|
146 | news_views.connect 'projects/:project_id/news', :action => 'index' | |
147 | news_views.connect 'projects/:project_id/news.:format', :action => 'index' |
|
147 | news_views.connect 'projects/:project_id/news.:format', :action => 'index' | |
148 | news_views.connect 'news.:format', :action => 'index' |
|
148 | news_views.connect 'news.:format', :action => 'index' | |
149 | news_views.connect 'projects/:project_id/news/new', :action => 'new' |
|
149 | news_views.connect 'projects/:project_id/news/new', :action => 'new' | |
150 | news_views.connect 'news/:id', :action => 'show' |
|
150 | news_views.connect 'news/:id', :action => 'show' | |
151 | news_views.connect 'news/:id/edit', :action => 'edit' |
|
151 | news_views.connect 'news/:id/edit', :action => 'edit' | |
152 | end |
|
152 | end | |
153 | news_routes.with_options do |news_actions| |
|
153 | news_routes.with_options do |news_actions| | |
154 | news_actions.connect 'projects/:project_id/news', :action => 'new' |
|
154 | news_actions.connect 'projects/:project_id/news', :action => 'new' | |
155 | news_actions.connect 'news/:id/edit', :action => 'edit' |
|
155 | news_actions.connect 'news/:id/edit', :action => 'edit' | |
156 | news_actions.connect 'news/:id/destroy', :action => 'destroy' |
|
156 | news_actions.connect 'news/:id/destroy', :action => 'destroy' | |
157 | end |
|
157 | end | |
158 | end |
|
158 | end | |
159 |
|
159 | |||
160 | map.connect 'projects/:id/members/new', :controller => 'members', :action => 'new' |
|
160 | map.connect 'projects/:id/members/new', :controller => 'members', :action => 'new' | |
161 |
|
161 | |||
162 | map.with_options :controller => 'users' do |users| |
|
162 | map.with_options :controller => 'users' do |users| | |
163 | users.with_options :conditions => {:method => :get} do |user_views| |
|
163 | users.with_options :conditions => {:method => :get} do |user_views| | |
164 | user_views.connect 'users', :action => 'list' |
|
164 | user_views.connect 'users', :action => 'list' | |
165 | user_views.connect 'users', :action => 'index' |
|
165 | user_views.connect 'users', :action => 'index' | |
166 | user_views.connect 'users/new', :action => 'add' |
|
166 | user_views.connect 'users/new', :action => 'add' | |
167 | user_views.connect 'users/:id/edit/:tab', :action => 'edit', :tab => nil |
|
167 | user_views.connect 'users/:id/edit/:tab', :action => 'edit', :tab => nil | |
168 | end |
|
168 | end | |
169 | users.with_options :conditions => {:method => :post} do |user_actions| |
|
169 | users.with_options :conditions => {:method => :post} do |user_actions| | |
170 | user_actions.connect 'users', :action => 'add' |
|
170 | user_actions.connect 'users', :action => 'add' | |
171 | user_actions.connect 'users/new', :action => 'add' |
|
171 | user_actions.connect 'users/new', :action => 'add' | |
172 | user_actions.connect 'users/:id/edit', :action => 'edit' |
|
172 | user_actions.connect 'users/:id/edit', :action => 'edit' | |
173 | user_actions.connect 'users/:id/memberships', :action => 'edit_membership' |
|
173 | user_actions.connect 'users/:id/memberships', :action => 'edit_membership' | |
174 | user_actions.connect 'users/:id/memberships/:membership_id', :action => 'edit_membership' |
|
174 | user_actions.connect 'users/:id/memberships/:membership_id', :action => 'edit_membership' | |
175 | user_actions.connect 'users/:id/memberships/:membership_id/destroy', :action => 'destroy_membership' |
|
175 | user_actions.connect 'users/:id/memberships/:membership_id/destroy', :action => 'destroy_membership' | |
176 | end |
|
176 | end | |
177 | end |
|
177 | end | |
178 |
|
178 | |||
179 | map.with_options :controller => 'projects' do |projects| |
|
179 | map.with_options :controller => 'projects' do |projects| | |
180 | projects.with_options :conditions => {:method => :get} do |project_views| |
|
180 | projects.with_options :conditions => {:method => :get} do |project_views| | |
181 | project_views.connect 'projects', :action => 'index' |
|
181 | project_views.connect 'projects', :action => 'index' | |
182 | project_views.connect 'projects.:format', :action => 'index' |
|
182 | project_views.connect 'projects.:format', :action => 'index' | |
183 | project_views.connect 'projects/new', :action => 'add' |
|
183 | project_views.connect 'projects/new', :action => 'add' | |
184 | project_views.connect 'projects/:id', :action => 'show' |
|
184 | project_views.connect 'projects/:id', :action => 'show' | |
185 | project_views.connect 'projects/:id/:action', :action => /roadmap|changelog|destroy|settings/ |
|
185 | project_views.connect 'projects/:id/:action', :action => /roadmap|changelog|destroy|settings/ | |
186 | project_views.connect 'projects/:id/files', :action => 'list_files' |
|
186 | project_views.connect 'projects/:id/files', :action => 'list_files' | |
187 | project_views.connect 'projects/:id/files/new', :action => 'add_file' |
|
187 | project_views.connect 'projects/:id/files/new', :action => 'add_file' | |
188 | project_views.connect 'projects/:id/versions/new', :action => 'add_version' |
|
188 | project_views.connect 'projects/:id/versions/new', :action => 'add_version' | |
189 | project_views.connect 'projects/:id/categories/new', :action => 'add_issue_category' |
|
189 | project_views.connect 'projects/:id/categories/new', :action => 'add_issue_category' | |
190 | project_views.connect 'projects/:id/settings/:tab', :action => 'settings' |
|
190 | project_views.connect 'projects/:id/settings/:tab', :action => 'settings' | |
191 | end |
|
191 | end | |
192 |
|
192 | |||
193 | projects.with_options :action => 'activity', :conditions => {:method => :get} do |activity| |
|
193 | projects.with_options :action => 'activity', :conditions => {:method => :get} do |activity| | |
194 | activity.connect 'projects/:id/activity' |
|
194 | activity.connect 'projects/:id/activity' | |
195 | activity.connect 'projects/:id/activity.:format' |
|
195 | activity.connect 'projects/:id/activity.:format' | |
196 | activity.connect 'activity', :id => nil |
|
196 | activity.connect 'activity', :id => nil | |
197 | activity.connect 'activity.:format', :id => nil |
|
197 | activity.connect 'activity.:format', :id => nil | |
198 | end |
|
198 | end | |
199 |
|
199 | |||
200 | projects.with_options :conditions => {:method => :post} do |project_actions| |
|
200 | projects.with_options :conditions => {:method => :post} do |project_actions| | |
201 | project_actions.connect 'projects/new', :action => 'add' |
|
201 | project_actions.connect 'projects/new', :action => 'add' | |
202 | project_actions.connect 'projects', :action => 'add' |
|
202 | project_actions.connect 'projects', :action => 'add' | |
203 | project_actions.connect 'projects/:id/:action', :action => /destroy|archive|unarchive/ |
|
203 | project_actions.connect 'projects/:id/:action', :action => /destroy|archive|unarchive/ | |
204 | project_actions.connect 'projects/:id/files/new', :action => 'add_file' |
|
204 | project_actions.connect 'projects/:id/files/new', :action => 'add_file' | |
205 | project_actions.connect 'projects/:id/versions/new', :action => 'add_version' |
|
205 | project_actions.connect 'projects/:id/versions/new', :action => 'add_version' | |
206 | project_actions.connect 'projects/:id/categories/new', :action => 'add_issue_category' |
|
206 | project_actions.connect 'projects/:id/categories/new', :action => 'add_issue_category' | |
207 | end |
|
207 | end | |
208 | end |
|
208 | end | |
209 |
|
209 | |||
210 | map.with_options :controller => 'repositories' do |repositories| |
|
210 | map.with_options :controller => 'repositories' do |repositories| | |
211 | repositories.with_options :conditions => {:method => :get} do |repository_views| |
|
211 | repositories.with_options :conditions => {:method => :get} do |repository_views| | |
212 | repository_views.connect 'projects/:id/repository', :action => 'show' |
|
212 | repository_views.connect 'projects/:id/repository', :action => 'show' | |
213 | repository_views.connect 'projects/:id/repository/edit', :action => 'edit' |
|
213 | repository_views.connect 'projects/:id/repository/edit', :action => 'edit' | |
214 | repository_views.connect 'projects/:id/repository/statistics', :action => 'stats' |
|
214 | repository_views.connect 'projects/:id/repository/statistics', :action => 'stats' | |
215 | repository_views.connect 'projects/:id/repository/revisions', :action => 'revisions' |
|
215 | repository_views.connect 'projects/:id/repository/revisions', :action => 'revisions' | |
216 | repository_views.connect 'projects/:id/repository/revisions.:format', :action => 'revisions' |
|
216 | repository_views.connect 'projects/:id/repository/revisions.:format', :action => 'revisions' | |
217 | repository_views.connect 'projects/:id/repository/revisions/:rev', :action => 'revision' |
|
217 | repository_views.connect 'projects/:id/repository/revisions/:rev', :action => 'revision' | |
218 | repository_views.connect 'projects/:id/repository/revisions/:rev/diff', :action => 'diff' |
|
218 | repository_views.connect 'projects/:id/repository/revisions/:rev/diff', :action => 'diff' | |
219 | repository_views.connect 'projects/:id/repository/revisions/:rev/diff.:format', :action => 'diff' |
|
219 | repository_views.connect 'projects/:id/repository/revisions/:rev/diff.:format', :action => 'diff' | |
220 | repository_views.connect 'projects/:id/repository/revisions/:rev/:action/*path' |
|
220 | repository_views.connect 'projects/:id/repository/revisions/:rev/:action/*path' | |
221 | repository_views.connect 'projects/:id/repository/:action/*path' |
|
221 | repository_views.connect 'projects/:id/repository/:action/*path' | |
222 | end |
|
222 | end | |
223 |
|
223 | |||
224 |
repositories.connect 'projects/:id/repository/ |
|
224 | repositories.connect 'projects/:id/repository/:action', :conditions => {:method => :post} | |
225 | end |
|
225 | end | |
226 |
|
226 | |||
227 | map.connect 'attachments/:id', :controller => 'attachments', :action => 'show', :id => /\d+/ |
|
227 | map.connect 'attachments/:id', :controller => 'attachments', :action => 'show', :id => /\d+/ | |
228 | map.connect 'attachments/:id/:filename', :controller => 'attachments', :action => 'show', :id => /\d+/, :filename => /.*/ |
|
228 | map.connect 'attachments/:id/:filename', :controller => 'attachments', :action => 'show', :id => /\d+/, :filename => /.*/ | |
229 | map.connect 'attachments/download/:id/:filename', :controller => 'attachments', :action => 'download', :id => /\d+/, :filename => /.*/ |
|
229 | map.connect 'attachments/download/:id/:filename', :controller => 'attachments', :action => 'download', :id => /\d+/, :filename => /.*/ | |
230 |
|
230 | |||
231 |
|
231 | |||
232 | #left old routes at the bottom for backwards compat |
|
232 | #left old routes at the bottom for backwards compat | |
233 | map.connect 'projects/:project_id/issues/:action', :controller => 'issues' |
|
233 | map.connect 'projects/:project_id/issues/:action', :controller => 'issues' | |
234 | map.connect 'projects/:project_id/documents/:action', :controller => 'documents' |
|
234 | map.connect 'projects/:project_id/documents/:action', :controller => 'documents' | |
235 | map.connect 'projects/:project_id/boards/:action/:id', :controller => 'boards' |
|
235 | map.connect 'projects/:project_id/boards/:action/:id', :controller => 'boards' | |
236 | map.connect 'boards/:board_id/topics/:action/:id', :controller => 'messages' |
|
236 | map.connect 'boards/:board_id/topics/:action/:id', :controller => 'messages' | |
237 | map.connect 'wiki/:id/:page/:action', :page => nil, :controller => 'wiki' |
|
237 | map.connect 'wiki/:id/:page/:action', :page => nil, :controller => 'wiki' | |
238 | map.connect 'issues/:issue_id/relations/:action/:id', :controller => 'issue_relations' |
|
238 | map.connect 'issues/:issue_id/relations/:action/:id', :controller => 'issue_relations' | |
239 | map.connect 'projects/:project_id/news/:action', :controller => 'news' |
|
239 | map.connect 'projects/:project_id/news/:action', :controller => 'news' | |
240 | map.connect 'projects/:project_id/timelog/:action/:id', :controller => 'timelog', :project_id => /.+/ |
|
240 | map.connect 'projects/:project_id/timelog/:action/:id', :controller => 'timelog', :project_id => /.+/ | |
241 | map.with_options :controller => 'repositories' do |omap| |
|
241 | map.with_options :controller => 'repositories' do |omap| | |
242 | omap.repositories_show 'repositories/browse/:id/*path', :action => 'browse' |
|
242 | omap.repositories_show 'repositories/browse/:id/*path', :action => 'browse' | |
243 | omap.repositories_changes 'repositories/changes/:id/*path', :action => 'changes' |
|
243 | omap.repositories_changes 'repositories/changes/:id/*path', :action => 'changes' | |
244 | omap.repositories_diff 'repositories/diff/:id/*path', :action => 'diff' |
|
244 | omap.repositories_diff 'repositories/diff/:id/*path', :action => 'diff' | |
245 | omap.repositories_entry 'repositories/entry/:id/*path', :action => 'entry' |
|
245 | omap.repositories_entry 'repositories/entry/:id/*path', :action => 'entry' | |
246 | omap.repositories_entry 'repositories/annotate/:id/*path', :action => 'annotate' |
|
246 | omap.repositories_entry 'repositories/annotate/:id/*path', :action => 'annotate' | |
247 | omap.connect 'repositories/revision/:id/:rev', :action => 'revision' |
|
247 | omap.connect 'repositories/revision/:id/:rev', :action => 'revision' | |
248 | end |
|
248 | end | |
249 |
|
249 | |||
250 | map.with_options :controller => 'sys' do |sys| |
|
250 | map.with_options :controller => 'sys' do |sys| | |
251 | sys.connect 'sys/projects.:format', :action => 'projects', :conditions => {:method => :get} |
|
251 | sys.connect 'sys/projects.:format', :action => 'projects', :conditions => {:method => :get} | |
252 | sys.connect 'sys/projects/:id/repository.:format', :action => 'create_project_repository', :conditions => {:method => :post} |
|
252 | sys.connect 'sys/projects/:id/repository.:format', :action => 'create_project_repository', :conditions => {:method => :post} | |
253 | end |
|
253 | end | |
254 |
|
254 | |||
255 | # Install the default route as the lowest priority. |
|
255 | # Install the default route as the lowest priority. | |
256 | map.connect ':controller/:action/:id' |
|
256 | map.connect ':controller/:action/:id' | |
257 | map.connect 'robots.txt', :controller => 'welcome', :action => 'robots' |
|
257 | map.connect 'robots.txt', :controller => 'welcome', :action => 'robots' | |
258 | # Used for OpenID |
|
258 | # Used for OpenID | |
259 | map.root :controller => 'account', :action => 'login' |
|
259 | map.root :controller => 'account', :action => 'login' | |
260 | end |
|
260 | end |
General Comments 0
You need to be logged in to leave comments.
Login now