@@ -109,18 +109,6 ActionController::Routing::Routes.draw do |map| | |||||
109 | map.connect 'my/order_blocks', :controller => 'my', :action => 'order_blocks', |
|
109 | map.connect 'my/order_blocks', :controller => 'my', :action => 'order_blocks', | |
110 | :conditions => {:method => :post} |
|
110 | :conditions => {:method => :post} | |
111 |
|
111 | |||
112 | map.resources :issues, |
|
|||
113 | :collection => {:bulk_edit => :get, :bulk_update => :post} do |issues| |
|
|||
114 | issues.resources :time_entries, :controller => 'timelog', |
|
|||
115 | :collection => {:report => :get} |
|
|||
116 | issues.resources :relations, :shallow => true, |
|
|||
117 | :controller => 'issue_relations', |
|
|||
118 | :only => [:index, :show, :create, :destroy] |
|
|||
119 | end |
|
|||
120 | # Bulk deletion |
|
|||
121 | map.connect '/issues', :controller => 'issues', :action => 'destroy', |
|
|||
122 | :conditions => {:method => :delete} |
|
|||
123 |
|
||||
124 | map.connect 'projects/:id/members/new', :controller => 'members', |
|
112 | map.connect 'projects/:id/members/new', :controller => 'members', | |
125 | :action => 'new', :conditions => { :method => :post } |
|
113 | :action => 'new', :conditions => { :method => :post } | |
126 | map.connect 'members/edit/:id', :controller => 'members', |
|
114 | map.connect 'members/edit/:id', :controller => 'members', | |
@@ -163,6 +151,14 ActionController::Routing::Routes.draw do |map| | |||||
163 | map.connect 'watchers/unwatch', :controller=> 'watchers', :action => 'unwatch', |
|
151 | map.connect 'watchers/unwatch', :controller=> 'watchers', :action => 'unwatch', | |
164 | :conditions => {:method => :post} |
|
152 | :conditions => {:method => :post} | |
165 |
|
153 | |||
|
154 | # TODO: port to be part of the resources route(s) | |||
|
155 | map.with_options :conditions => {:method => :get} do |project_views| | |||
|
156 | project_views.connect 'projects/:id/settings/:tab', | |||
|
157 | :controller => 'projects', :action => 'settings' | |||
|
158 | project_views.connect 'projects/:project_id/issues/:copy_from/copy', | |||
|
159 | :controller => 'issues', :action => 'new' | |||
|
160 | end | |||
|
161 | ||||
166 | map.resources :projects, :member => { |
|
162 | map.resources :projects, :member => { | |
167 | :copy => [:get, :post], |
|
163 | :copy => [:get, :post], | |
168 | :settings => :get, |
|
164 | :settings => :get, | |
@@ -208,13 +204,17 ActionController::Routing::Routes.draw do |map| | |||||
208 |
|
204 | |||
209 | end |
|
205 | end | |
210 |
|
206 | |||
211 | # TODO: port to be part of the resources route(s) |
|
207 | map.resources :issues, | |
212 | map.with_options :conditions => {:method => :get} do |project_views| |
|
208 | :collection => {:bulk_edit => :get, :bulk_update => :post} do |issues| | |
213 | project_views.connect 'projects/:id/settings/:tab', |
|
209 | issues.resources :time_entries, :controller => 'timelog', | |
214 | :controller => 'projects', :action => 'settings' |
|
210 | :collection => {:report => :get} | |
215 | project_views.connect 'projects/:project_id/issues/:copy_from/copy', |
|
211 | issues.resources :relations, :shallow => true, | |
216 |
|
|
212 | :controller => 'issue_relations', | |
|
213 | :only => [:index, :show, :create, :destroy] | |||
217 | end |
|
214 | end | |
|
215 | # Bulk deletion | |||
|
216 | map.connect '/issues', :controller => 'issues', :action => 'destroy', | |||
|
217 | :conditions => {:method => :delete} | |||
218 |
|
218 | |||
219 | map.with_options :controller => 'activities', :action => 'index', |
|
219 | map.with_options :controller => 'activities', :action => 'index', | |
220 | :conditions => {:method => :get} do |activity| |
|
220 | :conditions => {:method => :get} do |activity| |
General Comments 0
You need to be logged in to leave comments.
Login now