|
|
|
@ -15,6 +15,16 @@
|
|
|
|
|
# along with this program; if not, write tobthe Free Software
|
|
|
|
|
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
|
|
|
|
|
|
|
|
|
# modified by longjun
|
|
|
|
|
# 统一route风格
|
|
|
|
|
# match 'path', :to => 'controller#action'
|
|
|
|
|
# 如果 path = controller#action 则 match 'path'
|
|
|
|
|
# Example:
|
|
|
|
|
# match 'welcome/course', :to => 'welcome#course' 变成
|
|
|
|
|
# match 'welcome/cource'
|
|
|
|
|
# 所有的 act: :act 变成 :act => :act
|
|
|
|
|
# Example: :via => :get ====> :via => :get
|
|
|
|
|
|
|
|
|
|
RedmineApp::Application.routes.draw do
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -31,14 +41,14 @@ RedmineApp::Application.routes.draw do
|
|
|
|
|
resources :homework_attach do
|
|
|
|
|
collection do
|
|
|
|
|
get 'get_homework_member_list'
|
|
|
|
|
match 'addjours', via: [:get, :post]
|
|
|
|
|
match 'add_jour_reply', via: [:get,:post]
|
|
|
|
|
match 'destroy_jour', via: [:get,:post]
|
|
|
|
|
match 'comprehensive_evaluation_jour', via: [:get,:post]
|
|
|
|
|
match 'addjours', :via => [:get, :post]
|
|
|
|
|
match 'add_jour_reply', :via => [:get,:post]
|
|
|
|
|
match 'destroy_jour', :via => [:get,:post]
|
|
|
|
|
match 'comprehensive_evaluation_jour', :via => [:get,:post]
|
|
|
|
|
end
|
|
|
|
|
member do
|
|
|
|
|
match 'add_homework_users', via:[:get,:post]
|
|
|
|
|
match 'destory_homework_users',via:[:get,:post]
|
|
|
|
|
match 'add_homework_users', :via => [:get,:post]
|
|
|
|
|
match 'destory_homework_users', :via => [:get,:post]
|
|
|
|
|
end
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
@ -46,17 +56,17 @@ RedmineApp::Application.routes.draw do
|
|
|
|
|
|
|
|
|
|
resources :open_source_projects do
|
|
|
|
|
collection do
|
|
|
|
|
match 'search', via: [:get, :post]
|
|
|
|
|
match 'remove_condition', via: [:get, :post]
|
|
|
|
|
match 'allbug', via: [:get, :post]
|
|
|
|
|
match 'search', :via => [:get, :post]
|
|
|
|
|
match 'remove_condition', :via => [:get, :post]
|
|
|
|
|
match 'allbug', :via => [:get, :post]
|
|
|
|
|
end
|
|
|
|
|
resources :relative_memos
|
|
|
|
|
member do
|
|
|
|
|
match 'master_apply', via: [:get, :post]
|
|
|
|
|
match 'accept_master_apply', via: [:get, :post]
|
|
|
|
|
match 'refuse_master_apply', via: [:get, :post]
|
|
|
|
|
match 'showmemo', via: [:get, :post]
|
|
|
|
|
match 'showbug', via: [:get, :post]
|
|
|
|
|
match 'master_apply', :via => [:get, :post]
|
|
|
|
|
match 'accept_master_apply', :via => [:get, :post]
|
|
|
|
|
match 'refuse_master_apply', :via => [:get, :post]
|
|
|
|
|
match 'showmemo', :via => [:get, :post]
|
|
|
|
|
match 'showbug', :via => [:get, :post]
|
|
|
|
|
end
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
@ -75,11 +85,11 @@ RedmineApp::Application.routes.draw do
|
|
|
|
|
resources :softapplications do
|
|
|
|
|
|
|
|
|
|
collection do
|
|
|
|
|
match 'new_message', via: :get
|
|
|
|
|
match 'search', via: [:get, :post]
|
|
|
|
|
match 'new_message', :via => :get
|
|
|
|
|
match 'search', :via => [:get, :post]
|
|
|
|
|
end
|
|
|
|
|
member do
|
|
|
|
|
match 'create_message' , via: :post
|
|
|
|
|
match 'create_message' , :via => :post
|
|
|
|
|
end
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
@ -90,46 +100,44 @@ RedmineApp::Application.routes.draw do
|
|
|
|
|
#resources :contestnotifications, :only => [:index, :show, :edit, :update, :destroy]
|
|
|
|
|
# match '/contestnotifications/:id/notificationcomments', :to => 'notificationcomments#create', :via => :post
|
|
|
|
|
# match '/contestnotifications/:id/notificationcomments/:notificationcomment_id', :to => 'notificationcomments#destroy', :via => :delete
|
|
|
|
|
match '/contestnotifications/preview', :controller => 'previews', :action => 'contestnotification', :as => 'preview_contestnotifications', :via => [:get, :post, :put]
|
|
|
|
|
match '/contestnotifications/preview', :to => 'previews#contestnotification', :as => 'preview_contestnotifications', :via => [:get, :post, :put]
|
|
|
|
|
## new added by linchun #新竞赛相关
|
|
|
|
|
resources :contests, only: [:index] do
|
|
|
|
|
resources :contestnotifications do
|
|
|
|
|
# get 'preview', on: :collection
|
|
|
|
|
resources :notificationcomments do
|
|
|
|
|
|
|
|
|
|
end
|
|
|
|
|
resources :notificationcomments
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
collection do
|
|
|
|
|
match 'new_contest' , via: :get
|
|
|
|
|
match 'join_in_contest' , via: :post
|
|
|
|
|
match 'unjoin_in_contest' , via: :delete
|
|
|
|
|
match 'create_contest' , via: :post
|
|
|
|
|
match 'new_join' , via: :post
|
|
|
|
|
match 'new' , via: :post
|
|
|
|
|
match 'new_contest' , :via => :get
|
|
|
|
|
match 'join_in_contest' , :via => :post
|
|
|
|
|
match 'unjoin_in_contest' , :via => :delete
|
|
|
|
|
match 'create_contest' , :via => :post
|
|
|
|
|
match 'new_join' , :via => :post
|
|
|
|
|
match 'new' , :via => :post
|
|
|
|
|
end
|
|
|
|
|
member do
|
|
|
|
|
delete 'destroy_contest'
|
|
|
|
|
match 'add_softapplication'
|
|
|
|
|
match 'update_contest' , via: [:put]
|
|
|
|
|
match 'show_contest' , via: [:get, :post]
|
|
|
|
|
match 'show_project' , via: :get
|
|
|
|
|
match 'show_softapplication' , via: :get
|
|
|
|
|
match 'show_attendingcontest' , via: :get
|
|
|
|
|
#match 'show_notification' , via: :get
|
|
|
|
|
match 'show_participator' , via: :get
|
|
|
|
|
match 'set_reward_project' , via: [:get, :post]
|
|
|
|
|
match 'set_reward_softapplication' , via: [:get, :post]
|
|
|
|
|
match 'add' , via: [:get, :post]
|
|
|
|
|
match 'add_softapplication' , via: [:get, :post]
|
|
|
|
|
match 'create' , via: :post
|
|
|
|
|
match 'settings' , via: [:get, :post]
|
|
|
|
|
match 'update_contest' , :via => [:put]
|
|
|
|
|
match 'show_contest' , :via => [:get, :post]
|
|
|
|
|
match 'show_project' , :via => :get
|
|
|
|
|
match 'show_softapplication' , :via => :get
|
|
|
|
|
match 'show_attendingcontest' , :via => :get
|
|
|
|
|
#match 'show_notification' , :via => :get
|
|
|
|
|
match 'show_participator' , :via => :get
|
|
|
|
|
match 'set_reward_project' , :via => [:get, :post]
|
|
|
|
|
match 'set_reward_softapplication' , :via => [:get, :post]
|
|
|
|
|
match 'add' , :via => [:get, :post]
|
|
|
|
|
match 'add_softapplication' , :via => [:get, :post]
|
|
|
|
|
match 'create' , :via => :post
|
|
|
|
|
match 'settings' , :via => [:get, :post]
|
|
|
|
|
end
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
resources :stores do
|
|
|
|
|
collection do
|
|
|
|
|
match 'search', via: [:get, :post]
|
|
|
|
|
match 'search', :via => [:get, :post]
|
|
|
|
|
end
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
@ -161,22 +169,25 @@ RedmineApp::Application.routes.draw do
|
|
|
|
|
#end
|
|
|
|
|
|
|
|
|
|
root :to => 'welcome#index', :as => 'home'
|
|
|
|
|
match 'welcome/contest', :to => 'welcome#contest', :via => :get
|
|
|
|
|
# added by longjun
|
|
|
|
|
match 'welcome/contest', :via => :get
|
|
|
|
|
# end longjun
|
|
|
|
|
|
|
|
|
|
#added by baiyu
|
|
|
|
|
match 'git_usage/ch_usage', :controller => 'git_usage', :action => 'ch_usage', :via => :get, :as => 'ch_usage'
|
|
|
|
|
match 'git_usage/en_usage', :controller => 'git_usage', :action => 'en_usage', :via => :get, :as => 'en_usage'
|
|
|
|
|
match 'git_usage/ch_usage', :via => :get, :as => 'ch_usage'
|
|
|
|
|
match 'git_usage/en_usage', :via => :get, :as => 'en_usage'
|
|
|
|
|
#added by nie
|
|
|
|
|
match '/projects/search', :controller => 'projects', :action => 'search', :via => [:get, :post]
|
|
|
|
|
match '/users/search', :controller => 'users', :action => 'search', :via => [:get, :post]
|
|
|
|
|
match '/projects/search', :via => [:get, :post]
|
|
|
|
|
match '/users/search', :via => [:get, :post]
|
|
|
|
|
#end
|
|
|
|
|
match 'login', :to => 'account#login', :as => 'signin', :via => [:get, :post]
|
|
|
|
|
match 'logout', :to => 'account#logout', :as => 'signout', :via => [:get, :post]
|
|
|
|
|
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'
|
|
|
|
|
match 'account/activate', :to => 'account#activate', :via => :get
|
|
|
|
|
match 'account/valid_ajax', :to => 'account#valid_ajax', :via => :get
|
|
|
|
|
match 'account/register', :via => [:get, :post], :as => 'register'
|
|
|
|
|
match 'account/lost_password', :via => [:get, :post], :as => 'lost_password'
|
|
|
|
|
match 'account/activate', :via => :get
|
|
|
|
|
match 'account/valid_ajax', :via => :get
|
|
|
|
|
|
|
|
|
|
match '/news/preview', :controller => 'previews', :action => 'news', :as => 'preview_news', :via => [:get, :post, :put]
|
|
|
|
|
match '/news/preview', :to => 'previews#news', :as => 'preview_news', :via => [:get, :post, :put]
|
|
|
|
|
match '/issues/preview/new/:project_id', :to => 'previews#issue', :as => 'preview_new_issue', :via => [:get, :post, :put]
|
|
|
|
|
match '/issues/preview/edit/:id', :to => 'previews#issue', :as => 'preview_edit_issue', :via => [:get, :post, :put]
|
|
|
|
|
match '/issues/preview', :to => 'previews#issue', :as => 'preview_issue', :via => [:get, :post, :put]
|
|
|
|
@ -220,13 +231,13 @@ RedmineApp::Application.routes.draw do
|
|
|
|
|
#added by young
|
|
|
|
|
resources :users do
|
|
|
|
|
collection do
|
|
|
|
|
match "tag_saveEx" , via: [:get, :post]
|
|
|
|
|
match "tag_saveEx" , :via => [:get, :post]
|
|
|
|
|
end
|
|
|
|
|
member do
|
|
|
|
|
match 'user_projects', :to => 'users#user_projects', :via => :get
|
|
|
|
|
match 'user_activities', :to => 'users#user_activities', :via => :get, :as => "user_activities"
|
|
|
|
|
match 'user_newfeedback', :to => 'users#user_newfeedback', :via => :get, :as => "user_newfeedback"
|
|
|
|
|
match 'watch_calls', :controller => 'users', :action => 'watch_bids', :via => [:get , :post]
|
|
|
|
|
match 'watch_calls', :to => 'users#watch_bids', :via => [:get , :post]
|
|
|
|
|
match 'info', :to => 'users#info', :via => [:get , :post], :as => 'user_info'
|
|
|
|
|
match 'user_watchlist', :to => 'users#user_watchlist', :via => :get, :as => "user_watchlist" #add by huang
|
|
|
|
|
match 'user_fanslist', :to => 'users#user_fanslist', :via => :get, :as => "user_fanslist" #add by huang
|
|
|
|
@ -235,14 +246,14 @@ RedmineApp::Application.routes.draw do
|
|
|
|
|
match 'watch_projects', :to => 'users#watch_projects', :via => :get
|
|
|
|
|
# added by bai
|
|
|
|
|
match 'show_score', :to => 'users#show_score', :via => :get
|
|
|
|
|
match 'topic_score_index', :controller => 'users', :action => 'topic_score_index', :via => [:get, :post]
|
|
|
|
|
match 'topic_score_index', :to => 'users#topic_score_index', :via => [:get, :post]
|
|
|
|
|
match 'project_score_index', :to => 'users#project_score_index', :via => :get
|
|
|
|
|
match 'activity_score_index', :to => 'users#activity_score_index', :via => :get
|
|
|
|
|
match 'influence_score_index', :to => 'users#influence_score_index', :via => :get
|
|
|
|
|
match 'score_index', :to => 'users#score_index', :via => :get
|
|
|
|
|
|
|
|
|
|
match 'show_new_score', :to => 'users#show_new_score', :via => :get
|
|
|
|
|
match 'topic_new_score_index', :controller => 'users', :action => 'topic_new_score_index', :via => [:get, :post]
|
|
|
|
|
match 'topic_new_score_index', :to => 'users#topic_new_score_index', :via => [:get, :post]
|
|
|
|
|
match 'project_new_score_index', :to => 'users#project_new_score_index', :via => :get
|
|
|
|
|
match 'activity_new_score_index', :to => 'users#activity_new_score_index', :via => :get
|
|
|
|
|
match 'influence_new_score_index', :to => 'users#influence_new_score_index', :via => :get
|
|
|
|
@ -259,21 +270,21 @@ RedmineApp::Application.routes.draw do
|
|
|
|
|
end
|
|
|
|
|
end
|
|
|
|
|
match 'users/:id/user_newfeedback', :to => 'users#user_newfeedback', :via => :get, :as => "feedback"
|
|
|
|
|
match 'users/:id/user_projects', :controller => 'users', :action => 'user_projects', :via => :get
|
|
|
|
|
match 'users/:id/user_projects', :to => 'users#user_projects', :via => :get
|
|
|
|
|
#match 'user/:id/watch_calls', :controller => 'users', :action => 'watch_bids', :via => [:get , :post]
|
|
|
|
|
|
|
|
|
|
#end
|
|
|
|
|
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
|
|
|
|
|
match 'my/account', :via => [:get, :post]
|
|
|
|
|
match 'my/account/destroy', :to => 'my#destroy', :via => [:get, :post]
|
|
|
|
|
match 'my/page', :via => :get
|
|
|
|
|
match 'my', :to => 'my#index', :via => :get # Redirects to my/page
|
|
|
|
|
match 'my/reset_rss_key', :via => :post
|
|
|
|
|
match 'my/reset_api_key', :via => :post
|
|
|
|
|
match 'my/password', :via => [:get, :post]
|
|
|
|
|
match 'my/page_layout', :via => :get
|
|
|
|
|
match 'my/add_block', :via => :post
|
|
|
|
|
match 'my/remove_block', :via => :post
|
|
|
|
|
match 'my/order_blocks', :via => :post
|
|
|
|
|
|
|
|
|
|
get 'my/page2', :to => 'my#page2', :as => "my_page2"
|
|
|
|
|
|
|
|
|
@ -282,8 +293,8 @@ RedmineApp::Application.routes.draw do
|
|
|
|
|
match 'users/:id/memberships/:membership_id', :to => 'users#destroy_membership', :via => :delete
|
|
|
|
|
match 'users/:id/memberships', :to => 'users#edit_membership', :via => :post, :as => 'user_memberships'
|
|
|
|
|
################# added by william
|
|
|
|
|
match 'users/tag_save', :to => 'users#tag_save', :via => :post, :as => 'tag'
|
|
|
|
|
match 'users/tag_saveEx', :to => 'users#tag_saveEx', :via => [:get, :post]
|
|
|
|
|
match 'users/tag_save', :via => :post, :as => 'tag'
|
|
|
|
|
match 'users/tag_saveEx', :via => [:get, :post]
|
|
|
|
|
|
|
|
|
|
post 'watchers/watch', :to => 'watchers#watch', :as => 'watch'
|
|
|
|
|
delete 'watchers/watch', :to => 'watchers#unwatch'
|
|
|
|
@ -308,9 +319,10 @@ RedmineApp::Application.routes.draw do
|
|
|
|
|
member do
|
|
|
|
|
get 'settings(/:tab)', :action => 'settings', :as => 'settings'
|
|
|
|
|
#by young
|
|
|
|
|
get 'member', :controller => 'projects', :action => 'member', :as => 'member'
|
|
|
|
|
get 'member', :to => 'projects#member', :as => 'member'
|
|
|
|
|
get 'file', :action => 'file', :as => 'file'
|
|
|
|
|
get 'statistics', :action => 'statistics', :as => 'statistics'
|
|
|
|
|
|
|
|
|
|
get 'feedback', :action => 'feedback', :as => 'project_feedback'
|
|
|
|
|
get 'watcherlist', :action=> 'watcherlist'
|
|
|
|
|
match 'user_watcherlist', :to => 'projects#watcherlist', :via => :get, :as => "watcherlist" #add by huang
|
|
|
|
@ -327,11 +339,11 @@ RedmineApp::Application.routes.draw do
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
#by young
|
|
|
|
|
match '/member', :controller => 'projects', :action => 'member', :as => 'member', :via => :get
|
|
|
|
|
match '/file', :controller => 'projects', :action => 'file', :as => 'file', :via => :get
|
|
|
|
|
match '/statistics', :controller => 'projects', :action => 'statistics', :as => 'statistics', :via => :get
|
|
|
|
|
match '/member', :to => 'projects#member', :as => 'member', :via => :get
|
|
|
|
|
match '/file', :to => 'projects#file', :as => 'file', :via => :get
|
|
|
|
|
match '/statistics', :to => 'projects#statistics', :as => 'statistics', :via => :get
|
|
|
|
|
# match '/investor', :controller => 'projects', :action => 'investor', :as => 'investor', :via => :get
|
|
|
|
|
match '/homework', :controller => 'projects', :action => 'homework', :as => 'homework', :via => :get
|
|
|
|
|
match '/homework', :to => 'projects#homework', :as => 'homework', :via => :get
|
|
|
|
|
|
|
|
|
|
# match '/activity', :controller => 'activities', :action => 'index', :as => 'activity', :via => :get
|
|
|
|
|
# match '/repository', :controller => 'repositories', :action => 'show', :repository_id => nil, :path => nil, :rev => nil, :as => 'repository', :via => :get
|
|
|
|
@ -340,7 +352,7 @@ RedmineApp::Application.routes.draw do
|
|
|
|
|
# get 'projects/:project_id/repository', :to => 'repositories#show', :as => 'project_repository'
|
|
|
|
|
|
|
|
|
|
# match '/show', :controller => 'projects', :action => 'show', :as => 'project_show', :via => :get
|
|
|
|
|
match '/watcherlist', :controller=>'projects', :action=> 'watcherlist', :as => 'watcherlist', :via => :get #add by huang
|
|
|
|
|
match '/watcherlist', :to=>'projects#watcherlist', :as => 'watcherlist', :via => :get #add by huang
|
|
|
|
|
# matche '/news', :controller => 'news', :action => 'index', :as => 'news', :via => :get
|
|
|
|
|
#end
|
|
|
|
|
|
|
|
|
@ -362,12 +374,12 @@ RedmineApp::Application.routes.draw do
|
|
|
|
|
end
|
|
|
|
|
end
|
|
|
|
|
# issue form update
|
|
|
|
|
match 'issues/update_form', :controller => 'issues', :action => 'update_form', :via => [:put, :post], :as => 'issue_form'
|
|
|
|
|
match 'issues/update_form', :to => 'issues#update_form', :via => [:put, :post], :as => 'issue_form'
|
|
|
|
|
|
|
|
|
|
resources :files, :only => [:index, :new, :create] do
|
|
|
|
|
collection do
|
|
|
|
|
match "getattachtype" , via: [:get, :post]
|
|
|
|
|
#match 'getattachtype/:attachtype', :to => 'files#getattachtype', via: [:get, :post]
|
|
|
|
|
match "getattachtype" , :via => [:get, :post]
|
|
|
|
|
#match 'getattachtype/:attachtype', :to => 'files#getattachtype', :via => [:get, :post]
|
|
|
|
|
end
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
@ -399,7 +411,7 @@ RedmineApp::Application.routes.draw do
|
|
|
|
|
# get 'create', :via=>[:get, :post]
|
|
|
|
|
end
|
|
|
|
|
end
|
|
|
|
|
match 'wiki/index', :controller => 'wiki', :action => 'index', :via => :get
|
|
|
|
|
match 'wiki/index', :via => :get
|
|
|
|
|
resources :wiki, :except => [:index, :new, :create], :as => 'wiki_page' do
|
|
|
|
|
member do
|
|
|
|
|
get 'rename'
|
|
|
|
@ -415,7 +427,7 @@ RedmineApp::Application.routes.draw do
|
|
|
|
|
get 'date_index'
|
|
|
|
|
end
|
|
|
|
|
end
|
|
|
|
|
match 'wiki', :controller => 'wiki', :action => 'show', :via => :get
|
|
|
|
|
match 'wiki', :to => 'wiki#show', :via => :get
|
|
|
|
|
get 'wiki/:id/:version', :to => 'wiki#show', :constraints => {:version => /\d+/}
|
|
|
|
|
delete 'wiki/:id/:version', :to => 'wiki#destroy_version'
|
|
|
|
|
get 'wiki/:id/:version/annotate', :to => 'wiki#annotate'
|
|
|
|
@ -434,7 +446,7 @@ RedmineApp::Application.routes.draw do
|
|
|
|
|
end
|
|
|
|
|
resources :relations, :shallow => true, :controller => 'issue_relations', :only => [:index, :show, :create, :destroy]
|
|
|
|
|
end
|
|
|
|
|
match '/issues', :controller => 'issues', :action => 'destroy', :via => :delete
|
|
|
|
|
match '/issues', :to => 'issues#destroy', :via => :delete
|
|
|
|
|
|
|
|
|
|
resources :queries, :except => [:show]
|
|
|
|
|
|
|
|
|
@ -520,16 +532,16 @@ RedmineApp::Application.routes.draw do
|
|
|
|
|
get 'attachments/download/:id', :to => 'attachments#download', :id => /\d+/
|
|
|
|
|
get 'attachments/thumbnail/:id(/:size)', :to => 'attachments#thumbnail', :id => /\d+/, :size => /\d+/, :as => 'thumbnail'
|
|
|
|
|
get 'attachments/autocomplete'
|
|
|
|
|
match 'attachments/autocomplete', :to => 'attachments#autocomplete', via: [:post]
|
|
|
|
|
match 'attachments/autocomplete', :to => 'attachments#autocomplete', :via => [:post]
|
|
|
|
|
post 'attachments/relationfile', to: 'attachments#add_exist_file_to_project', as: 'attach_relation'
|
|
|
|
|
post 'attachments/courserelationfile', to: 'attachments#add_exist_file_to_course', as: 'course_attach_relation'
|
|
|
|
|
get 'attachments/renderTag/:attchmentId', :to => 'attachments#renderTag', :attchmentId => /\d+/
|
|
|
|
|
resources :attachments, :only => [:show, :destroy] do
|
|
|
|
|
collection do
|
|
|
|
|
match "updateType" , via: [:get, :post]
|
|
|
|
|
match "updateFileDense" , via: [:get, :post]
|
|
|
|
|
match "renderTag" , via: [:get, :post]
|
|
|
|
|
match 'delete_softapplications', via: [:get, :post]
|
|
|
|
|
match "updateType" , :via => [:get, :post]
|
|
|
|
|
match "updateFileDense" , :via => [:get, :post]
|
|
|
|
|
match "renderTag" , :via => [:get, :post]
|
|
|
|
|
match 'delete_softapplications', :via => [:get, :post]
|
|
|
|
|
end
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
@ -539,10 +551,10 @@ RedmineApp::Application.routes.draw do
|
|
|
|
|
end
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
match 'groups/:id/users', :controller => 'groups', :action => 'add_users', :id => /\d+/, :via => :post, :as => 'group_users'
|
|
|
|
|
match 'groups/:id/users/:user_id', :controller => 'groups', :action => 'remove_user', :id => /\d+/, :via => :delete, :as => 'group_user'
|
|
|
|
|
match 'groups/destroy_membership/:id', :controller => 'groups', :action => 'destroy_membership', :id => /\d+/, :via => :post
|
|
|
|
|
match 'groups/edit_membership/:id', :controller => 'groups', :action => 'edit_membership', :id => /\d+/, :via => :post
|
|
|
|
|
match 'groups/:id/users', :to => 'groups#add_users', :id => /\d+/, :via => :post, :as => 'group_users'
|
|
|
|
|
match 'groups/:id/users/:user_id', :to => 'groups#remove_user', :id => /\d+/, :via => :delete, :as => 'group_user'
|
|
|
|
|
match 'groups/destroy_membership/:id', :to => 'groups#destroy_membership', :id => /\d+/, :via => :post
|
|
|
|
|
match 'groups/edit_membership/:id', :to => 'groups#edit_membership', :id => /\d+/, :via => :post
|
|
|
|
|
|
|
|
|
|
resources :trackers, :except => :show do
|
|
|
|
|
collection do
|
|
|
|
@ -566,20 +578,20 @@ RedmineApp::Application.routes.draw do
|
|
|
|
|
get 'projects/:id/search', :controller => 'search', :action => 'index'
|
|
|
|
|
get 'search', :controller => 'search', :action => 'index'
|
|
|
|
|
|
|
|
|
|
match 'mail_handler', :controller => 'mail_handler', :action => 'index', :via => :post
|
|
|
|
|
match 'mail_handler/cancel/:id', :controller => 'mail_handler', :action => 'cancel_mail_notify',:via => :get
|
|
|
|
|
|
|
|
|
|
match 'admin', :controller => 'admin', :action => 'index', :via => :get
|
|
|
|
|
match 'admin/projects', :controller => 'admin', :action => 'projects', :via => :get
|
|
|
|
|
match 'admin/users', :controller => 'admin', :action => 'users', :via => :get
|
|
|
|
|
match 'admin/first_page_made',:controller => 'admin',:action => 'first_page_made',:via => [:get,:post]
|
|
|
|
|
match 'admin/course_page_made',:controller => 'admin',:action => 'course_page_made',:via => [:get,:post]
|
|
|
|
|
match 'admin/contest_page_made',:controller => 'admin',:action => 'contest_page_made',:via => [:get,:post]
|
|
|
|
|
match 'admin/search', :controller => 'admin', :action => 'search', :via => [:get, :post]
|
|
|
|
|
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
|
|
|
|
|
match 'mail_handler', :to => 'mail_handler#index', :via => :post
|
|
|
|
|
match 'mail_handler/cancel/:id', :to => 'mail_handler#cancel_mail_notify',:via => :get
|
|
|
|
|
|
|
|
|
|
match 'admin', :to => 'admin#index', :via => :get
|
|
|
|
|
match 'admin/projects', :via => :get
|
|
|
|
|
match 'admin/users', :via => :get
|
|
|
|
|
match 'admin/first_page_made', :via => [:get,:post]
|
|
|
|
|
match 'admin/course_page_made', :via => [:get,:post]
|
|
|
|
|
match 'admin/contest_page_made', :via => [:get,:post]
|
|
|
|
|
match 'admin/search', :via => [:get, :post]
|
|
|
|
|
match 'admin/plugins', :via => :get
|
|
|
|
|
match 'admin/info', :via => :get
|
|
|
|
|
match 'admin/test_email', :via => :get
|
|
|
|
|
match 'admin/default_configuration', :via => :post
|
|
|
|
|
|
|
|
|
|
resources :auth_sources do
|
|
|
|
|
member do
|
|
|
|
@ -590,8 +602,8 @@ RedmineApp::Application.routes.draw do
|
|
|
|
|
end
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
match 'courses/search', :to => 'courses#search'
|
|
|
|
|
match '/contests/search', :controller => 'contests', :action => 'search', :via => [:get, :post]
|
|
|
|
|
match 'courses/search'
|
|
|
|
|
match '/contests/search', :via => [:get, :post]
|
|
|
|
|
# add by nwb
|
|
|
|
|
# 课程路由设置
|
|
|
|
|
resources :courses do
|
|
|
|
@ -605,11 +617,11 @@ RedmineApp::Application.routes.draw do
|
|
|
|
|
post 'finishcourse'
|
|
|
|
|
post 'restartcourse'
|
|
|
|
|
end
|
|
|
|
|
match '/member', :controller => 'courses', :action => 'member', :as => 'member', :via => :get
|
|
|
|
|
match '/member', :to => 'courses#member', :as => 'member', :via => :get
|
|
|
|
|
resources :boards
|
|
|
|
|
resources :files, :only => [:index, :new, :create] do
|
|
|
|
|
collection do
|
|
|
|
|
match "getattachtype", via: [:get, :post]
|
|
|
|
|
match "getattachtype", :via => [:get, :post]
|
|
|
|
|
end
|
|
|
|
|
end
|
|
|
|
|
resources :memberships, :shallow => true, :controller => 'members', :only => [:index, :show, :new, :create, :update, :destroy] do
|
|
|
|
@ -620,24 +632,24 @@ RedmineApp::Application.routes.draw do
|
|
|
|
|
end
|
|
|
|
|
resources :news, :except => [:show, :edit, :update, :destroy]
|
|
|
|
|
resources :boards
|
|
|
|
|
match '/homework', :controller => 'courses', :action => 'homework', :as => 'homework', :via => :get
|
|
|
|
|
match '/homework', :to => 'courses#homework', :as => 'homework', :via => :get
|
|
|
|
|
end # end of resources :courses
|
|
|
|
|
match 'courses/:id/feedback', :to => 'courses#feedback', :via => :get, :as => 'course_feedback'
|
|
|
|
|
match '/courses/search', :controller => 'courses', :action => 'search', :via => [:get, :post]
|
|
|
|
|
match 'words/:id/leave_course_message', :controller => 'words', :action => 'leave_course_message'
|
|
|
|
|
match '/courses/search', :via => [:get, :post]
|
|
|
|
|
match 'words/:id/leave_course_message', :to => 'words#leave_course_message'
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
match 'workflows', :controller => 'workflows', :action => 'index', :via => :get
|
|
|
|
|
match 'workflows/edit', :controller => 'workflows', :action => 'edit', :via => [:get, :post]
|
|
|
|
|
match 'workflows/permissions', :controller => 'workflows', :action => 'permissions', :via => [:get, :post]
|
|
|
|
|
match 'workflows/copy', :controller => 'workflows', :action => 'copy', :via => [:get, :post]
|
|
|
|
|
match 'workflows', :to => 'workflows#index', :via => :get
|
|
|
|
|
match 'workflows/edit', :via => [:get, :post]
|
|
|
|
|
match 'workflows/permissions', :via => [:get, :post]
|
|
|
|
|
match 'workflows/copy', :via => [:get, :post]
|
|
|
|
|
match 'settings', :controller => 'settings', :action => 'index', :via => :get
|
|
|
|
|
match 'settings/edit', :controller => 'settings', :action => 'edit', :via => [:get, :post]
|
|
|
|
|
match 'settings/plugin/:id', :controller => 'settings', :action => 'plugin', :via => [:get, :post], :as => 'plugin_settings'
|
|
|
|
|
match 'settings/edit', :via => [:get, :post]
|
|
|
|
|
match 'settings/plugin/:id', :to => 'settings#plugin', :via => [:get, :post], :as => 'plugin_settings'
|
|
|
|
|
|
|
|
|
|
match 'sys/projects', :to => 'sys#projects', :via => :get
|
|
|
|
|
match 'sys/projects', :via => :get
|
|
|
|
|
match 'sys/projects/:id/repository', :to => 'sys#create_project_repository', :via => :post
|
|
|
|
|
match 'sys/fetch_changesets', :to => 'sys#fetch_changesets', :via => :get
|
|
|
|
|
match 'sys/fetch_changesets', :via => :get
|
|
|
|
|
|
|
|
|
|
match 'uploads', :to => 'attachments#upload', :via => :post
|
|
|
|
|
# Added by Tao
|
|
|
|
@ -659,20 +671,20 @@ RedmineApp::Application.routes.draw do
|
|
|
|
|
############## fq
|
|
|
|
|
post 'calls/create', :to => 'bids#create'
|
|
|
|
|
delete 'calls/destroy', :to => 'bids#destroy'
|
|
|
|
|
match 'calls/new', :controller => 'bids', :action => 'new', :via => [:get , :post]
|
|
|
|
|
match 'calls/new', :to => 'bids#new', :via => [:get , :post]
|
|
|
|
|
get 'calls/more', :to => 'bids#more'
|
|
|
|
|
get 'calls/back', :to=> 'bids#back'
|
|
|
|
|
match 'calls/new_bid', :controller => 'bids', :action => 'new_bid'
|
|
|
|
|
match 'contest/new_contest', :controller => 'bids', :action => 'new_contest' #huang
|
|
|
|
|
match 'calls/:id/show_project', :controller => 'bids', :action => 'show_project', :as => 'project_for_bid'
|
|
|
|
|
match 'calls/:id/show_course', :controller => 'bids', :action => 'show_courseEx', :as => 'course_for_bid' # nwb added
|
|
|
|
|
match 'calls/:id/new_exercise_book', :controller => 'homework_attach', :action => 'new', :as => 'new_homework_attach'
|
|
|
|
|
match 'calls/:id/add', :controller => 'bids', :action => 'add'
|
|
|
|
|
match 'calls/:id/delete', :controller => 'bids', :action => 'delete'
|
|
|
|
|
match 'calls/:id/add_homework', :controller => 'bids', :action => 'add_homework', via: :post
|
|
|
|
|
match 'calls/:id/new_submit_homework', to: 'bids#new_submit_homework', via: :get, as: 'new_submit_homework'
|
|
|
|
|
match 'words/add_project_respond', :controller => 'words', :action => 'add_project_respond'
|
|
|
|
|
match 'words/:id/leave_project_message', :controller => 'words', :action => 'leave_project_message'
|
|
|
|
|
match 'calls/new_bid', :to => 'bids#new_bid'
|
|
|
|
|
match 'contest/new_contest', :to => 'bids#new_contest' #huang
|
|
|
|
|
match 'calls/:id/show_project', :to => 'bids#show_project', :as => 'project_for_bid'
|
|
|
|
|
match 'calls/:id/show_course', :to => 'bids#show_courseEx', :as => 'course_for_bid' # nwb added
|
|
|
|
|
match 'calls/:id/new_exercise_book', :to => 'homework_attach#new', :as => 'new_homework_attach'
|
|
|
|
|
match 'calls/:id/add', :to => 'bids#add'
|
|
|
|
|
match 'calls/:id/delete', :to => 'bids#delete'
|
|
|
|
|
match 'calls/:id/add_homework', :to => 'bids#add_homework', :via => :post
|
|
|
|
|
match 'calls/:id/new_submit_homework', :to => 'bids#new_submit_homework', :via => :get, :as => 'new_submit_homework'
|
|
|
|
|
match 'words/add_project_respond', :to => 'words#add_project_respond'
|
|
|
|
|
match 'words/:id/leave_project_message', :to => 'words#leave_project_message'
|
|
|
|
|
|
|
|
|
|
match 'projects/:id/feedback', :to => 'projects#feedback', :via => :get, :as => 'project_feedback'
|
|
|
|
|
match 'calls/create_bid', :to => 'bids#create_bid'
|
|
|
|
@ -693,9 +705,9 @@ RedmineApp::Application.routes.draw do
|
|
|
|
|
delete 'join_in/join', :to => 'courses#unjoin'
|
|
|
|
|
post 'calls/:id/join_in_contest', :to => 'bids#join_in_contest', :as => 'join_in_contest'
|
|
|
|
|
delete 'calls/:id/join_in_contest', :to => 'bids#unjoin_in_contest'
|
|
|
|
|
match 'calls/:id/show_participator', :to => 'bids#show_participator' #bai
|
|
|
|
|
match 'calls/:id/update_contest', :to => 'bids#update_contest' #bai
|
|
|
|
|
match 'calls/:id/settings', :to => 'bids#settings' #bai
|
|
|
|
|
match 'calls/:id/show_participator', :to => 'bids#show_participator' # bai
|
|
|
|
|
match 'calls/:id/update_contest', :to => 'bids#update_contest' # bai
|
|
|
|
|
match 'calls/:id/settings', :to => 'bids#settings' # bai
|
|
|
|
|
|
|
|
|
|
delete 'attachment/:id', :to => 'attachments#delete_homework'
|
|
|
|
|
match 'new_join', :to => 'courses#new_join', :as => 'try_join'
|
|
|
|
@ -707,13 +719,16 @@ RedmineApp::Application.routes.draw do
|
|
|
|
|
#added by william
|
|
|
|
|
# match 'calls/:id/set_results',:controller => 'bids', :action => 'set_results',:via => [:get,:post],:as => 'set_results'
|
|
|
|
|
# match 'calls/:id/set_prizes',:controller => 'bids',:action => 'set_prizes',:as => 'set_prizes'
|
|
|
|
|
match 'calls/:id/set_reward',:controller => 'bids',:action => 'set_reward',:as => 'set_reward'
|
|
|
|
|
match 'calls/:id/set_reward',:to => 'bids#set_reward',:as => 'set_reward'
|
|
|
|
|
|
|
|
|
|
# added by young
|
|
|
|
|
match 'calls', :controller => 'bids', :action => 'index'
|
|
|
|
|
match 'calls', :to => 'bids#index'
|
|
|
|
|
|
|
|
|
|
match 'calls/:id', :controller => 'bids', :action => 'show', :as => 'respond'
|
|
|
|
|
match 'contest', :controller => 'bids', :action => 'contests', :as => 'contest' #modified @20140403
|
|
|
|
|
match 'calls/:id', :to => 'bid#show', :as => 'respond'
|
|
|
|
|
# modified by longjun
|
|
|
|
|
# bids#contests is not exist
|
|
|
|
|
# match 'contest', :to => 'bids#contests', :as => 'contest' #modified @20140403
|
|
|
|
|
# end longjun
|
|
|
|
|
|
|
|
|
|
########################
|
|
|
|
|
##added by wen##########
|
|
|
|
@ -738,17 +753,17 @@ RedmineApp::Application.routes.draw do
|
|
|
|
|
get 'school/upload_logo', :to => 'school#upload_logo'
|
|
|
|
|
|
|
|
|
|
######added by nie
|
|
|
|
|
match 'tags/show_projects_tags',:to => 'tags#show_projects_tags'
|
|
|
|
|
match 'tags/show_projects_tags'
|
|
|
|
|
########### added by liuping
|
|
|
|
|
match 'tags/add_tag',:to => 'tags#add_tag',:as=>"add_tag"
|
|
|
|
|
match 'tags/delete_tag',:to => 'tags#delete_tag',:as=>"add_tag"
|
|
|
|
|
match 'tags/show_all',:to => 'tags#show_all'
|
|
|
|
|
match 'parise_tread/praise_plus',:to => 'parise_tread#praise_plus',:as=>"praise"
|
|
|
|
|
match 'parise_tread/tread_plus',:to => 'parise_tread#tread_plus',:as=>"tread"
|
|
|
|
|
match 'tags/delete',:to=>'tags#delete'
|
|
|
|
|
match 'tags/remove_tag',:to=>'tags#remove_tag',:as=>"remove_tag"
|
|
|
|
|
|
|
|
|
|
match 'words/add_brief_introdution', :controller => 'words', :action => 'add_brief_introdution'
|
|
|
|
|
match 'tags/add_tag', :as=>"add_tag"
|
|
|
|
|
match 'tags/delete_tag', :as=>"add_tag"
|
|
|
|
|
match 'tags/show_all'
|
|
|
|
|
match 'parise_tread/praise_plus', :as=>"praise"
|
|
|
|
|
match 'parise_tread/tread_plus', :as=>"tread"
|
|
|
|
|
match 'tags/delete'
|
|
|
|
|
match 'tags/remove_tag', :as=>"remove_tag"
|
|
|
|
|
|
|
|
|
|
match 'words/add_brief_introdution'
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Dir.glob File.expand_path("plugins/*", Rails.root) do |plugin_dir|
|
|
|
|
|