Mercurial > hg > soundsoftware-site
diff config/routes.rb @ 514:7eba09d624db live
Merge
author | Chris Cannam |
---|---|
date | Thu, 14 Jul 2011 10:50:53 +0100 |
parents | 7a2bb9c5fb34 |
children | 5e80956cc792 |
line wrap: on
line diff
--- a/config/routes.rb Thu Jul 14 10:46:20 2011 +0100 +++ b/config/routes.rb Thu Jul 14 10:50:53 2011 +0100 @@ -14,13 +14,21 @@ map.connect 'roles/workflow/:id/:role_id/:tracker_id', :controller => 'roles', :action => 'workflow' map.connect 'help/:ctrl/:page', :controller => 'help' - map.connect 'projects/:project_id/time_entries/report', :controller => 'time_entry_reports', :action => 'report' map.with_options :controller => 'time_entry_reports', :action => 'report',:conditions => {:method => :get} do |time_report| + time_report.connect 'projects/:project_id/issues/:issue_id/time_entries/report' + time_report.connect 'projects/:project_id/issues/:issue_id/time_entries/report.:format' + time_report.connect 'projects/:project_id/time_entries/report' + time_report.connect 'projects/:project_id/time_entries/report.:format' time_report.connect 'time_entries/report' time_report.connect 'time_entries/report.:format' - time_report.connect 'projects/:project_id/time_entries/report.:format' end + map.bulk_edit_time_entry 'time_entries/bulk_edit', + :controller => 'timelog', :action => 'bulk_edit', :conditions => { :method => :get } + map.bulk_update_time_entry 'time_entries/bulk_edit', + :controller => 'timelog', :action => 'bulk_update', :conditions => { :method => :post } + map.time_entries_context_menu '/time_entries/context_menu', + :controller => 'context_menus', :action => 'time_entries' # TODO: wasteful since this is also nested under issues, projects, and projects/issues map.resources :time_entries, :controller => 'timelog' @@ -80,10 +88,16 @@ map.quoted_issue '/issues/:id/quoted', :controller => 'journals', :action => 'new', :id => /\d+/, :conditions => { :method => :post } map.connect '/issues/:id/destroy', :controller => 'issues', :action => 'destroy', :conditions => { :method => :post } # legacy - map.resource :gantt, :path_prefix => '/issues', :controller => 'gantts', :only => [:show, :update] - map.resource :gantt, :path_prefix => '/projects/:project_id/issues', :controller => 'gantts', :only => [:show, :update] - map.resource :calendar, :path_prefix => '/issues', :controller => 'calendars', :only => [:show, :update] - map.resource :calendar, :path_prefix => '/projects/:project_id/issues', :controller => 'calendars', :only => [:show, :update] + map.with_options :controller => 'gantts', :action => 'show' do |gantts_routes| + gantts_routes.connect '/projects/:project_id/issues/gantt' + gantts_routes.connect '/projects/:project_id/issues/gantt.:format' + gantts_routes.connect '/issues/gantt.:format' + end + + map.with_options :controller => 'calendars', :action => 'show' do |calendars_routes| + calendars_routes.connect '/projects/:project_id/issues/calendar' + calendars_routes.connect '/issues/calendar' + end map.with_options :controller => 'reports', :conditions => {:method => :get} do |reports| reports.connect 'projects/:id/issues/report', :action => 'issue_report' @@ -122,8 +136,7 @@ map.resources :users, :member => { :edit_membership => :post, :destroy_membership => :post - }, - :except => [:destroy] + } # For nice "roadmap" in the url for the index action map.connect 'projects/:project_id/roadmap', :controller => 'versions', :action => 'index' @@ -217,7 +230,9 @@ map.resources :groups #left old routes at the bottom for backwards compat + map.connect 'projects/:project_id/queries/:action', :controller => 'queries' map.connect 'projects/:project_id/issues/:action', :controller => 'issues' + map.connect 'projects/:project_id/members/:action', :controller => 'members' map.connect 'projects/:project_id/documents/:action', :controller => 'documents' map.connect 'projects/:project_id/boards/:action/:id', :controller => 'boards' map.connect 'boards/:board_id/topics/:action/:id', :controller => 'messages'