Started to change the routes to match default Redmine behavior.

git-svn-id: https://dev.finn.de/svn/cockpit/trunk@314 7926756e-e54e-46e6-9721-ed318f58905e
pull/6827/head
hjust 15 years ago
parent ab260911ae
commit 1f6ac14296
  1. 19
      config/routes.rb

@ -1,5 +1,22 @@
ActionController::Routing::Routes.draw do |map|
map.connect 'projects/:project_id/costlog/:action/:id', :controller => 'costlog', :project_id => /.+/
map.connect 'cost_entries/:id/edit', :action => 'edit', :controller => 'costlog'
map.connect 'projects/:project_id/cost_entries/new', :action => 'edit', :controller => 'costlog'
map.connect 'projects/:project_id/issues/:issue_id/cost_entries/new', :action => 'edit', :controller => 'costlog'
map.with_options :controller => 'costlog' do |costlog|
costlog.connect 'projects/:project_id/cost_entries', :action => 'details'
costlog.with_options :action => 'details', :conditions => {:method => :get} do |cost_details|
cost_details.connect 'cost_entries'
cost_details.connect 'cost_entries.:format'
cost_details.connect 'issues/:issue_id/cost_entries'
cost_details.connect 'issues/:issue_id/cost_entries.:format'
cost_details.connect 'projects/:project_id/cost_entries.:format'
cost_details.connect 'projects/:project_id/issues/:issue_id/cost_entries'
cost_details.connect 'projects/:project_id/issues/:issue_id/cost_entries.:format'
end
end
map.connect 'projects/:project_id/cost_reports/:action/:id', :controller => 'cost_reports', :project_id => /.+/
map.connect 'projects/:project_id/cost_objects/:action/:id', :controller => 'cost_objects'
map.connect 'projects/:project_id/hourly_rates/:action/:id', :controller => 'hourly_rates', :project_id => /.+/

Loading…
Cancel
Save