| 
									
										
										
										
											2012-04-25 17:17:49 +00:00
										 |  |  | # Redmine - project management software | 
					
						
							| 
									
										
										
										
											2014-01-29 22:45:39 +00:00
										 |  |  | # Copyright (C) 2006-2014  Jean-Philippe Lang | 
					
						
							| 
									
										
										
										
											2012-04-25 17:17:49 +00:00
										 |  |  | # | 
					
						
							|  |  |  | # This program is free software; you can redistribute it and/or | 
					
						
							|  |  |  | # modify it under the terms of the GNU General Public License | 
					
						
							|  |  |  | # as published by the Free Software Foundation; either version 2 | 
					
						
							|  |  |  | # of the License, or (at your option) any later version. | 
					
						
							|  |  |  | # | 
					
						
							|  |  |  | # This program is distributed in the hope that it will be useful, | 
					
						
							|  |  |  | # but WITHOUT ANY WARRANTY; without even the implied warranty of | 
					
						
							|  |  |  | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the | 
					
						
							|  |  |  | # GNU General Public License for more details. | 
					
						
							|  |  |  | # | 
					
						
							|  |  |  | # You should have received a copy of the GNU General Public License | 
					
						
							|  |  |  | # along with this program; if not, write to the Free Software | 
					
						
							|  |  |  | # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA. | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2014-10-22 17:37:16 +00:00
										 |  |  | Rails.application.routes.draw do | 
					
						
							| 
									
										
										
										
											2012-04-25 17:17:49 +00:00
										 |  |  |   root :to => 'welcome#index', :as => 'home' | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2012-12-08 10:28:29 +00:00
										 |  |  |   match 'login', :to => 'account#login', :as => 'signin', :via => [:get, :post] | 
					
						
							|  |  |  |   match 'logout', :to => 'account#logout', :as => 'signout', :via => [:get, :post] | 
					
						
							| 
									
										
										
										
											2012-07-07 17:45:12 +00:00
										 |  |  |   match 'account/register', :to => 'account#register', :via => [:get, :post], :as => 'register' | 
					
						
							|  |  |  |   match 'account/lost_password', :to => 'account#lost_password', :via => [:get, :post], :as => 'lost_password' | 
					
						
							| 
									
										
										
										
											2012-04-25 17:17:49 +00:00
										 |  |  |   match 'account/activate', :to => 'account#activate', :via => :get | 
					
						
							| 
									
										
										
										
											2013-06-09 10:01:56 +00:00
										 |  |  |   get 'account/activation_email', :to => 'account#activation_email', :as => 'activation_email' | 
					
						
							| 
									
										
										
										
											2012-04-27 16:17:31 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2014-10-22 17:37:16 +00:00
										 |  |  |   match '/news/preview', :controller => 'previews', :action => 'news', :as => 'preview_news', :via => [:get, :post, :put, :patch] | 
					
						
							|  |  |  |   match '/issues/preview/new/:project_id', :to => 'previews#issue', :as => 'preview_new_issue', :via => [:get, :post, :put, :patch] | 
					
						
							|  |  |  |   match '/issues/preview/edit/:id', :to => 'previews#issue', :as => 'preview_edit_issue', :via => [:get, :post, :put, :patch] | 
					
						
							|  |  |  |   match '/issues/preview', :to => 'previews#issue', :as => 'preview_issue', :via => [:get, :post, :put, :patch] | 
					
						
							| 
									
										
										
										
											2012-04-27 16:17:31 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2012-04-25 17:17:49 +00:00
										 |  |  |   match 'projects/:id/wiki', :to => 'wikis#edit', :via => :post | 
					
						
							|  |  |  |   match 'projects/:id/wiki/destroy', :to => 'wikis#destroy', :via => [:get, :post] | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2012-12-22 15:57:27 +00:00
										 |  |  |   match 'boards/:board_id/topics/new', :to => 'messages#new', :via => [:get, :post], :as => 'new_board_message' | 
					
						
							| 
									
										
										
										
											2012-07-15 19:14:23 +00:00
										 |  |  |   get 'boards/:board_id/topics/:id', :to => 'messages#show', :as => 'board_message' | 
					
						
							| 
									
										
										
										
											2012-04-25 17:17:49 +00:00
										 |  |  |   match 'boards/:board_id/topics/quote/:id', :to => 'messages#quote', :via => [:get, :post] | 
					
						
							|  |  |  |   get 'boards/:board_id/topics/:id/edit', :to => 'messages#edit' | 
					
						
							| 
									
										
										
										
											2012-04-27 16:17:31 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2012-12-22 15:57:27 +00:00
										 |  |  |   post 'boards/:board_id/topics/preview', :to => 'messages#preview', :as => 'preview_board_message' | 
					
						
							| 
									
										
										
										
											2012-04-25 17:17:49 +00:00
										 |  |  |   post 'boards/:board_id/topics/:id/replies', :to => 'messages#reply' | 
					
						
							|  |  |  |   post 'boards/:board_id/topics/:id/edit', :to => 'messages#edit' | 
					
						
							|  |  |  |   post 'boards/:board_id/topics/:id/destroy', :to => 'messages#destroy' | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |   # Misc issue routes. TODO: move into resources | 
					
						
							|  |  |  |   match '/issues/auto_complete', :to => 'auto_completes#issues', :via => :get, :as => 'auto_complete_issues' | 
					
						
							| 
									
										
										
										
											2012-12-08 10:28:29 +00:00
										 |  |  |   match '/issues/context_menu', :to => 'context_menus#issues', :as => 'issues_context_menu', :via => [:get, :post] | 
					
						
							|  |  |  |   match '/issues/changes', :to => 'journals#index', :as => 'issue_changes', :via => :get | 
					
						
							| 
									
										
										
										
											2012-04-25 17:17:49 +00:00
										 |  |  |   match '/issues/:id/quoted', :to => 'journals#new', :id => /\d+/, :via => :post, :as => 'quoted_issue' | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |   match '/journals/diff/:id', :to => 'journals#diff', :id => /\d+/, :via => :get | 
					
						
							|  |  |  |   match '/journals/edit/:id', :to => 'journals#edit', :id => /\d+/, :via => [:get, :post] | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2012-12-23 15:12:57 +00:00
										 |  |  |   get '/projects/:project_id/issues/gantt', :to => 'gantts#show', :as => 'project_gantt' | 
					
						
							| 
									
										
										
										
											2012-12-08 10:28:29 +00:00
										 |  |  |   get '/issues/gantt', :to => 'gantts#show' | 
					
						
							| 
									
										
										
										
											2012-04-25 17:17:49 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2012-12-23 15:12:57 +00:00
										 |  |  |   get '/projects/:project_id/issues/calendar', :to => 'calendars#show', :as => 'project_calendar' | 
					
						
							| 
									
										
										
										
											2012-12-08 10:28:29 +00:00
										 |  |  |   get '/issues/calendar', :to => 'calendars#show' | 
					
						
							| 
									
										
										
										
											2012-04-25 17:17:49 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2012-12-23 15:55:57 +00:00
										 |  |  |   get 'projects/:id/issues/report', :to => 'reports#issue_report', :as => 'project_issues_report' | 
					
						
							|  |  |  |   get 'projects/:id/issues/report/:detail', :to => 'reports#issue_report_details', :as => 'project_issues_report_details' | 
					
						
							| 
									
										
										
										
											2012-04-25 17:17:49 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  |   match 'my/account', :controller => 'my', :action => 'account', :via => [:get, :post] | 
					
						
							|  |  |  |   match 'my/account/destroy', :controller => 'my', :action => 'destroy', :via => [:get, :post] | 
					
						
							|  |  |  |   match 'my/page', :controller => 'my', :action => 'page', :via => :get | 
					
						
							|  |  |  |   match 'my', :controller => 'my', :action => 'index', :via => :get # Redirects to my/page | 
					
						
							|  |  |  |   match 'my/reset_rss_key', :controller => 'my', :action => 'reset_rss_key', :via => :post | 
					
						
							|  |  |  |   match 'my/reset_api_key', :controller => 'my', :action => 'reset_api_key', :via => :post | 
					
						
							|  |  |  |   match 'my/password', :controller => 'my', :action => 'password', :via => [:get, :post] | 
					
						
							|  |  |  |   match 'my/page_layout', :controller => 'my', :action => 'page_layout', :via => :get | 
					
						
							|  |  |  |   match 'my/add_block', :controller => 'my', :action => 'add_block', :via => :post | 
					
						
							|  |  |  |   match 'my/remove_block', :controller => 'my', :action => 'remove_block', :via => :post | 
					
						
							|  |  |  |   match 'my/order_blocks', :controller => 'my', :action => 'order_blocks', :via => :post | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2014-10-23 21:46:40 +00:00
										 |  |  |   resources :users do | 
					
						
							|  |  |  |     resources :memberships, :controller => 'principal_memberships' | 
					
						
							|  |  |  |   end | 
					
						
							| 
									
										
										
										
											2012-04-25 17:17:49 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2013-02-10 16:10:53 +00:00
										 |  |  |   post 'watchers/watch', :to => 'watchers#watch', :as => 'watch' | 
					
						
							|  |  |  |   delete 'watchers/watch', :to => 'watchers#unwatch' | 
					
						
							| 
									
										
										
										
											2013-02-10 16:05:30 +00:00
										 |  |  |   get 'watchers/new', :to => 'watchers#new' | 
					
						
							|  |  |  |   post 'watchers', :to => 'watchers#create' | 
					
						
							|  |  |  |   post 'watchers/append', :to => 'watchers#append' | 
					
						
							| 
									
										
										
										
											2013-02-20 20:43:28 +00:00
										 |  |  |   delete 'watchers', :to => 'watchers#destroy' | 
					
						
							| 
									
										
										
										
											2013-02-10 16:05:30 +00:00
										 |  |  |   get 'watchers/autocomplete_for_user', :to => 'watchers#autocomplete_for_user' | 
					
						
							| 
									
										
										
										
											2013-01-30 20:51:21 +00:00
										 |  |  |   # Specific routes for issue watchers API | 
					
						
							|  |  |  |   post 'issues/:object_id/watchers', :to => 'watchers#create', :object_type => 'issue' | 
					
						
							|  |  |  |   delete 'issues/:object_id/watchers/:user_id' => 'watchers#destroy', :object_type => 'issue' | 
					
						
							| 
									
										
										
										
											2012-04-25 17:17:49 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  |   resources :projects do | 
					
						
							|  |  |  |     member do | 
					
						
							| 
									
										
										
										
											2012-12-11 17:51:20 +00:00
										 |  |  |       get 'settings(/:tab)', :action => 'settings', :as => 'settings' | 
					
						
							| 
									
										
										
										
											2012-04-25 17:17:49 +00:00
										 |  |  |       post 'modules' | 
					
						
							|  |  |  |       post 'archive' | 
					
						
							|  |  |  |       post 'unarchive' | 
					
						
							| 
									
										
										
										
											2012-06-25 17:49:35 +00:00
										 |  |  |       post 'close' | 
					
						
							|  |  |  |       post 'reopen' | 
					
						
							| 
									
										
										
										
											2012-04-25 17:17:49 +00:00
										 |  |  |       match 'copy', :via => [:get, :post] | 
					
						
							| 
									
										
										
										
											2009-01-26 01:47:51 +00:00
										 |  |  |     end | 
					
						
							| 
									
										
										
										
											2012-04-25 17:17:49 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2013-05-16 16:57:53 +00:00
										 |  |  |     shallow do | 
					
						
							|  |  |  |       resources :memberships, :controller => 'members', :only => [:index, :show, :new, :create, :update, :destroy] do | 
					
						
							|  |  |  |         collection do | 
					
						
							|  |  |  |           get 'autocomplete' | 
					
						
							|  |  |  |         end | 
					
						
							| 
									
										
										
										
											2012-04-25 17:17:49 +00:00
										 |  |  |       end | 
					
						
							| 
									
										
										
										
											2009-01-26 01:47:51 +00:00
										 |  |  |     end | 
					
						
							| 
									
										
										
										
											2011-08-18 13:19:39 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2012-04-25 17:17:49 +00:00
										 |  |  |     resource :enumerations, :controller => 'project_enumerations', :only => [:update, :destroy] | 
					
						
							| 
									
										
										
										
											2011-08-18 13:19:39 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2012-12-22 10:00:00 +00:00
										 |  |  |     get 'issues/:copy_from/copy', :to => 'issues#new', :as => 'copy_issue' | 
					
						
							| 
									
										
										
										
											2014-10-04 09:14:17 +00:00
										 |  |  |     resources :issues, :only => [:index, :new, :create] | 
					
						
							| 
									
										
										
										
											2012-04-25 17:17:49 +00:00
										 |  |  |     # issue form update | 
					
						
							| 
									
										
										
										
											2014-10-22 17:37:16 +00:00
										 |  |  |     match 'issues/update_form', :controller => 'issues', :action => 'update_form', :via => [:put, :patch, :post], :as => 'issue_form' | 
					
						
							| 
									
										
										
										
											2010-08-26 16:36:59 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2012-04-25 17:17:49 +00:00
										 |  |  |     resources :files, :only => [:index, :new, :create] | 
					
						
							| 
									
										
										
										
											2010-08-11 14:42:10 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2012-04-25 17:17:49 +00:00
										 |  |  |     resources :versions, :except => [:index, :show, :edit, :update, :destroy] do | 
					
						
							|  |  |  |       collection do | 
					
						
							|  |  |  |         put 'close_completed' | 
					
						
							|  |  |  |       end | 
					
						
							|  |  |  |     end | 
					
						
							| 
									
										
										
										
											2012-12-08 10:28:29 +00:00
										 |  |  |     get 'versions.:format', :to => 'versions#index' | 
					
						
							|  |  |  |     get 'roadmap', :to => 'versions#index', :format => false | 
					
						
							|  |  |  |     get 'versions', :to => 'versions#index' | 
					
						
							| 
									
										
										
										
											2011-12-10 13:33:01 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2012-04-25 17:17:49 +00:00
										 |  |  |     resources :news, :except => [:show, :edit, :update, :destroy] | 
					
						
							|  |  |  |     resources :time_entries, :controller => 'timelog' do | 
					
						
							|  |  |  |       get 'report', :on => :collection | 
					
						
							|  |  |  |     end | 
					
						
							|  |  |  |     resources :queries, :only => [:new, :create] | 
					
						
							| 
									
										
										
										
											2013-05-16 16:57:53 +00:00
										 |  |  |     shallow do | 
					
						
							|  |  |  |       resources :issue_categories | 
					
						
							|  |  |  |     end | 
					
						
							| 
									
										
										
										
											2012-04-25 17:17:49 +00:00
										 |  |  |     resources :documents, :except => [:show, :edit, :update, :destroy] | 
					
						
							|  |  |  |     resources :boards | 
					
						
							| 
									
										
										
										
											2013-05-16 16:57:53 +00:00
										 |  |  |     shallow do | 
					
						
							|  |  |  |       resources :repositories, :except => [:index, :show] do | 
					
						
							|  |  |  |         member do | 
					
						
							|  |  |  |           match 'committers', :via => [:get, :post] | 
					
						
							|  |  |  |         end | 
					
						
							| 
									
										
										
										
											2012-04-25 17:17:49 +00:00
										 |  |  |       end | 
					
						
							|  |  |  |     end | 
					
						
							| 
									
										
										
										
											2013-05-16 16:57:53 +00:00
										 |  |  |    | 
					
						
							| 
									
										
										
										
											2012-04-25 17:17:49 +00:00
										 |  |  |     match 'wiki/index', :controller => 'wiki', :action => 'index', :via => :get | 
					
						
							| 
									
										
										
										
											2012-12-11 19:39:47 +00:00
										 |  |  |     resources :wiki, :except => [:index, :new, :create], :as => 'wiki_page' do | 
					
						
							| 
									
										
										
										
											2012-04-25 17:17:49 +00:00
										 |  |  |       member do | 
					
						
							|  |  |  |         get 'rename' | 
					
						
							|  |  |  |         post 'rename' | 
					
						
							|  |  |  |         get 'history' | 
					
						
							|  |  |  |         get 'diff' | 
					
						
							| 
									
										
										
										
											2014-10-22 17:37:16 +00:00
										 |  |  |         match 'preview', :via => [:post, :put, :patch] | 
					
						
							| 
									
										
										
										
											2012-04-25 17:17:49 +00:00
										 |  |  |         post 'protect' | 
					
						
							|  |  |  |         post 'add_attachment' | 
					
						
							|  |  |  |       end | 
					
						
							|  |  |  |       collection do | 
					
						
							|  |  |  |         get 'export' | 
					
						
							|  |  |  |         get 'date_index' | 
					
						
							|  |  |  |       end | 
					
						
							| 
									
										
										
										
											2011-12-30 12:53:15 +00:00
										 |  |  |     end | 
					
						
							| 
									
										
										
										
											2012-04-25 17:17:49 +00:00
										 |  |  |     match 'wiki', :controller => 'wiki', :action => 'show', :via => :get | 
					
						
							| 
									
										
										
										
											2013-01-11 17:42:31 +00:00
										 |  |  |     get 'wiki/:id/:version', :to => 'wiki#show', :constraints => {:version => /\d+/} | 
					
						
							| 
									
										
										
										
											2012-10-23 18:45:14 +00:00
										 |  |  |     delete 'wiki/:id/:version', :to => 'wiki#destroy_version' | 
					
						
							| 
									
										
										
										
											2012-10-21 18:46:26 +00:00
										 |  |  |     get 'wiki/:id/:version/annotate', :to => 'wiki#annotate' | 
					
						
							|  |  |  |     get 'wiki/:id/:version/diff', :to => 'wiki#diff' | 
					
						
							| 
									
										
										
										
											2012-04-25 17:17:49 +00:00
										 |  |  |   end | 
					
						
							| 
									
										
										
										
											2011-12-12 20:43:51 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2012-04-25 17:17:49 +00:00
										 |  |  |   resources :issues do | 
					
						
							|  |  |  |     collection do | 
					
						
							|  |  |  |       match 'bulk_edit', :via => [:get, :post] | 
					
						
							|  |  |  |       post 'bulk_update' | 
					
						
							|  |  |  |     end | 
					
						
							|  |  |  |     resources :time_entries, :controller => 'timelog' do | 
					
						
							|  |  |  |       collection do | 
					
						
							|  |  |  |         get 'report' | 
					
						
							|  |  |  |       end | 
					
						
							|  |  |  |     end | 
					
						
							| 
									
										
										
										
											2013-05-16 16:57:53 +00:00
										 |  |  |     shallow do | 
					
						
							|  |  |  |       resources :relations, :controller => 'issue_relations', :only => [:index, :show, :create, :destroy] | 
					
						
							|  |  |  |     end | 
					
						
							| 
									
										
										
										
											2010-09-10 16:00:49 +00:00
										 |  |  |   end | 
					
						
							| 
									
										
										
										
											2012-04-25 17:17:49 +00:00
										 |  |  |   match '/issues', :controller => 'issues', :action => 'destroy', :via => :delete | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |   resources :queries, :except => [:show] | 
					
						
							| 
									
										
										
										
											2010-09-09 18:57:21 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2012-04-25 17:17:49 +00:00
										 |  |  |   resources :news, :only => [:index, :show, :edit, :update, :destroy] | 
					
						
							|  |  |  |   match '/news/:id/comments', :to => 'comments#create', :via => :post | 
					
						
							|  |  |  |   match '/news/:id/comments/:comment_id', :to => 'comments#destroy', :via => :delete | 
					
						
							| 
									
										
										
										
											2012-04-27 16:17:31 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2012-04-25 17:17:49 +00:00
										 |  |  |   resources :versions, :only => [:show, :edit, :update, :destroy] do | 
					
						
							|  |  |  |     post 'status_by', :on => :member | 
					
						
							| 
									
										
										
										
											2009-01-26 01:47:51 +00:00
										 |  |  |   end | 
					
						
							| 
									
										
										
										
											2012-04-25 17:17:49 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  |   resources :documents, :only => [:show, :edit, :update, :destroy] do | 
					
						
							|  |  |  |     post 'add_attachment', :on => :member | 
					
						
							| 
									
										
										
										
											2010-09-09 18:57:21 +00:00
										 |  |  |   end | 
					
						
							| 
									
										
										
										
											2010-09-17 15:55:08 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2012-12-08 10:28:29 +00:00
										 |  |  |   match '/time_entries/context_menu', :to => 'context_menus#time_entries', :as => :time_entries_context_menu, :via => [:get, :post] | 
					
						
							| 
									
										
										
										
											2012-04-25 17:17:49 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  |   resources :time_entries, :controller => 'timelog', :except => :destroy do | 
					
						
							|  |  |  |     collection do | 
					
						
							|  |  |  |       get 'report' | 
					
						
							|  |  |  |       get 'bulk_edit' | 
					
						
							|  |  |  |       post 'bulk_update' | 
					
						
							| 
									
										
										
										
											2009-01-26 01:47:51 +00:00
										 |  |  |     end | 
					
						
							|  |  |  |   end | 
					
						
							| 
									
										
										
										
											2012-04-25 17:17:49 +00:00
										 |  |  |   match '/time_entries/:id', :to => 'timelog#destroy', :via => :delete, :id => /\d+/ | 
					
						
							|  |  |  |   # TODO: delete /time_entries for bulk deletion | 
					
						
							|  |  |  |   match '/time_entries/destroy', :to => 'timelog#destroy', :via => :delete | 
					
						
							| 
									
										
										
										
											2012-04-27 16:17:31 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2014-11-11 18:07:50 +00:00
										 |  |  |   get 'projects/:id/activity', :to => 'activities#index', :as => :project_activity | 
					
						
							| 
									
										
										
										
											2012-04-25 17:17:49 +00:00
										 |  |  |   get 'activity', :to => 'activities#index' | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |   # repositories routes | 
					
						
							|  |  |  |   get 'projects/:id/repository/:repository_id/statistics', :to => 'repositories#stats' | 
					
						
							|  |  |  |   get 'projects/:id/repository/:repository_id/graph', :to => 'repositories#graph' | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2012-05-03 14:49:29 +00:00
										 |  |  |   get 'projects/:id/repository/:repository_id/changes(/*path(.:ext))', | 
					
						
							|  |  |  |       :to => 'repositories#changes' | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2012-04-25 17:17:49 +00:00
										 |  |  |   get 'projects/:id/repository/:repository_id/revisions/:rev', :to => 'repositories#revision' | 
					
						
							| 
									
										
										
										
											2012-10-24 09:23:59 +00:00
										 |  |  |   get 'projects/:id/repository/:repository_id/revision', :to => 'repositories#revision' | 
					
						
							| 
									
										
										
										
											2012-04-25 17:17:49 +00:00
										 |  |  |   post   'projects/:id/repository/:repository_id/revisions/:rev/issues', :to => 'repositories#add_related_issue' | 
					
						
							|  |  |  |   delete 'projects/:id/repository/:repository_id/revisions/:rev/issues/:issue_id', :to => 'repositories#remove_related_issue' | 
					
						
							|  |  |  |   get 'projects/:id/repository/:repository_id/revisions', :to => 'repositories#revisions' | 
					
						
							| 
									
										
										
										
											2012-04-27 16:17:03 +00:00
										 |  |  |   get 'projects/:id/repository/:repository_id/revisions/:rev/:action(/*path(.:ext))', | 
					
						
							|  |  |  |       :controller => 'repositories', | 
					
						
							| 
									
										
										
										
											2012-07-04 19:17:43 +00:00
										 |  |  |       :format => false, | 
					
						
							| 
									
										
										
										
											2012-04-27 16:17:03 +00:00
										 |  |  |       :constraints => { | 
					
						
							| 
									
										
										
										
											2012-05-05 01:01:29 +00:00
										 |  |  |             :action => /(browse|show|entry|raw|annotate|diff)/, | 
					
						
							| 
									
										
										
										
											2012-04-27 16:17:03 +00:00
										 |  |  |             :rev    => /[a-z0-9\.\-_]+/ | 
					
						
							|  |  |  |           } | 
					
						
							| 
									
										
										
										
											2012-04-25 17:17:49 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  |   get 'projects/:id/repository/statistics', :to => 'repositories#stats' | 
					
						
							|  |  |  |   get 'projects/:id/repository/graph', :to => 'repositories#graph' | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2012-05-03 14:49:29 +00:00
										 |  |  |   get 'projects/:id/repository/changes(/*path(.:ext))', | 
					
						
							|  |  |  |       :to => 'repositories#changes' | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2012-04-25 17:17:49 +00:00
										 |  |  |   get 'projects/:id/repository/revisions', :to => 'repositories#revisions' | 
					
						
							|  |  |  |   get 'projects/:id/repository/revisions/:rev', :to => 'repositories#revision' | 
					
						
							| 
									
										
										
										
											2012-10-24 09:23:59 +00:00
										 |  |  |   get 'projects/:id/repository/revision', :to => 'repositories#revision' | 
					
						
							| 
									
										
										
										
											2012-04-25 17:17:49 +00:00
										 |  |  |   post   'projects/:id/repository/revisions/:rev/issues', :to => 'repositories#add_related_issue' | 
					
						
							|  |  |  |   delete 'projects/:id/repository/revisions/:rev/issues/:issue_id', :to => 'repositories#remove_related_issue' | 
					
						
							| 
									
										
										
										
											2012-04-27 16:17:03 +00:00
										 |  |  |   get 'projects/:id/repository/revisions/:rev/:action(/*path(.:ext))', | 
					
						
							|  |  |  |       :controller => 'repositories', | 
					
						
							| 
									
										
										
										
											2012-07-04 19:17:43 +00:00
										 |  |  |       :format => false, | 
					
						
							| 
									
										
										
										
											2012-04-27 16:17:03 +00:00
										 |  |  |       :constraints => { | 
					
						
							| 
									
										
										
										
											2012-05-05 01:01:29 +00:00
										 |  |  |             :action => /(browse|show|entry|raw|annotate|diff)/, | 
					
						
							| 
									
										
										
										
											2012-04-27 16:17:03 +00:00
										 |  |  |             :rev    => /[a-z0-9\.\-_]+/ | 
					
						
							|  |  |  |           } | 
					
						
							| 
									
										
										
										
											2012-05-05 01:01:29 +00:00
										 |  |  |   get 'projects/:id/repository/:repository_id/:action(/*path(.:ext))', | 
					
						
							|  |  |  |       :controller => 'repositories', | 
					
						
							|  |  |  |       :action => /(browse|show|entry|raw|changes|annotate|diff)/ | 
					
						
							|  |  |  |   get 'projects/:id/repository/:action(/*path(.:ext))', | 
					
						
							|  |  |  |       :controller => 'repositories', | 
					
						
							|  |  |  |       :action => /(browse|show|entry|raw|changes|annotate|diff)/ | 
					
						
							| 
									
										
										
										
											2012-05-05 05:29:58 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  |   get 'projects/:id/repository/:repository_id', :to => 'repositories#show', :path => nil | 
					
						
							| 
									
										
										
										
											2012-04-25 17:17:49 +00:00
										 |  |  |   get 'projects/:id/repository', :to => 'repositories#show', :path => nil | 
					
						
							| 
									
										
										
										
											2011-12-10 13:33:01 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2011-11-27 11:16:47 +00:00
										 |  |  |   # additional routes for having the file name at the end of url | 
					
						
							| 
									
										
										
										
											2013-01-14 20:44:48 +00:00
										 |  |  |   get 'attachments/:id/:filename', :to => 'attachments#show', :id => /\d+/, :filename => /.*/, :as => 'named_attachment' | 
					
						
							|  |  |  |   get 'attachments/download/:id/:filename', :to => 'attachments#download', :id => /\d+/, :filename => /.*/, :as => 'download_named_attachment' | 
					
						
							|  |  |  |   get 'attachments/download/:id', :to => 'attachments#download', :id => /\d+/ | 
					
						
							| 
									
										
										
										
											2013-01-14 20:51:49 +00:00
										 |  |  |   get 'attachments/thumbnail/:id(/:size)', :to => 'attachments#thumbnail', :id => /\d+/, :size => /\d+/, :as => 'thumbnail' | 
					
						
							| 
									
										
										
										
											2012-04-25 17:17:49 +00:00
										 |  |  |   resources :attachments, :only => [:show, :destroy] | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |   resources :groups do | 
					
						
							| 
									
										
										
										
											2014-10-23 21:46:40 +00:00
										 |  |  |     resources :memberships, :controller => 'principal_memberships' | 
					
						
							| 
									
										
										
										
											2012-04-25 17:17:49 +00:00
										 |  |  |     member do | 
					
						
							|  |  |  |       get 'autocomplete_for_user' | 
					
						
							|  |  |  |     end | 
					
						
							|  |  |  |   end | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2014-11-16 08:53:39 +00:00
										 |  |  |   get 'groups/:id/users/new', :to => 'groups#new_users', :id => /\d+/, :as => 'new_group_users' | 
					
						
							|  |  |  |   post 'groups/:id/users', :to => 'groups#add_users', :id => /\d+/, :as => 'group_users' | 
					
						
							|  |  |  |   delete 'groups/:id/users/:user_id', :to => 'groups#remove_user', :id => /\d+/, :as => 'group_user' | 
					
						
							| 
									
										
										
										
											2012-04-25 17:17:49 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2012-09-02 16:55:16 +00:00
										 |  |  |   resources :trackers, :except => :show do | 
					
						
							|  |  |  |     collection do | 
					
						
							|  |  |  |       match 'fields', :via => [:get, :post] | 
					
						
							|  |  |  |     end | 
					
						
							|  |  |  |   end | 
					
						
							| 
									
										
										
										
											2012-04-25 17:17:49 +00:00
										 |  |  |   resources :issue_statuses, :except => :show do | 
					
						
							|  |  |  |     collection do | 
					
						
							|  |  |  |       post 'update_issue_done_ratio' | 
					
						
							|  |  |  |     end | 
					
						
							|  |  |  |   end | 
					
						
							|  |  |  |   resources :custom_fields, :except => :show | 
					
						
							| 
									
										
										
										
											2012-10-12 17:22:52 +00:00
										 |  |  |   resources :roles do | 
					
						
							| 
									
										
										
										
											2012-04-25 17:17:49 +00:00
										 |  |  |     collection do | 
					
						
							|  |  |  |       match 'permissions', :via => [:get, :post] | 
					
						
							|  |  |  |     end | 
					
						
							| 
									
										
										
										
											2009-02-10 22:03:25 +00:00
										 |  |  |   end | 
					
						
							| 
									
										
										
										
											2012-04-25 17:17:49 +00:00
										 |  |  |   resources :enumerations, :except => :show | 
					
						
							| 
									
										
										
										
											2012-10-17 17:29:27 +00:00
										 |  |  |   match 'enumerations/:type', :to => 'enumerations#index', :via => :get | 
					
						
							| 
									
										
										
										
											2011-08-18 13:19:39 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2012-04-25 17:17:49 +00:00
										 |  |  |   get 'projects/:id/search', :controller => 'search', :action => 'index' | 
					
						
							|  |  |  |   get 'search', :controller => 'search', :action => 'index' | 
					
						
							| 
									
										
										
										
											2012-02-23 10:01:16 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2012-04-25 17:17:49 +00:00
										 |  |  |   match 'mail_handler', :controller => 'mail_handler', :action => 'index', :via => :post | 
					
						
							| 
									
										
										
										
											2011-12-10 13:33:01 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2012-04-25 17:17:49 +00:00
										 |  |  |   match 'admin', :controller => 'admin', :action => 'index', :via => :get | 
					
						
							|  |  |  |   match 'admin/projects', :controller => 'admin', :action => 'projects', :via => :get | 
					
						
							|  |  |  |   match 'admin/plugins', :controller => 'admin', :action => 'plugins', :via => :get | 
					
						
							|  |  |  |   match 'admin/info', :controller => 'admin', :action => 'info', :via => :get | 
					
						
							|  |  |  |   match 'admin/test_email', :controller => 'admin', :action => 'test_email', :via => :get | 
					
						
							|  |  |  |   match 'admin/default_configuration', :controller => 'admin', :action => 'default_configuration', :via => :post | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |   resources :auth_sources do | 
					
						
							|  |  |  |     member do | 
					
						
							| 
									
										
										
										
											2012-12-02 18:07:35 +00:00
										 |  |  |       get 'test_connection', :as => 'try_connection' | 
					
						
							| 
									
										
										
										
											2012-04-25 17:17:49 +00:00
										 |  |  |     end | 
					
						
							| 
									
										
										
										
											2012-12-26 11:23:53 +00:00
										 |  |  |     collection do | 
					
						
							|  |  |  |       get 'autocomplete_for_new_user' | 
					
						
							|  |  |  |     end | 
					
						
							| 
									
										
										
										
											2012-04-25 17:17:49 +00:00
										 |  |  |   end | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |   match 'workflows', :controller => 'workflows', :action => 'index', :via => :get | 
					
						
							|  |  |  |   match 'workflows/edit', :controller => 'workflows', :action => 'edit', :via => [:get, :post] | 
					
						
							| 
									
										
										
										
											2012-07-15 14:12:17 +00:00
										 |  |  |   match 'workflows/permissions', :controller => 'workflows', :action => 'permissions', :via => [:get, :post] | 
					
						
							| 
									
										
										
										
											2012-04-25 17:17:49 +00:00
										 |  |  |   match 'workflows/copy', :controller => 'workflows', :action => 'copy', :via => [:get, :post] | 
					
						
							|  |  |  |   match 'settings', :controller => 'settings', :action => 'index', :via => :get | 
					
						
							|  |  |  |   match 'settings/edit', :controller => 'settings', :action => 'edit', :via => [:get, :post] | 
					
						
							| 
									
										
										
										
											2012-12-11 19:39:47 +00:00
										 |  |  |   match 'settings/plugin/:id', :controller => 'settings', :action => 'plugin', :via => [:get, :post], :as => 'plugin_settings' | 
					
						
							| 
									
										
										
										
											2012-04-25 17:17:49 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  |   match 'sys/projects', :to => 'sys#projects', :via => :get | 
					
						
							|  |  |  |   match 'sys/projects/:id/repository', :to => 'sys#create_project_repository', :via => :post | 
					
						
							| 
									
										
										
										
											2014-09-13 10:49:31 +00:00
										 |  |  |   match 'sys/fetch_changesets', :to => 'sys#fetch_changesets', :via => [:get, :post] | 
					
						
							| 
									
										
										
										
											2012-04-25 17:17:49 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  |   match 'uploads', :to => 'attachments#upload', :via => :post | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |   get 'robots.txt', :to => 'welcome#robots' | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |   Dir.glob File.expand_path("plugins/*", Rails.root) do |plugin_dir| | 
					
						
							|  |  |  |     file = File.join(plugin_dir, "config/routes.rb") | 
					
						
							|  |  |  |     if File.exists?(file) | 
					
						
							|  |  |  |       begin | 
					
						
							|  |  |  |         instance_eval File.read(file) | 
					
						
							|  |  |  |       rescue Exception => e | 
					
						
							|  |  |  |         puts "An error occurred while loading the routes definition of #{File.basename(plugin_dir)} plugin (#{file}): #{e.message}." | 
					
						
							|  |  |  |         exit 1
 | 
					
						
							|  |  |  |       end | 
					
						
							|  |  |  |     end | 
					
						
							|  |  |  |   end | 
					
						
							| 
									
										
										
										
											2006-06-28 18:11:03 +00:00
										 |  |  | end |