|
|
|
@ -26,9 +26,6 @@
|
|
|
|
|
# Example: :via => :get ====> :via => :get
|
|
|
|
|
|
|
|
|
|
RedmineApp::Application.routes.draw do
|
|
|
|
|
|
|
|
|
|
#match '/discuss_demos/new',:to => 'discuss_demo#create',:via =>[:post]
|
|
|
|
|
#match '/discuss_demo/show',:to => 'discuss_demo#show'
|
|
|
|
|
mount Mobile::API => '/api'
|
|
|
|
|
|
|
|
|
|
resources :homework_users
|
|
|
|
@ -146,13 +143,6 @@ RedmineApp::Application.routes.draw do
|
|
|
|
|
end
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
#resources :notificationcomments do
|
|
|
|
|
#
|
|
|
|
|
#end
|
|
|
|
|
|
|
|
|
|
#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
|
|
|
|
|
## new added by linchun #新竞赛相关
|
|
|
|
|
resources :contests, only: [:index] do
|
|
|
|
|
resources :contestnotifications do
|
|
|
|
@ -195,13 +185,6 @@ RedmineApp::Application.routes.draw do
|
|
|
|
|
match '/issues/preview', :to => 'previews#issue', :as => 'preview_issue', :via => [:get, :post, :put]
|
|
|
|
|
match '/contestnotifications/preview', :to => 'previews#contestnotification', :as => 'preview_contestnotifications', :via => [:get, :post, :put]
|
|
|
|
|
|
|
|
|
|
#resource :previews, only: [] do
|
|
|
|
|
# collection do
|
|
|
|
|
# match 'news', :via => [:get, :post, :put]
|
|
|
|
|
# match 'issue', :via => [:get, :post, :put]
|
|
|
|
|
# end
|
|
|
|
|
#end
|
|
|
|
|
|
|
|
|
|
resources :stores do
|
|
|
|
|
collection do
|
|
|
|
|
match 'search', :via => [:get, :post]
|
|
|
|
@ -274,7 +257,7 @@ RedmineApp::Application.routes.draw do
|
|
|
|
|
post 'boards/:board_id/topics/:id/edit', :to => 'messages#edit'
|
|
|
|
|
post 'boards/:board_id/topics/:id/destroy', :to => 'messages#destroy'
|
|
|
|
|
# boards end
|
|
|
|
|
delete 'bids/homework', :to => 'bids#homework_destroy'
|
|
|
|
|
# delete 'bids/homework', :to => 'bids#homework_destroy'
|
|
|
|
|
|
|
|
|
|
# Misc issue routes. TODO: move into resources
|
|
|
|
|
match '/issues/auto_complete', :to => 'auto_completes#issues', :via => :get, :as => 'auto_complete_issues'
|
|
|
|
@ -306,7 +289,6 @@ RedmineApp::Application.routes.draw 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', :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
|
|
|
|
@ -340,7 +322,6 @@ RedmineApp::Application.routes.draw do
|
|
|
|
|
end
|
|
|
|
|
match 'users/:id/user_newfeedback', :to => 'users#user_newfeedback', :via => :get, :as => "feedback"
|
|
|
|
|
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', :via => [:get, :post]
|
|
|
|
@ -395,9 +376,6 @@ RedmineApp::Application.routes.draw do
|
|
|
|
|
get 'invite_members_by_mail', :action=> 'invite_members_by_mail'
|
|
|
|
|
get 'send_mail_to_member', :action => 'send_mail_to_member'
|
|
|
|
|
match 'user_watcherlist', :to => 'projects#watcherlist', :via => :get, :as => "watcherlist" #add by huang
|
|
|
|
|
get 'homework', :action => 'homework', :as => 'homework'
|
|
|
|
|
get 'new_homework', :action => 'new_homework', :as => 'new_homework'
|
|
|
|
|
#get 'news', :action => 'news', :as => 'news'
|
|
|
|
|
#end
|
|
|
|
|
post 'modules'
|
|
|
|
|
post 'archive'
|
|
|
|
@ -415,19 +393,7 @@ RedmineApp::Application.routes.draw do
|
|
|
|
|
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', :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
|
|
|
|
|
# match '/', :controller => 'projects', :action => 'show', :as => 'project_show', :via => :get
|
|
|
|
|
# get 'projects/:project_id/show', :to => 'projects#show', :as => 'project_show'
|
|
|
|
|
# get 'projects/:project_id/repository', :to => 'repositories#show', :as => 'project_repository'
|
|
|
|
|
|
|
|
|
|
# match '/show', :controller => 'projects', :action => 'show', :as => 'project_show', :via => :get
|
|
|
|
|
match '/watcherlist', :to=>'projects#watcherlist', :as => 'watcherlist', :via => :get #add by huang
|
|
|
|
|
# matche '/news', :controller => 'news', :action => 'index', :as => 'news', :via => :get
|
|
|
|
|
#end
|
|
|
|
|
|
|
|
|
|
resources :memberships, :shallow => true, :controller => 'members', :only => [:index, :show, :new, :create, :update, :destroy] do
|
|
|
|
|
collection do
|
|
|
|
@ -698,8 +664,6 @@ RedmineApp::Application.routes.draw do
|
|
|
|
|
member do
|
|
|
|
|
get 'settings(/:tab)', :action => 'settings', :as => 'settings'
|
|
|
|
|
get 'search_member', :action => 'search_member'
|
|
|
|
|
get 'homework', :action => 'homework', :as => 'homework'
|
|
|
|
|
get 'new_homework', :action => 'new_homework', :as => 'new_homework'
|
|
|
|
|
get 'file', :action => 'file', :as => 'file'
|
|
|
|
|
get 'feedback', :action => 'feedback', :as => 'course_feedback'
|
|
|
|
|
get 'member', :controller => 'courses', :action => 'member', :as => 'member'
|
|
|
|
@ -771,7 +735,6 @@ RedmineApp::Application.routes.draw do
|
|
|
|
|
match 'delete_avatar', :to => 'avatar#delete_image',:via => :post
|
|
|
|
|
# Endof Tao's code
|
|
|
|
|
get 'robots.txt', :to => 'welcome#robots'
|
|
|
|
|
#match 'welcome/course', :to => 'welcome#course'
|
|
|
|
|
##############测试留言功能 fq
|
|
|
|
|
post 'words/new', :to => 'words#new'
|
|
|
|
|
post 'words/create', :to => 'words#create'
|
|
|
|
@ -782,66 +745,21 @@ RedmineApp::Application.routes.draw do
|
|
|
|
|
get 'words/more', :to => 'words#more'
|
|
|
|
|
get 'words/back', :to=> 'words#back'
|
|
|
|
|
get 'words/destroyJournal', :to => 'words#destroyJournal'
|
|
|
|
|
############## fq
|
|
|
|
|
# post 'calls/create', :to => 'bids#create'
|
|
|
|
|
# delete 'calls/destroy', :to => 'bids#destroy'
|
|
|
|
|
# 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', :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_exercise_book'
|
|
|
|
|
# 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'
|
|
|
|
|
# match 'contest/create_contest', :to => 'bids#create_contest' #huang
|
|
|
|
|
# match 'calls/create_homework', :to => 'bids#create_homework'
|
|
|
|
|
# match 'calls/:id/homework_respond', :to => 'bids#homework_respond'
|
|
|
|
|
# match 'calls/:id/homework_statistics', :to => 'bids#homework_statistics'
|
|
|
|
|
# match 'calls/:id/fork', :to => 'bids#fork', :as => 'fork'
|
|
|
|
|
# match 'calls/:id/create_fork', :to => 'bids#create_fork'
|
|
|
|
|
#
|
|
|
|
|
# match 'calls/:id/show_course', :to => 'bids#show_course', :as => 'show_course'
|
|
|
|
|
# match 'calls/:id/show_bid_project', :to => 'bids#show_bid_project', :as => 'show_bid_project'
|
|
|
|
|
# match 'calls/:id/show_bid_user', :to => 'bids#show_bid_user', :as => 'show_bid_user'
|
|
|
|
|
|
|
|
|
|
match 'project/:id/share', :to => 'projects#share', :as => 'share_show' #share
|
|
|
|
|
|
|
|
|
|
post 'join_in/join', :to => 'courses#join', :as => 'join'
|
|
|
|
|
delete 'join_in/join', :to => 'courses#unjoin'
|
|
|
|
|
post 'join_in/join_group', :to => 'courses#join_group', :as => 'join_group'
|
|
|
|
|
delete 'join_in/join_group', :to => 'courses#unjoin_group'
|
|
|
|
|
# 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
|
|
|
|
|
|
|
|
|
|
delete 'attachment/:id', :to => 'attachments#delete_homework'
|
|
|
|
|
match 'new_join', :to => 'courses#new_join', :as => 'try_join'
|
|
|
|
|
match 'new_join_group', :to => 'courses#new_join_group', :as => 'try_join_group'
|
|
|
|
|
# match 'new_join_in_contest', :to => 'bids#new_join', :as => 'try_join_in_contest'
|
|
|
|
|
match 'projects/:id/respond', :to => 'projects#project_respond', :via => :post
|
|
|
|
|
# match 'calls/:id/manage',:to => 'bids#manage',:via => [:get,:post]
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#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',:to => 'bids#set_reward',:as => 'set_reward'
|
|
|
|
|
|
|
|
|
|
# added by young
|
|
|
|
|
# match 'calls', :to => 'bids#index'
|
|
|
|
|
#
|
|
|
|
|
# match 'calls/:id', :to => 'bids#show', :as => 'respond'
|
|
|
|
|
|
|
|
|
|
########################
|
|
|
|
|
##added by wen##########
|
|
|
|
@ -849,7 +767,6 @@ RedmineApp::Application.routes.draw do
|
|
|
|
|
get 'welcome/search', to: 'welcome#search'
|
|
|
|
|
get 'school/index', to: 'school#index'
|
|
|
|
|
get 'school/:school_id', to: 'welcome#course', :as => 'school_course_list'
|
|
|
|
|
#get 'course/:school_id', to: 'welcome#course'
|
|
|
|
|
post 'school/get_options/:province', :to => 'school#get_options'
|
|
|
|
|
get 'school/get_options/:province', :to => 'school#get_options'
|
|
|
|
|
|
|
|
|
|