diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2012-01-15 18:19:19 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2012-01-15 18:19:19 +0000 |
commit | 1bd5e58c847816ae5751ee0026e55597d1541dd4 (patch) | |
tree | b5c1be1f966f8b08986978713882856d014e363d /config/routes.rb | |
parent | d996cc0584901e7f44171093b170f882978124f7 (diff) | |
download | redmine-1bd5e58c847816ae5751ee0026e55597d1541dd4.tar.gz redmine-1bd5e58c847816ae5751ee0026e55597d1541dd4.zip |
Adds support for multiple repositories per project (#779).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@8650 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'config/routes.rb')
-rw-r--r-- | config/routes.rb | 48 |
1 files changed, 30 insertions, 18 deletions
diff --git a/config/routes.rb b/config/routes.rb index 64ba34d2f..1a02d02c3 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -235,7 +235,8 @@ ActionController::Routing::Routes.draw do |map| :action => 'show' repository_views.connect 'projects/:id/repository/statistics', :action => 'stats' - + repository_views.connect 'projects/:id/repository/graph', + :action => 'graph' repository_views.connect 'projects/:id/repository/revisions', :action => 'revisions' repository_views.connect 'projects/:id/repository/revisions.:format', @@ -247,28 +248,39 @@ ActionController::Routing::Routes.draw do |map| repository_views.connect 'projects/:id/repository/revisions/:rev/diff.:format', :action => 'diff' repository_views.connect 'projects/:id/repository/revisions/:rev/raw/*path', - :action => 'entry', - :format => 'raw', - :requirements => { :rev => /[a-z0-9\.\-_]+/ } + :action => 'entry', :format => 'raw' repository_views.connect 'projects/:id/repository/revisions/:rev/:action/*path', - :requirements => { :rev => /[a-z0-9\.\-_]+/ } - + :requirements => { :action => /(browse|show|entry|changes|annotate|diff)/ } repository_views.connect 'projects/:id/repository/raw/*path', :action => 'entry', :format => 'raw' - repository_views.connect 'projects/:id/repository/browse/*path', - :action => 'browse' - repository_views.connect 'projects/:id/repository/entry/*path', - :action => 'entry' - repository_views.connect 'projects/:id/repository/changes/*path', - :action => 'changes' - repository_views.connect 'projects/:id/repository/annotate/*path', - :action => 'annotate' - repository_views.connect 'projects/:id/repository/diff/*path', + repository_views.connect 'projects/:id/repository/:action/*path', + :requirements => { :action => /(browse|show|entry|changes|annotate|diff)/ } + + # Same routes with a repository_id + repository_views.connect 'projects/:id/repository/:repository_id/statistics', + :action => 'stats' + repository_views.connect 'projects/:id/repository/:repository_id/graph', + :action => 'graph' + repository_views.connect 'projects/:id/repository/:repository_id/revisions', + :action => 'revisions' + repository_views.connect 'projects/:id/repository/:repository_id/revisions.:format', + :action => 'revisions' + repository_views.connect 'projects/:id/repository/:repository_id/revisions/:rev', + :action => 'revision' + repository_views.connect 'projects/:id/repository/:repository_id/revisions/:rev/diff', + :action => 'diff' + repository_views.connect 'projects/:id/repository/:repository_id/revisions/:rev/diff.:format', :action => 'diff' - repository_views.connect 'projects/:id/repository/show/*path', + repository_views.connect 'projects/:id/repository/:repository_id/revisions/:rev/raw/*path', + :action => 'entry', :format => 'raw' + repository_views.connect 'projects/:id/repository/:repository_id/revisions/:rev/:action/*path', + :requirements => { :action => /(browse|show|entry|changes|annotate|diff)/ } + repository_views.connect 'projects/:id/repository/:repository_id/raw/*path', + :action => 'entry', :format => 'raw' + repository_views.connect 'projects/:id/repository/:repository_id/:action/*path', + :requirements => { :action => /(browse|show|entry|changes|annotate|diff)/ } + repository_views.connect 'projects/:id/repository/:repository_id', :action => 'show' - repository_views.connect 'projects/:id/repository/graph', - :action => 'graph' end repositories.connect 'projects/:id/repository/revision', |