2006-06-28 22:11:03 +04:00
|
|
|
ActionController::Routing::Routes.draw do |map|
|
|
|
|
# Add your own custom routes here.
|
|
|
|
# The priority is based upon order of creation: first created -> highest priority.
|
2011-08-18 17:19:39 +04:00
|
|
|
|
2006-06-28 22:11:03 +04:00
|
|
|
# Here's a sample route:
|
|
|
|
# map.connect 'products/:id', :controller => 'catalog', :action => 'view'
|
|
|
|
# Keep in mind you can assign values other than :controller and :action
|
|
|
|
|
2011-12-10 17:33:01 +04:00
|
|
|
map.home '', :controller => 'welcome', :conditions => {:method => :get}
|
2011-08-18 17:19:39 +04:00
|
|
|
|
2011-12-25 16:34:52 +04:00
|
|
|
map.signin 'login', :controller => 'account', :action => 'login',
|
|
|
|
:conditions => {:method => [:get, :post]}
|
|
|
|
map.signout 'logout', :controller => 'account', :action => 'logout',
|
|
|
|
:conditions => {:method => :get}
|
|
|
|
map.connect 'account/register', :controller => 'account', :action => 'register',
|
|
|
|
:conditions => {:method => [:get, :post]}
|
|
|
|
map.connect 'account/lost_password', :controller => 'account', :action => 'lost_password',
|
|
|
|
:conditions => {:method => [:get, :post]}
|
|
|
|
map.connect 'account/activate', :controller => 'account', :action => 'activate',
|
|
|
|
:conditions => {:method => :get}
|
2011-08-18 17:19:39 +04:00
|
|
|
|
2011-12-29 12:36:19 +04:00
|
|
|
map.connect 'projects/:id/wiki', :controller => 'wikis',
|
|
|
|
:action => 'edit', :conditions => {:method => :post}
|
|
|
|
map.connect 'projects/:id/wiki/destroy', :controller => 'wikis',
|
|
|
|
:action => 'destroy', :conditions => {:method => [:get, :post]}
|
2011-08-18 17:19:39 +04:00
|
|
|
|
2009-01-26 04:47:51 +03:00
|
|
|
map.with_options :controller => 'messages' do |messages_routes|
|
|
|
|
messages_routes.with_options :conditions => {:method => :get} do |messages_views|
|
|
|
|
messages_views.connect 'boards/:board_id/topics/new', :action => 'new'
|
|
|
|
messages_views.connect 'boards/:board_id/topics/:id', :action => 'show'
|
|
|
|
messages_views.connect 'boards/:board_id/topics/:id/edit', :action => 'edit'
|
|
|
|
end
|
|
|
|
messages_routes.with_options :conditions => {:method => :post} do |messages_actions|
|
|
|
|
messages_actions.connect 'boards/:board_id/topics/new', :action => 'new'
|
2011-12-10 17:33:01 +04:00
|
|
|
messages_actions.connect 'boards/:board_id/topics/preview', :action => 'preview'
|
2012-01-04 16:38:20 +04:00
|
|
|
messages_actions.connect 'boards/:board_id/topics/quote/:id', :action => 'quote'
|
2009-01-26 04:47:51 +03:00
|
|
|
messages_actions.connect 'boards/:board_id/topics/:id/replies', :action => 'reply'
|
2011-12-22 04:45:26 +04:00
|
|
|
messages_actions.connect 'boards/:board_id/topics/:id/edit', :action => 'edit'
|
|
|
|
messages_actions.connect 'boards/:board_id/topics/:id/destroy', :action => 'destroy'
|
2009-01-26 04:47:51 +03:00
|
|
|
end
|
|
|
|
end
|
2011-08-18 17:19:39 +04:00
|
|
|
|
2010-08-26 20:36:59 +04:00
|
|
|
# Misc issue routes. TODO: move into resources
|
2011-12-30 06:15:40 +04:00
|
|
|
map.auto_complete_issues '/issues/auto_complete', :controller => 'auto_completes',
|
|
|
|
:action => 'issues', :conditions => { :method => :get }
|
2011-12-30 06:16:22 +04:00
|
|
|
# TODO: would look nicer as /issues/:id/preview
|
2012-02-16 02:49:03 +04:00
|
|
|
map.preview_new_issue '/issues/preview/new/:project_id', :controller => 'previews',
|
|
|
|
:action => 'issue'
|
|
|
|
map.preview_edit_issue '/issues/preview/edit/:id', :controller => 'previews',
|
|
|
|
:action => 'issue'
|
2011-12-30 06:16:53 +04:00
|
|
|
map.issues_context_menu '/issues/context_menu',
|
|
|
|
:controller => 'context_menus', :action => 'issues'
|
|
|
|
|
2010-08-23 19:04:36 +04:00
|
|
|
map.issue_changes '/issues/changes', :controller => 'journals', :action => 'index'
|
2011-12-26 11:17:46 +04:00
|
|
|
map.quoted_issue '/issues/:id/quoted', :controller => 'journals', :action => 'new',
|
|
|
|
:id => /\d+/, :conditions => { :method => :post }
|
2011-12-11 00:40:17 +04:00
|
|
|
|
2011-12-26 11:17:46 +04:00
|
|
|
map.connect '/journals/diff/:id', :controller => 'journals', :action => 'diff',
|
|
|
|
:id => /\d+/, :conditions => { :method => :get }
|
|
|
|
map.connect '/journals/edit/:id', :controller => 'journals', :action => 'edit',
|
|
|
|
:id => /\d+/, :conditions => { :method => [:get, :post] }
|
2010-08-26 20:36:59 +04:00
|
|
|
|
2011-04-01 18:34:44 +04:00
|
|
|
map.with_options :controller => 'gantts', :action => 'show' do |gantts_routes|
|
|
|
|
gantts_routes.connect '/projects/:project_id/issues/gantt'
|
2011-04-01 19:30:32 +04:00
|
|
|
gantts_routes.connect '/projects/:project_id/issues/gantt.:format'
|
|
|
|
gantts_routes.connect '/issues/gantt.:format'
|
2011-04-01 18:34:44 +04:00
|
|
|
end
|
2011-08-18 17:19:39 +04:00
|
|
|
|
2011-04-01 18:34:44 +04:00
|
|
|
map.with_options :controller => 'calendars', :action => 'show' do |calendars_routes|
|
|
|
|
calendars_routes.connect '/projects/:project_id/issues/calendar'
|
|
|
|
calendars_routes.connect '/issues/calendar'
|
|
|
|
end
|
2010-08-26 20:36:59 +04:00
|
|
|
|
|
|
|
map.with_options :controller => 'reports', :conditions => {:method => :get} do |reports|
|
|
|
|
reports.connect 'projects/:id/issues/report', :action => 'issue_report'
|
|
|
|
reports.connect 'projects/:id/issues/report/:detail', :action => 'issue_report_details'
|
2009-01-26 04:47:51 +03:00
|
|
|
end
|
2010-08-11 18:42:10 +04:00
|
|
|
|
2011-12-26 09:53:01 +04:00
|
|
|
map.connect 'my/account', :controller => 'my', :action => 'account',
|
|
|
|
:conditions => {:method => [:get, :post]}
|
2012-04-15 18:31:54 +04:00
|
|
|
map.connect 'my/account/destroy', :controller => 'my', :action => 'destroy',
|
|
|
|
:conditions => {:method => [:get, :post]}
|
2011-12-26 09:53:01 +04:00
|
|
|
map.connect 'my/page', :controller => 'my', :action => 'page',
|
|
|
|
:conditions => {:method => :get}
|
|
|
|
# Redirects to my/page
|
|
|
|
map.connect 'my', :controller => 'my', :action => 'index',
|
|
|
|
:conditions => {:method => :get}
|
|
|
|
map.connect 'my/reset_rss_key', :controller => 'my', :action => 'reset_rss_key',
|
|
|
|
:conditions => {:method => :post}
|
|
|
|
map.connect 'my/reset_api_key', :controller => 'my', :action => 'reset_api_key',
|
|
|
|
:conditions => {:method => :post}
|
|
|
|
map.connect 'my/password', :controller => 'my', :action => 'password',
|
|
|
|
:conditions => {:method => [:get, :post]}
|
|
|
|
map.connect 'my/page_layout', :controller => 'my', :action => 'page_layout',
|
|
|
|
:conditions => {:method => :get}
|
|
|
|
map.connect 'my/add_block', :controller => 'my', :action => 'add_block',
|
|
|
|
:conditions => {:method => :post}
|
|
|
|
map.connect 'my/remove_block', :controller => 'my', :action => 'remove_block',
|
|
|
|
:conditions => {:method => :post}
|
|
|
|
map.connect 'my/order_blocks', :controller => 'my', :action => 'order_blocks',
|
|
|
|
:conditions => {:method => :post}
|
2011-12-10 17:33:01 +04:00
|
|
|
|
2009-01-26 04:47:51 +03:00
|
|
|
map.with_options :controller => 'users' do |users|
|
2011-12-26 17:08:52 +04:00
|
|
|
users.user_membership 'users/:id/memberships/:membership_id',
|
|
|
|
:action => 'edit_membership',
|
|
|
|
:conditions => {:method => :put}
|
|
|
|
users.connect 'users/:id/memberships/:membership_id',
|
|
|
|
:action => 'destroy_membership',
|
|
|
|
:conditions => {:method => :delete}
|
2011-12-30 20:08:42 +04:00
|
|
|
users.user_memberships 'users/:id/memberships',
|
|
|
|
:action => 'edit_membership',
|
|
|
|
:conditions => {:method => :post}
|
2009-01-26 04:47:51 +03:00
|
|
|
end
|
2011-12-30 20:08:42 +04:00
|
|
|
map.resources :users
|
2010-09-09 22:57:21 +04:00
|
|
|
|
2010-09-17 19:55:08 +04:00
|
|
|
# For nice "roadmap" in the url for the index action
|
|
|
|
map.connect 'projects/:project_id/roadmap', :controller => 'versions', :action => 'index'
|
|
|
|
|
2010-09-27 20:51:12 +04:00
|
|
|
map.preview_news '/news/preview', :controller => 'previews', :action => 'news'
|
2011-12-26 15:47:23 +04:00
|
|
|
map.connect 'news/:id/comments', :controller => 'comments',
|
|
|
|
:action => 'create', :conditions => {:method => :post}
|
|
|
|
map.connect 'news/:id/comments/:comment_id', :controller => 'comments',
|
|
|
|
:action => 'destroy', :conditions => {:method => :delete}
|
2010-09-27 20:51:12 +04:00
|
|
|
|
2011-12-27 05:57:54 +04:00
|
|
|
map.connect 'watchers/new', :controller=> 'watchers', :action => 'new',
|
2012-01-09 22:37:16 +04:00
|
|
|
:conditions => {:method => :get}
|
|
|
|
map.connect 'watchers', :controller=> 'watchers', :action => 'create',
|
|
|
|
:conditions => {:method => :post}
|
2012-03-24 16:57:28 +04:00
|
|
|
map.connect 'watchers/append', :controller=> 'watchers', :action => 'append',
|
|
|
|
:conditions => {:method => :post}
|
2011-12-27 05:57:54 +04:00
|
|
|
map.connect 'watchers/destroy', :controller=> 'watchers', :action => 'destroy',
|
|
|
|
:conditions => {:method => :post}
|
|
|
|
map.connect 'watchers/watch', :controller=> 'watchers', :action => 'watch',
|
|
|
|
:conditions => {:method => :post}
|
|
|
|
map.connect 'watchers/unwatch', :controller=> 'watchers', :action => 'unwatch',
|
|
|
|
:conditions => {:method => :post}
|
2012-01-09 22:37:16 +04:00
|
|
|
map.connect 'watchers/autocomplete_for_user', :controller=> 'watchers', :action => 'autocomplete_for_user',
|
|
|
|
:conditions => {:method => :get}
|
2011-12-10 17:33:01 +04:00
|
|
|
|
2011-12-30 18:55:05 +04:00
|
|
|
# TODO: port to be part of the resources route(s)
|
|
|
|
map.with_options :conditions => {:method => :get} do |project_views|
|
|
|
|
project_views.connect 'projects/:id/settings/:tab',
|
|
|
|
:controller => 'projects', :action => 'settings'
|
|
|
|
project_views.connect 'projects/:project_id/issues/:copy_from/copy',
|
|
|
|
:controller => 'issues', :action => 'new'
|
|
|
|
end
|
|
|
|
|
2010-09-09 22:57:21 +04:00
|
|
|
map.resources :projects, :member => {
|
|
|
|
:copy => [:get, :post],
|
|
|
|
:settings => :get,
|
|
|
|
:modules => :post,
|
|
|
|
:archive => :post,
|
|
|
|
:unarchive => :post
|
2010-09-10 20:00:49 +04:00
|
|
|
} do |project|
|
2012-01-09 04:08:50 +04:00
|
|
|
project.resource :enumerations, :controller => 'project_enumerations',
|
2011-12-30 09:15:18 +04:00
|
|
|
:only => [:update, :destroy]
|
2011-12-13 00:43:51 +04:00
|
|
|
# issue form update
|
2011-12-29 12:36:45 +04:00
|
|
|
project.issue_form 'issues/new', :controller => 'issues',
|
2012-01-07 01:01:35 +04:00
|
|
|
:action => 'new', :conditions => {:method => [:post, :put]}
|
2011-12-30 16:53:15 +04:00
|
|
|
project.resources :issues, :only => [:index, :new, :create] do |issues|
|
2012-01-05 12:03:53 +04:00
|
|
|
issues.resources :time_entries, :controller => 'timelog',
|
|
|
|
:collection => {:report => :get}
|
2011-12-30 16:53:15 +04:00
|
|
|
end
|
2011-12-13 00:43:51 +04:00
|
|
|
|
2010-09-14 20:24:07 +04:00
|
|
|
project.resources :files, :only => [:index, :new, :create]
|
2011-12-30 14:10:02 +04:00
|
|
|
project.resources :versions, :shallow => true,
|
|
|
|
:collection => {:close_completed => :put},
|
|
|
|
:member => {:status_by => :post}
|
2010-09-27 20:51:12 +04:00
|
|
|
project.resources :news, :shallow => true
|
2012-01-05 12:03:53 +04:00
|
|
|
project.resources :time_entries, :controller => 'timelog',
|
|
|
|
:collection => {:report => :get}
|
2011-10-26 22:00:56 +04:00
|
|
|
project.resources :queries, :only => [:new, :create]
|
2011-11-20 19:55:19 +04:00
|
|
|
project.resources :issue_categories, :shallow => true
|
2011-11-30 23:51:16 +04:00
|
|
|
project.resources :documents, :shallow => true, :member => {:add_attachment => :post}
|
2011-12-02 01:14:09 +04:00
|
|
|
project.resources :boards
|
2012-01-15 18:23:06 +04:00
|
|
|
project.resources :repositories, :shallow => true, :except => [:index, :show],
|
|
|
|
:member => {:committers => [:get, :post]}
|
2012-02-05 20:35:27 +04:00
|
|
|
project.resources :memberships, :shallow => true, :controller => 'members',
|
2012-02-06 13:47:10 +04:00
|
|
|
:only => [:index, :show, :create, :update, :destroy],
|
2012-02-05 20:35:27 +04:00
|
|
|
:collection => {:autocomplete => :get}
|
2010-10-12 19:55:21 +04:00
|
|
|
|
2010-10-29 01:25:38 +04:00
|
|
|
project.wiki_start_page 'wiki', :controller => 'wiki', :action => 'show', :conditions => {:method => :get}
|
|
|
|
project.wiki_index 'wiki/index', :controller => 'wiki', :action => 'index', :conditions => {:method => :get}
|
2010-11-06 16:22:23 +03:00
|
|
|
project.wiki_diff 'wiki/:id/diff/:version', :controller => 'wiki', :action => 'diff', :version => nil
|
2010-10-29 01:25:38 +04:00
|
|
|
project.wiki_diff 'wiki/:id/diff/:version/vs/:version_from', :controller => 'wiki', :action => 'diff'
|
|
|
|
project.wiki_annotate 'wiki/:id/annotate/:version', :controller => 'wiki', :action => 'annotate'
|
|
|
|
project.resources :wiki, :except => [:new, :create], :member => {
|
|
|
|
:rename => [:get, :post],
|
|
|
|
:history => :get,
|
|
|
|
:preview => :any,
|
|
|
|
:protect => :post,
|
|
|
|
:add_attachment => :post
|
|
|
|
}, :collection => {
|
|
|
|
:export => :get,
|
|
|
|
:date_index => :get
|
|
|
|
}
|
2010-09-10 20:00:49 +04:00
|
|
|
end
|
2010-09-09 22:57:21 +04:00
|
|
|
|
2012-01-08 06:37:59 +04:00
|
|
|
map.connect 'news', :controller => 'news', :action => 'index'
|
|
|
|
map.connect 'news.:format', :controller => 'news', :action => 'index'
|
|
|
|
|
2011-12-31 03:53:29 +04:00
|
|
|
map.resources :queries, :except => [:show]
|
2011-12-30 18:55:05 +04:00
|
|
|
map.resources :issues,
|
2012-01-07 20:18:53 +04:00
|
|
|
:collection => {:bulk_edit => [:get, :post], :bulk_update => :post} do |issues|
|
2011-12-30 18:55:05 +04:00
|
|
|
issues.resources :time_entries, :controller => 'timelog',
|
|
|
|
:collection => {:report => :get}
|
|
|
|
issues.resources :relations, :shallow => true,
|
|
|
|
:controller => 'issue_relations',
|
|
|
|
:only => [:index, :show, :create, :destroy]
|
2009-01-26 04:47:51 +03:00
|
|
|
end
|
2011-12-30 18:55:05 +04:00
|
|
|
# Bulk deletion
|
|
|
|
map.connect '/issues', :controller => 'issues', :action => 'destroy',
|
|
|
|
:conditions => {:method => :delete}
|
2011-08-18 17:19:39 +04:00
|
|
|
|
2011-12-31 10:19:12 +04:00
|
|
|
map.connect '/time_entries/destroy',
|
|
|
|
:controller => 'timelog', :action => 'destroy',
|
|
|
|
:conditions => { :method => :delete }
|
|
|
|
map.time_entries_context_menu '/time_entries/context_menu',
|
|
|
|
:controller => 'context_menus', :action => 'time_entries'
|
|
|
|
|
|
|
|
map.resources :time_entries, :controller => 'timelog',
|
|
|
|
:collection => {:report => :get, :bulk_edit => :get, :bulk_update => :post}
|
|
|
|
|
2011-12-29 12:04:43 +04:00
|
|
|
map.with_options :controller => 'activities', :action => 'index',
|
|
|
|
:conditions => {:method => :get} do |activity|
|
2010-09-09 22:57:21 +04:00
|
|
|
activity.connect 'projects/:id/activity'
|
|
|
|
activity.connect 'projects/:id/activity.:format'
|
|
|
|
activity.connect 'activity', :id => nil
|
|
|
|
activity.connect 'activity.:format', :id => nil
|
|
|
|
end
|
2010-09-17 19:55:08 +04:00
|
|
|
|
2009-01-26 04:47:51 +03:00
|
|
|
map.with_options :controller => 'repositories' do |repositories|
|
|
|
|
repositories.with_options :conditions => {:method => :get} do |repository_views|
|
2012-01-02 16:13:32 +04:00
|
|
|
repository_views.connect 'projects/:id/repository',
|
|
|
|
:action => 'show'
|
2012-01-29 05:23:15 +04:00
|
|
|
|
|
|
|
repository_views.connect 'projects/:id/repository/:repository_id/statistics',
|
|
|
|
:action => 'stats'
|
|
|
|
repository_views.connect 'projects/:id/repository/:repository_id/graph',
|
|
|
|
:action => 'graph'
|
|
|
|
|
2012-01-02 16:13:32 +04:00
|
|
|
repository_views.connect 'projects/:id/repository/statistics',
|
|
|
|
:action => 'stats'
|
2012-01-15 22:19:19 +04:00
|
|
|
repository_views.connect 'projects/:id/repository/graph',
|
|
|
|
:action => 'graph'
|
2012-01-29 05:23:15 +04:00
|
|
|
|
|
|
|
repository_views.connect 'projects/:id/repository/:repository_id/revisions',
|
2012-01-02 16:13:32 +04:00
|
|
|
:action => 'revisions'
|
2012-01-29 05:23:15 +04:00
|
|
|
repository_views.connect 'projects/:id/repository/:repository_id/revisions.:format',
|
2012-01-02 16:13:32 +04:00
|
|
|
:action => 'revisions'
|
2012-01-29 05:23:15 +04:00
|
|
|
repository_views.connect 'projects/:id/repository/:repository_id/revisions/:rev',
|
2012-01-02 16:13:32 +04:00
|
|
|
:action => 'revision'
|
2012-02-05 14:56:27 +04:00
|
|
|
repository_views.connect 'projects/:id/repository/:repository_id/revisions/:rev/issues',
|
|
|
|
:action => 'add_related_issue', :conditions => {:method => :post}
|
|
|
|
repository_views.connect 'projects/:id/repository/:repository_id/revisions/:rev/issues/:issue_id',
|
|
|
|
:action => 'remove_related_issue', :conditions => {:method => :delete}
|
2012-01-29 05:23:15 +04:00
|
|
|
repository_views.connect 'projects/:id/repository/:repository_id/revisions/:rev/diff',
|
2012-01-02 16:13:32 +04:00
|
|
|
:action => 'diff'
|
2012-01-29 05:23:15 +04:00
|
|
|
repository_views.connect 'projects/:id/repository/:repository_id/revisions/:rev/diff.:format',
|
2012-01-02 16:13:32 +04:00
|
|
|
:action => 'diff'
|
2012-01-29 05:23:15 +04:00
|
|
|
repository_views.connect 'projects/:id/repository/:repository_id/revisions/:rev/raw/*path',
|
2012-01-15 22:19:19 +04:00
|
|
|
:action => 'entry', :format => 'raw'
|
2012-01-29 05:23:15 +04:00
|
|
|
repository_views.connect 'projects/:id/repository/:repository_id/revisions/:rev/:action/*path',
|
2012-01-21 09:16:02 +04:00
|
|
|
:requirements => {
|
|
|
|
:action => /(browse|show|entry|changes|annotate|diff)/,
|
|
|
|
:rev => /[a-z0-9\.\-_]+/
|
2012-01-21 10:09:43 +04:00
|
|
|
}
|
2012-01-29 05:23:15 +04:00
|
|
|
repository_views.connect 'projects/:id/repository/:repository_id/raw/*path',
|
2012-01-02 16:13:32 +04:00
|
|
|
:action => 'entry', :format => 'raw'
|
2012-01-29 05:23:15 +04:00
|
|
|
repository_views.connect 'projects/:id/repository/:repository_id/:action/*path',
|
2012-02-27 22:35:10 +04:00
|
|
|
:requirements => { :action => /(browse|entry|changes|annotate|diff)/ }
|
|
|
|
repository_views.connect 'projects/:id/repository/:repository_id/show/*path',
|
|
|
|
:requirements => { :path => /.+/ }
|
2012-01-15 22:19:19 +04:00
|
|
|
|
2012-04-02 09:09:36 +04:00
|
|
|
repository_views.connect 'projects/:id/repository/:repository_id/revision',
|
|
|
|
:action => 'revision'
|
|
|
|
|
2012-01-29 05:23:15 +04:00
|
|
|
repository_views.connect 'projects/:id/repository/revisions',
|
2012-01-15 22:19:19 +04:00
|
|
|
:action => 'revisions'
|
2012-01-29 05:23:15 +04:00
|
|
|
repository_views.connect 'projects/:id/repository/revisions.:format',
|
2012-01-15 22:19:19 +04:00
|
|
|
:action => 'revisions'
|
2012-01-29 05:23:15 +04:00
|
|
|
repository_views.connect 'projects/:id/repository/revisions/:rev',
|
2012-01-15 22:19:19 +04:00
|
|
|
:action => 'revision'
|
2012-02-05 14:56:27 +04:00
|
|
|
repository_views.connect 'projects/:id/repository/revisions/:rev/issues',
|
|
|
|
:action => 'add_related_issue', :conditions => {:method => :post}
|
|
|
|
repository_views.connect 'projects/:id/repository/revisions/:rev/issues/:issue_id',
|
|
|
|
:action => 'remove_related_issue', :conditions => {:method => :delete}
|
2012-01-29 05:23:15 +04:00
|
|
|
repository_views.connect 'projects/:id/repository/revisions/:rev/diff',
|
2012-01-15 22:19:19 +04:00
|
|
|
:action => 'diff'
|
2012-01-29 05:23:15 +04:00
|
|
|
repository_views.connect 'projects/:id/repository/revisions/:rev/diff.:format',
|
2012-01-02 16:13:32 +04:00
|
|
|
:action => 'diff'
|
2012-01-29 05:23:15 +04:00
|
|
|
repository_views.connect 'projects/:id/repository/revisions/:rev/raw/*path',
|
2012-01-15 22:19:19 +04:00
|
|
|
:action => 'entry', :format => 'raw'
|
2012-01-29 05:23:15 +04:00
|
|
|
repository_views.connect 'projects/:id/repository/revisions/:rev/:action/*path',
|
2012-01-21 09:16:02 +04:00
|
|
|
:requirements => {
|
|
|
|
:action => /(browse|show|entry|changes|annotate|diff)/,
|
|
|
|
:rev => /[a-z0-9\.\-_]+/
|
2012-01-21 10:09:43 +04:00
|
|
|
}
|
2012-01-29 05:23:15 +04:00
|
|
|
repository_views.connect 'projects/:id/repository/raw/*path',
|
2012-01-15 22:19:19 +04:00
|
|
|
:action => 'entry', :format => 'raw'
|
2012-01-29 05:23:15 +04:00
|
|
|
repository_views.connect 'projects/:id/repository/:action/*path',
|
2012-01-15 22:19:19 +04:00
|
|
|
:requirements => { :action => /(browse|show|entry|changes|annotate|diff)/ }
|
2012-01-29 05:23:15 +04:00
|
|
|
|
2012-04-02 09:09:36 +04:00
|
|
|
repository_views.connect 'projects/:id/repository/revision',
|
|
|
|
:action => 'revision'
|
|
|
|
|
2012-01-15 22:19:19 +04:00
|
|
|
repository_views.connect 'projects/:id/repository/:repository_id',
|
2012-01-02 16:13:32 +04:00
|
|
|
:action => 'show'
|
2009-01-26 04:47:51 +03:00
|
|
|
end
|
|
|
|
end
|
2011-12-10 17:33:01 +04:00
|
|
|
|
2011-11-27 15:16:47 +04:00
|
|
|
# additional routes for having the file name at the end of url
|
2011-12-26 14:06:18 +04:00
|
|
|
map.connect 'attachments/:id/:filename', :controller => 'attachments',
|
|
|
|
:action => 'show', :id => /\d+/, :filename => /.*/,
|
|
|
|
:conditions => {:method => :get}
|
|
|
|
map.connect 'attachments/download/:id/:filename', :controller => 'attachments',
|
|
|
|
:action => 'download', :id => /\d+/, :filename => /.*/,
|
|
|
|
:conditions => {:method => :get}
|
|
|
|
map.connect 'attachments/download/:id', :controller => 'attachments',
|
|
|
|
:action => 'download', :id => /\d+/,
|
|
|
|
:conditions => {:method => :get}
|
2011-12-30 16:52:08 +04:00
|
|
|
map.resources :attachments, :only => [:show, :destroy]
|
2011-08-18 17:19:39 +04:00
|
|
|
|
2011-11-27 14:47:36 +04:00
|
|
|
map.resources :groups, :member => {:autocomplete_for_user => :get}
|
2011-12-26 15:48:47 +04:00
|
|
|
map.group_users 'groups/:id/users', :controller => 'groups',
|
|
|
|
:action => 'add_users', :id => /\d+/,
|
|
|
|
:conditions => {:method => :post}
|
|
|
|
map.group_user 'groups/:id/users/:user_id', :controller => 'groups',
|
|
|
|
:action => 'remove_user', :id => /\d+/,
|
|
|
|
:conditions => {:method => :delete}
|
|
|
|
map.connect 'groups/destroy_membership/:id', :controller => 'groups',
|
|
|
|
:action => 'destroy_membership', :id => /\d+/,
|
|
|
|
:conditions => {:method => :post}
|
|
|
|
map.connect 'groups/edit_membership/:id', :controller => 'groups',
|
|
|
|
:action => 'edit_membership', :id => /\d+/,
|
|
|
|
:conditions => {:method => :post}
|
2011-11-27 14:47:36 +04:00
|
|
|
|
2011-11-23 01:32:45 +04:00
|
|
|
map.resources :trackers, :except => :show
|
2011-11-23 02:04:07 +04:00
|
|
|
map.resources :issue_statuses, :except => :show, :collection => {:update_issue_done_ratio => :post}
|
2011-12-10 02:58:30 +04:00
|
|
|
map.resources :custom_fields, :except => :show
|
2011-12-10 03:29:58 +04:00
|
|
|
map.resources :roles, :except => :show, :collection => {:permissions => [:get, :post]}
|
2011-12-11 14:26:12 +04:00
|
|
|
map.resources :enumerations, :except => :show
|
2011-08-18 17:19:39 +04:00
|
|
|
|
2012-04-09 00:06:53 +04:00
|
|
|
map.connect 'projects/:id/search', :controller => 'search', :action => 'index', :conditions => {:method => :get}
|
2011-12-10 17:33:01 +04:00
|
|
|
map.connect 'search', :controller => 'search', :action => 'index', :conditions => {:method => :get}
|
|
|
|
|
2011-12-27 14:04:37 +04:00
|
|
|
map.connect 'mail_handler', :controller => 'mail_handler',
|
|
|
|
:action => 'index', :conditions => {:method => :post}
|
2011-12-10 17:33:01 +04:00
|
|
|
|
2011-12-27 14:05:29 +04:00
|
|
|
map.connect 'admin', :controller => 'admin', :action => 'index',
|
|
|
|
:conditions => {:method => :get}
|
|
|
|
map.connect 'admin/projects', :controller => 'admin', :action => 'projects',
|
|
|
|
:conditions => {:method => :get}
|
|
|
|
map.connect 'admin/plugins', :controller => 'admin', :action => 'plugins',
|
|
|
|
:conditions => {:method => :get}
|
|
|
|
map.connect 'admin/info', :controller => 'admin', :action => 'info',
|
|
|
|
:conditions => {:method => :get}
|
|
|
|
map.connect 'admin/test_email', :controller => 'admin', :action => 'test_email',
|
|
|
|
:conditions => {:method => :get}
|
|
|
|
map.connect 'admin/default_configuration', :controller => 'admin',
|
|
|
|
:action => 'default_configuration', :conditions => {:method => :post}
|
2011-12-10 17:33:01 +04:00
|
|
|
|
2012-03-11 15:53:28 +04:00
|
|
|
map.resources :auth_sources, :member => {:test_connection => :get}
|
2011-12-10 17:33:01 +04:00
|
|
|
|
2011-12-27 17:49:45 +04:00
|
|
|
map.connect 'workflows', :controller => 'workflows',
|
|
|
|
:action => 'index', :conditions => {:method => :get}
|
|
|
|
map.connect 'workflows/edit', :controller => 'workflows',
|
|
|
|
:action => 'edit', :conditions => {:method => [:get, :post]}
|
|
|
|
map.connect 'workflows/copy', :controller => 'workflows',
|
|
|
|
:action => 'copy', :conditions => {:method => [:get, :post]}
|
|
|
|
|
2011-12-27 17:50:12 +04:00
|
|
|
map.connect 'settings', :controller => 'settings',
|
|
|
|
:action => 'index', :conditions => {:method => :get}
|
|
|
|
map.connect 'settings/edit', :controller => 'settings',
|
|
|
|
:action => 'edit', :conditions => {:method => [:get, :post]}
|
|
|
|
map.connect 'settings/plugin/:id', :controller => 'settings',
|
|
|
|
:action => 'plugin', :conditions => {:method => [:get, :post]}
|
2011-08-18 17:19:39 +04:00
|
|
|
|
2009-02-11 01:03:25 +03:00
|
|
|
map.with_options :controller => 'sys' do |sys|
|
2011-12-27 07:00:48 +04:00
|
|
|
sys.connect 'sys/projects.:format',
|
|
|
|
:action => 'projects',
|
|
|
|
:conditions => {:method => :get}
|
|
|
|
sys.connect 'sys/projects/:id/repository.:format',
|
|
|
|
:action => 'create_project_repository',
|
|
|
|
:conditions => {:method => :post}
|
|
|
|
sys.connect 'sys/fetch_changesets',
|
|
|
|
:action => 'fetch_changesets',
|
|
|
|
:conditions => {:method => :get}
|
2009-02-11 01:03:25 +03:00
|
|
|
end
|
2011-08-18 17:19:39 +04:00
|
|
|
|
2012-02-23 14:01:16 +04:00
|
|
|
map.connect 'uploads.:format', :controller => 'attachments', :action => 'upload', :conditions => {:method => :post}
|
|
|
|
|
2011-12-29 12:04:00 +04:00
|
|
|
map.connect 'robots.txt', :controller => 'welcome',
|
|
|
|
:action => 'robots', :conditions => {:method => :get}
|
2011-12-10 17:33:01 +04:00
|
|
|
|
2009-02-11 22:07:07 +03:00
|
|
|
# Used for OpenID
|
|
|
|
map.root :controller => 'account', :action => 'login'
|
2006-06-28 22:11:03 +04:00
|
|
|
end
|