2014-04-15 16:57:19 +08:00
|
|
|
# Redmine - project management software
|
|
|
|
# Copyright (C) 2006-2013 Jean-Philippe Lang
|
|
|
|
#
|
|
|
|
# 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 tobthe Free Software
|
|
|
|
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
|
|
|
|
|
|
|
RedmineApp::Application.routes.draw do
|
2014-06-03 18:24:55 +08:00
|
|
|
|
2014-06-04 20:29:15 +08:00
|
|
|
|
2014-06-03 21:52:16 +08:00
|
|
|
#match '/contests/:id/contestnotifications', :controller => 'contestnotifications', :action => 'index'
|
|
|
|
|
2014-05-20 08:48:42 +08:00
|
|
|
resources :homework_users
|
|
|
|
|
2014-05-12 18:46:39 +08:00
|
|
|
resources :no_uses
|
|
|
|
delete 'no_uses', :to => 'no_uses#delete'
|
|
|
|
|
2014-05-27 09:01:36 +08:00
|
|
|
resources :apply_project_masters
|
2014-05-12 18:46:39 +08:00
|
|
|
delete 'apply_project_masters', :to => 'apply_project_masters#delete'
|
|
|
|
|
2014-05-19 10:00:24 +08:00
|
|
|
resources :homework_attach do
|
|
|
|
collection do
|
2014-06-10 17:33:31 +08:00
|
|
|
get 'get_homework_member_list'
|
2014-05-19 10:00:24 +08:00
|
|
|
match 'addjours', via: [:get, :post]
|
|
|
|
match 'add_jour_reply', via: [:get,:post]
|
2014-05-20 09:59:33 +08:00
|
|
|
match 'destroy_jour', via: [:get,:post]
|
2014-06-26 17:49:23 +08:00
|
|
|
match 'comprehensive_evaluation_jour', via: [:get,:post]
|
2014-06-11 15:28:13 +08:00
|
|
|
end
|
|
|
|
member do
|
|
|
|
match 'add_homework_users', via:[:get,:post]
|
|
|
|
match 'destory_homework_users',via:[:get,:post]
|
2014-05-19 10:00:24 +08:00
|
|
|
end
|
|
|
|
end
|
2014-06-10 17:33:31 +08:00
|
|
|
|
2014-07-23 09:24:26 +08:00
|
|
|
resources :contest_notification
|
|
|
|
|
2014-05-12 18:46:39 +08:00
|
|
|
resources :open_source_projects do
|
|
|
|
collection do
|
|
|
|
match 'search', via: [:get, :post]
|
|
|
|
match 'remove_condition', via: [:get, :post]
|
2014-05-29 21:42:56 +08:00
|
|
|
match 'allbug', via: [:get, :post]
|
2014-05-12 18:46:39 +08:00
|
|
|
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]
|
2014-05-27 09:01:36 +08:00
|
|
|
match 'showmemo', via: [:get, :post]
|
|
|
|
match 'showbug', via: [:get, :post]
|
2014-05-12 18:46:39 +08:00
|
|
|
end
|
|
|
|
end
|
2014-06-04 12:01:08 +08:00
|
|
|
|
|
|
|
|
2014-05-12 18:46:39 +08:00
|
|
|
mount SeemsRateable::Engine => '/rateable', :as => :rateable
|
|
|
|
|
|
|
|
namespace :zipdown do
|
|
|
|
match 'assort'
|
2014-06-04 12:01:08 +08:00
|
|
|
match 'download_user_homework', :as => :download_user_homework
|
2014-05-12 18:46:39 +08:00
|
|
|
end
|
|
|
|
namespace :test do
|
|
|
|
match 'courselist'
|
|
|
|
match 'zip'
|
|
|
|
end
|
|
|
|
##new added by linchun #以发布应用的形式参与竞赛
|
|
|
|
resources :softapplications do
|
2014-05-27 09:01:36 +08:00
|
|
|
|
2014-05-12 18:46:39 +08:00
|
|
|
collection do
|
|
|
|
match 'new_message', via: :get
|
2014-07-29 17:35:22 +08:00
|
|
|
match 'search', via: [:get, :post]
|
2014-05-12 18:46:39 +08:00
|
|
|
end
|
2014-05-27 09:01:36 +08:00
|
|
|
member do
|
2014-05-12 18:46:39 +08:00
|
|
|
match 'create_message' , via: :post
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
2014-06-04 20:29:15 +08:00
|
|
|
#resources :contestnotifications, :only => [:index, :show, :edit, :update, :destroy]
|
2014-06-07 10:02:00 +08:00
|
|
|
# match '/contestnotifications/:id/notificationcomments', :to => 'notificationcomments#create', :via => :post
|
|
|
|
# match '/contestnotifications/:id/notificationcomments/:notificationcomment_id', :to => 'notificationcomments#destroy', :via => :delete
|
2014-06-13 09:38:51 +08:00
|
|
|
match '/contestnotifications/preview', :controller => 'previews', :action => 'contestnotification', :as => 'preview_contestnotifications', :via => [:get, :post, :put]
|
2014-05-12 18:46:39 +08:00
|
|
|
## new added by linchun #新竞赛相关
|
|
|
|
resources :contests, only: [:index] do
|
2014-06-07 10:02:00 +08:00
|
|
|
resources :contestnotifications do
|
2014-06-13 09:38:51 +08:00
|
|
|
# get 'preview', on: :collection
|
2014-06-07 10:02:00 +08:00
|
|
|
resources :notificationcomments
|
|
|
|
end
|
|
|
|
|
2014-05-12 18:46:39 +08:00
|
|
|
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
|
|
|
|
end
|
|
|
|
member do
|
2014-06-09 10:51:07 +08:00
|
|
|
delete 'destroy_contest'
|
2014-05-12 18:46:39 +08:00
|
|
|
match 'add_softapplication'
|
2014-05-14 16:19:12 +08:00
|
|
|
match 'update_contest' , via: [:put]
|
2014-06-03 21:52:16 +08:00
|
|
|
match 'show_contest' , via: [:get, :post]
|
2014-05-14 16:19:12 +08:00
|
|
|
match 'show_project' , via: :get
|
|
|
|
match 'show_softapplication' , via: :get
|
|
|
|
match 'show_attendingcontest' , via: :get
|
2014-06-03 15:27:04 +08:00
|
|
|
#match 'show_notification' , via: :get
|
2014-05-14 16:19:12 +08:00
|
|
|
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]
|
2014-05-27 09:01:36 +08:00
|
|
|
end
|
|
|
|
end
|
|
|
|
|
2014-04-15 16:57:19 +08:00
|
|
|
resources :stores do
|
|
|
|
collection do
|
|
|
|
match 'search', via: [:get, :post]
|
2014-05-12 18:46:39 +08:00
|
|
|
end
|
2014-04-15 16:57:19 +08:00
|
|
|
end
|
|
|
|
|
|
|
|
resources :forums do
|
|
|
|
collection do
|
|
|
|
match 'search_forum', :via => [:get, :post]
|
|
|
|
end
|
|
|
|
member do
|
|
|
|
post 'create_memo'
|
|
|
|
match 'search_memo', :via => [:get, :post]
|
|
|
|
end
|
|
|
|
resources :memos do
|
|
|
|
collection do
|
|
|
|
get "quote"
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
2014-05-12 18:46:39 +08:00
|
|
|
resources :shares
|
2014-04-15 16:57:19 +08:00
|
|
|
|
|
|
|
#added by william
|
|
|
|
get "tags/index"
|
2014-05-12 18:46:39 +08:00
|
|
|
|
2014-04-15 16:57:19 +08:00
|
|
|
get "tags/show"
|
2014-05-12 18:46:39 +08:00
|
|
|
|
2014-04-15 16:57:19 +08:00
|
|
|
get "praise_tread/praise_plus"
|
|
|
|
|
|
|
|
get "praise_tread/tread_plus"
|
|
|
|
#end
|
|
|
|
|
|
|
|
root :to => 'welcome#index', :as => 'home'
|
2014-05-12 18:46:39 +08:00
|
|
|
|
2014-04-15 16:57:19 +08:00
|
|
|
#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'
|
|
|
|
#added by nie
|
|
|
|
match '/projects/search', :controller => 'projects', :action => 'search', :via => [:get, :post]
|
|
|
|
match '/users/search', :controller => 'users', :action => '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
|
2014-05-12 08:10:08 +08:00
|
|
|
match 'account/valid_ajax', :to => 'account#valid_ajax', :via => :get
|
2014-04-15 16:57:19 +08:00
|
|
|
|
|
|
|
match '/news/preview', :controller => 'previews', :action => '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]
|
|
|
|
|
|
|
|
match 'projects/:id/wiki', :to => 'wikis#edit', :via => :post
|
|
|
|
match 'projects/:id/wiki/destroy', :to => 'wikis#destroy', :via => [:get, :post]
|
|
|
|
|
|
|
|
# boards
|
|
|
|
match 'boards/:board_id/topics/new', :to => 'messages#new', :via => [:get, :post], :as => 'new_board_message'
|
|
|
|
get 'boards/:board_id/topics/:id', :to => 'messages#show', :as => 'board_message'
|
|
|
|
match 'boards/:board_id/topics/quote/:id', :to => 'messages#quote', :via => [:get, :post]
|
|
|
|
get 'boards/:board_id/topics/:id/edit', :to => 'messages#edit'
|
|
|
|
|
|
|
|
post 'boards/:board_id/topics/preview', :to => 'messages#preview', :as => 'preview_board_message'
|
|
|
|
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'
|
|
|
|
# boards end
|
|
|
|
post 'bids/homework_destroy', :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'
|
|
|
|
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
|
|
|
|
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]
|
|
|
|
match '/journals/destroy/:id', :to => 'journals#destroy', :id => /\d+/, :via => [:get, :post]
|
|
|
|
|
|
|
|
get '/projects/:project_id/issues/gantt', :to => 'gantts#show', :as => 'project_gantt'
|
|
|
|
get '/issues/gantt', :to => 'gantts#show'
|
|
|
|
|
|
|
|
get '/projects/:project_id/issues/calendar', :to => 'calendars#show', :as => 'project_calendar'
|
|
|
|
get '/issues/calendar', :to => 'calendars#show'
|
|
|
|
|
|
|
|
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'
|
|
|
|
post '/users/:id/user_activities', :to => 'users#show', :as => "user_activities"
|
2014-05-12 18:46:39 +08:00
|
|
|
|
2014-04-15 16:57:19 +08:00
|
|
|
#added by young
|
2014-05-12 18:46:39 +08:00
|
|
|
resources :users do
|
2014-05-28 14:43:20 +08:00
|
|
|
collection do
|
|
|
|
match "tag_saveEx" , via: [:get, :post]
|
|
|
|
end
|
2014-04-15 16:57:19 +08:00
|
|
|
member do
|
|
|
|
match 'user_projects', :to => 'users#user_projects', :via => :get
|
2014-07-21 14:53:45 +08:00
|
|
|
match 'user_activities', :to => 'users#user_activities', :via => :get, :as => "user_activities"
|
2014-05-12 18:46:39 +08:00
|
|
|
match 'user_newfeedback', :to => 'users#user_newfeedback', :via => :get, :as => "user_newfeedback"
|
|
|
|
match 'watch_calls', :controller => 'users', :action => 'watch_bids', :via => [:get , :post]
|
2014-04-15 16:57:19 +08:00
|
|
|
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
|
|
|
|
match 'user_courses', :to => 'users#user_courses', :via => :get
|
|
|
|
match 'user_homeworks', :to => 'users#user_homeworks', :via => :get
|
2014-05-12 18:46:39 +08:00
|
|
|
match 'watch_projects', :to => 'users#watch_projects', :via => :get
|
|
|
|
# added by bai
|
2014-04-15 16:57:19 +08:00
|
|
|
match 'show_score', :to => 'users#show_score', :via => :get
|
|
|
|
match 'topic_score_index', :controller => 'users', :action => '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
|
|
|
|
|
2014-06-16 17:50:28 +08:00
|
|
|
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 '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
|
|
|
|
match 'score_new_index', :to => 'users#score_new_index', :via => :get
|
2014-06-21 15:34:10 +08:00
|
|
|
match 'update_score', :to => 'users#update_score', :via => [:get,:post]
|
2014-06-16 17:50:28 +08:00
|
|
|
|
2014-04-15 16:57:19 +08:00
|
|
|
match 'show_projects_score', :to => 'projects#show_projects_score', :via => [:get, :post]
|
|
|
|
match 'issue_score_index', :to => 'projects#issue_score_index', :via => [:get, :post]
|
|
|
|
match 'news_score_index', :to => 'projects#news_score_index', :via => [:get, :post]
|
|
|
|
match 'file_score_index', :to => 'projects#file_score_index', :via => [:get, :post]
|
|
|
|
match 'code_submit_score_index', :to => 'projects#code_submit_score_index', :via => [:get, :post]
|
|
|
|
match 'projects_topic_score_index', :to => 'projects#projects_topic_score_index', :via => [:get, :post]
|
2014-05-12 18:46:39 +08:00
|
|
|
# end
|
2014-04-15 16:57:19 +08:00
|
|
|
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
|
2014-05-12 18:46:39 +08:00
|
|
|
#match 'user/:id/watch_calls', :controller => 'users', :action => 'watch_bids', :via => [:get , :post]
|
|
|
|
|
2014-04-15 16:57:19 +08:00
|
|
|
#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
|
|
|
|
|
|
|
|
resources :users
|
|
|
|
match 'users/:id/memberships/:membership_id', :to => 'users#edit_membership', :via => :put, :as => 'user_membership'
|
|
|
|
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'
|
2014-05-28 14:43:20 +08:00
|
|
|
match 'users/tag_saveEx', :to => 'users#tag_saveEx', :via => [:get, :post]
|
2014-04-15 16:57:19 +08:00
|
|
|
|
|
|
|
post 'watchers/watch', :to => 'watchers#watch', :as => 'watch'
|
|
|
|
delete 'watchers/watch', :to => 'watchers#unwatch'
|
|
|
|
get 'watchers/new', :to => 'watchers#new'
|
|
|
|
post 'watchers', :to => 'watchers#create'
|
|
|
|
post 'watchers/append', :to => 'watchers#append'
|
|
|
|
delete 'watchers', :to => 'watchers#destroy'
|
|
|
|
get 'watchers/autocomplete_for_user', :to => 'watchers#autocomplete_for_user'
|
|
|
|
# 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'
|
|
|
|
|
2014-05-21 16:45:11 +08:00
|
|
|
post 'appliedproject/applied', :to => 'applied_project#applied_join_project', :as => 'appliedproject'
|
|
|
|
delete 'appliedproject/applied', :to => 'applied_project#unapplied_join_project'
|
|
|
|
|
2014-04-15 16:57:19 +08:00
|
|
|
resources :bids, :only=>[:edit,:update,:show] do
|
|
|
|
member do
|
|
|
|
match 'homework_ajax_modal'
|
|
|
|
end
|
|
|
|
end
|
|
|
|
resources :projects do
|
|
|
|
member do
|
|
|
|
get 'settings(/:tab)', :action => 'settings', :as => 'settings'
|
|
|
|
#by young
|
|
|
|
get 'member', :controller => 'projects', :action => '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
|
|
|
|
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'
|
|
|
|
post 'unarchive'
|
|
|
|
post 'close'
|
|
|
|
post 'reopen'
|
|
|
|
match 'copy', :via => [:get, :post]
|
|
|
|
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 '/investor', :controller => 'projects', :action => 'investor', :as => 'investor', :via => :get
|
|
|
|
match '/homework', :controller => 'projects', :action => '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
|
2014-05-12 18:46:39 +08:00
|
|
|
match '/watcherlist', :controller=>'projects', :action=> 'watcherlist', :as => 'watcherlist', :via => :get #add by huang
|
2014-04-15 16:57:19 +08:00
|
|
|
# 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
|
|
|
|
get 'autocomplete'
|
2014-05-22 11:58:43 +08:00
|
|
|
get 'appliedproject'
|
2014-04-15 16:57:19 +08:00
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
resource :enumerations, :controller => 'project_enumerations', :only => [:update, :destroy]
|
|
|
|
|
|
|
|
get 'issues/:copy_from/copy', :to => 'issues#new', :as => 'copy_issue'
|
|
|
|
resources :issues, :only => [:index, :new, :create] do
|
|
|
|
resources :time_entries, :controller => 'timelog' do
|
|
|
|
collection do
|
|
|
|
get 'report'
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
# issue form update
|
|
|
|
match 'issues/update_form', :controller => 'issues', :action => 'update_form', :via => [:put, :post], :as => 'issue_form'
|
|
|
|
|
2014-05-13 11:54:21 +08:00
|
|
|
resources :files, :only => [:index, :new, :create] do
|
|
|
|
collection do
|
|
|
|
match "getattachtype" , via: [:get, :post]
|
2014-05-27 09:01:36 +08:00
|
|
|
#match 'getattachtype/:attachtype', :to => 'files#getattachtype', via: [:get, :post]
|
2014-05-13 11:54:21 +08:00
|
|
|
end
|
|
|
|
end
|
2014-04-15 16:57:19 +08:00
|
|
|
|
|
|
|
resources :versions, :except => [:index, :show, :edit, :update, :destroy] do
|
|
|
|
collection do
|
|
|
|
put 'close_completed'
|
|
|
|
end
|
|
|
|
end
|
|
|
|
get 'versions.:format', :to => 'versions#index'
|
|
|
|
get 'roadmap', :to => 'versions#index', :format => false
|
|
|
|
get 'versions', :to => 'versions#index'
|
|
|
|
|
|
|
|
resources :news, :except => [:show, :edit, :update, :destroy]
|
|
|
|
resources :time_entries, :controller => 'timelog' do
|
|
|
|
get 'report', :on => :collection
|
|
|
|
end
|
|
|
|
resources :queries, :only => [:new, :create]
|
|
|
|
resources :issue_categories, :shallow => true
|
|
|
|
resources :documents, :except => [:show, :edit, :update, :destroy]
|
|
|
|
resources :boards
|
|
|
|
resources :repositories, :shallow => true, :except => [:index, :show] do
|
|
|
|
member do
|
|
|
|
match 'committers', :via => [:get, :post]
|
|
|
|
end
|
|
|
|
end
|
|
|
|
resources :repositories, :except => [:index, :show] do
|
|
|
|
member do
|
|
|
|
get 'newrepo', :via => [:get, :post]
|
2014-05-12 18:46:39 +08:00
|
|
|
# get 'create', :via=>[:get, :post]
|
2014-04-15 16:57:19 +08:00
|
|
|
end
|
|
|
|
end
|
|
|
|
match 'wiki/index', :controller => 'wiki', :action => 'index', :via => :get
|
|
|
|
resources :wiki, :except => [:index, :new, :create], :as => 'wiki_page' do
|
|
|
|
member do
|
|
|
|
get 'rename'
|
|
|
|
post 'rename'
|
|
|
|
get 'history'
|
|
|
|
get 'diff'
|
|
|
|
match 'preview', :via => [:post, :put]
|
|
|
|
post 'protect'
|
|
|
|
post 'add_attachment'
|
|
|
|
end
|
|
|
|
collection do
|
|
|
|
get 'export'
|
|
|
|
get 'date_index'
|
|
|
|
end
|
|
|
|
end
|
|
|
|
match 'wiki', :controller => 'wiki', :action => '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'
|
|
|
|
get 'wiki/:id/:version/diff', :to => 'wiki#diff'
|
|
|
|
end
|
|
|
|
|
|
|
|
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
|
|
|
|
resources :relations, :shallow => true, :controller => 'issue_relations', :only => [:index, :show, :create, :destroy]
|
|
|
|
end
|
|
|
|
match '/issues', :controller => 'issues', :action => 'destroy', :via => :delete
|
|
|
|
|
|
|
|
resources :queries, :except => [:show]
|
|
|
|
|
|
|
|
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
|
|
|
|
|
|
|
|
resources :versions, :only => [:show, :edit, :update, :destroy] do
|
|
|
|
post 'status_by', :on => :member
|
|
|
|
end
|
|
|
|
|
|
|
|
resources :documents, :only => [:show, :edit, :update, :destroy] do
|
|
|
|
post 'add_attachment', :on => :member
|
|
|
|
end
|
|
|
|
|
|
|
|
match '/time_entries/context_menu', :to => 'context_menus#time_entries', :as => :time_entries_context_menu, :via => [:get, :post]
|
|
|
|
|
|
|
|
resources :time_entries, :controller => 'timelog', :except => :destroy do
|
|
|
|
collection do
|
|
|
|
get 'report'
|
|
|
|
get 'bulk_edit'
|
|
|
|
post 'bulk_update'
|
|
|
|
end
|
|
|
|
end
|
|
|
|
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
|
|
|
|
|
|
|
|
get 'projects/:id/activity', :to => 'activities#index'
|
|
|
|
get 'projects/:id/activity.:format', :to => 'activities#index'
|
|
|
|
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'
|
|
|
|
|
|
|
|
get 'projects/:id/repository/:repository_id/changes(/*path(.:ext))', :to => 'repositories#changes'
|
|
|
|
|
|
|
|
get 'projects/:id/repository/:repository_id/revisions/:rev', :to => 'repositories#revision'
|
|
|
|
get 'projects/:id/repository/:repository_id/revision', :to => 'repositories#revision'
|
|
|
|
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'
|
|
|
|
get 'projects/:id/repository/:repository_id/revisions/:rev/:action(/*path(.:ext))',
|
|
|
|
:controller => 'repositories',
|
|
|
|
:format => false,
|
|
|
|
:constraints => {
|
|
|
|
:action => /(browse|show|entry|raw|annotate|diff)/,
|
|
|
|
:rev => /[a-z0-9\.\-_]+/
|
|
|
|
}
|
|
|
|
|
|
|
|
get 'projects/:id/repository/statistics', :to => 'repositories#stats'
|
|
|
|
get 'projects/:id/repository/graph', :to => 'repositories#graph'
|
|
|
|
|
|
|
|
get 'projects/:id/repository/changes(/*path(.:ext))', :to => 'repositories#changes'
|
|
|
|
|
|
|
|
get 'projects/:id/repository/revisions', :to => 'repositories#revisions'
|
|
|
|
get 'projects/:id/repository/revisions/:rev', :to => 'repositories#revision'
|
|
|
|
get 'projects/:id/repository/revision', :to => 'repositories#revision'
|
|
|
|
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'
|
|
|
|
get 'projects/:id/repository/revisions/:rev/:action(/*path(.:ext))',
|
|
|
|
:controller => 'repositories',
|
|
|
|
:format => false,
|
|
|
|
:constraints => {
|
|
|
|
:action => /(browse|show|entry|raw|annotate|diff)/,
|
|
|
|
:rev => /[a-z0-9\.\-_]+/
|
|
|
|
}
|
|
|
|
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)/
|
|
|
|
|
|
|
|
get 'projects/:id/repository/:repository_id', :to => 'repositories#show', :path => nil
|
|
|
|
get 'projects/:id/repository', :to => 'repositories#show', :path => nil
|
|
|
|
|
|
|
|
# additional routes for having the file name at the end of url
|
|
|
|
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+/
|
|
|
|
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]
|
|
|
|
post 'attachments/relationfile', to: 'attachments#add_exist_file_to_project', as: 'attach_relation'
|
2014-07-02 09:11:45 +08:00
|
|
|
post 'attachments/courserelationfile', to: 'attachments#add_exist_file_to_course', as: 'course_attach_relation'
|
2014-05-17 14:07:57 +08:00
|
|
|
get 'attachments/renderTag/:attchmentId', :to => 'attachments#renderTag', :attchmentId => /\d+/
|
2014-05-14 15:16:11 +08:00
|
|
|
resources :attachments, :only => [:show, :destroy] do
|
|
|
|
collection do
|
|
|
|
match "updateType" , via: [:get, :post]
|
2014-07-11 09:07:09 +08:00
|
|
|
match "updateFileDense" , via: [:get, :post]
|
2014-05-17 14:07:57 +08:00
|
|
|
match "renderTag" , via: [:get, :post]
|
2014-05-27 09:01:36 +08:00
|
|
|
end
|
|
|
|
end
|
2014-04-15 16:57:19 +08:00
|
|
|
|
|
|
|
resources :groups do
|
|
|
|
member do
|
|
|
|
get 'autocomplete_for_user'
|
|
|
|
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
|
|
|
|
|
|
|
|
resources :trackers, :except => :show do
|
|
|
|
collection do
|
|
|
|
match 'fields', :via => [:get, :post]
|
|
|
|
end
|
|
|
|
end
|
|
|
|
resources :issue_statuses, :except => :show do
|
|
|
|
collection do
|
|
|
|
post 'update_issue_done_ratio'
|
|
|
|
end
|
|
|
|
end
|
|
|
|
resources :custom_fields, :except => :show
|
|
|
|
resources :roles do
|
|
|
|
collection do
|
|
|
|
match 'permissions', :via => [:get, :post]
|
|
|
|
end
|
|
|
|
end
|
|
|
|
resources :enumerations, :except => :show
|
|
|
|
match 'enumerations/:type', :to => 'enumerations#index', :via => :get
|
|
|
|
|
|
|
|
get 'projects/:id/search', :controller => 'search', :action => 'index'
|
|
|
|
get 'search', :controller => 'search', :action => 'index'
|
|
|
|
|
|
|
|
match 'mail_handler', :controller => 'mail_handler', :action => 'index', :via => :post
|
2014-06-03 16:58:32 +08:00
|
|
|
match 'mail_handler/cancel/:id', :controller => 'mail_handler', :action => 'cancel_mail_notify',:via => :get
|
2014-04-15 16:57:19 +08:00
|
|
|
|
|
|
|
match 'admin', :controller => 'admin', :action => 'index', :via => :get
|
|
|
|
match 'admin/projects', :controller => 'admin', :action => 'projects', :via => :get
|
2014-05-23 11:50:36 +08:00
|
|
|
match 'admin/users', :controller => 'admin', :action => 'users', :via => :get
|
2014-07-10 17:38:04 +08:00
|
|
|
match 'admin/first_page_made',:controller => 'admin',:action => 'first_page_made',:via => [:get,:post]
|
2014-07-11 11:41:54 +08:00
|
|
|
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]
|
2014-05-26 16:25:53 +08:00
|
|
|
match 'admin/search', :controller => 'admin', :action => 'search', :via => [:get, :post]
|
2014-04-15 16:57:19 +08:00
|
|
|
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
|
|
|
|
get 'test_connection', :as => 'try_connection'
|
|
|
|
end
|
|
|
|
collection do
|
|
|
|
get 'autocomplete_for_new_user'
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
2014-07-03 15:24:06 +08:00
|
|
|
match 'courses/search', :to => 'courses#search'
|
2014-07-21 16:19:45 +08:00
|
|
|
match '/contests/search', :controller => 'contests', :action => 'search', :via => [:get, :post]
|
2014-05-29 15:21:22 +08:00
|
|
|
# add by nwb
|
|
|
|
# 课程路由设置
|
2014-05-29 16:35:34 +08:00
|
|
|
resources :courses do
|
2014-05-29 15:21:22 +08:00
|
|
|
member do
|
2014-06-04 16:45:20 +08:00
|
|
|
get 'settings(/:tab)', :action => 'settings', :as => 'settings'
|
2014-06-04 17:06:28 +08:00
|
|
|
get 'homework', :action => 'homework', :as => 'homework'
|
|
|
|
get 'new_homework', :action => 'new_homework', :as => 'new_homework'
|
2014-06-05 15:20:09 +08:00
|
|
|
get 'file', :action => 'file', :as => 'file'
|
2014-06-26 14:47:29 +08:00
|
|
|
get 'feedback', :action => 'feedback', :as => 'course_feedback'
|
2014-06-12 14:57:25 +08:00
|
|
|
get 'member', :controller => 'courses', :action => 'member', :as => 'member'
|
2014-05-29 15:21:22 +08:00
|
|
|
post 'finishcourse'
|
|
|
|
post 'restartcourse'
|
2014-06-05 15:20:09 +08:00
|
|
|
end
|
2014-06-12 14:57:25 +08:00
|
|
|
match '/member', :controller => 'courses', :action => 'member', :as => 'member', :via => :get
|
2014-06-09 14:23:31 +08:00
|
|
|
resources :boards
|
2014-06-05 15:20:09 +08:00
|
|
|
resources :files, :only => [:index, :new, :create] do
|
|
|
|
collection do
|
2014-06-09 14:23:31 +08:00
|
|
|
match "getattachtype", via: [:get, :post]
|
|
|
|
end
|
|
|
|
end
|
|
|
|
resources :memberships, :shallow => true, :controller => 'members', :only => [:index, :show, :new, :create, :update, :destroy] do
|
|
|
|
collection do
|
|
|
|
get 'autocomplete'
|
|
|
|
get 'appliedproject'
|
2014-06-05 15:20:09 +08:00
|
|
|
end
|
|
|
|
end
|
2014-06-11 17:51:14 +08:00
|
|
|
resources :news, :except => [:show, :edit, :update, :destroy]
|
2014-06-12 09:44:22 +08:00
|
|
|
resources :boards
|
2014-06-17 11:32:41 +08:00
|
|
|
match '/homework', :controller => 'courses', :action => 'homework', :as => 'homework', :via => :get
|
2014-06-09 14:23:31 +08:00
|
|
|
end # end of resources :courses
|
2014-06-05 15:42:49 +08:00
|
|
|
match 'courses/:id/feedback', :to => 'courses#feedback', :via => :get, :as => 'course_feedback'
|
2014-06-03 09:39:33 +08:00
|
|
|
match '/courses/search', :controller => 'courses', :action => 'search', :via => [:get, :post]
|
2014-06-12 11:34:47 +08:00
|
|
|
match 'words/:id/leave_course_message', :controller => 'words', :action => 'leave_course_message'
|
2014-05-29 15:21:22 +08:00
|
|
|
|
|
|
|
|
2014-04-15 16:57:19 +08:00
|
|
|
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 '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 'sys/projects', :to => '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 'uploads', :to => 'attachments#upload', :via => :post
|
|
|
|
# Added by Tao
|
2014-05-12 18:46:39 +08:00
|
|
|
match 'upload_avatar', :to => 'avatar#upload', :via => :post
|
2014-07-15 16:13:50 +08:00
|
|
|
match 'delete_avatar', :to => 'avatar#delete_image',:via => :post
|
2014-04-15 16:57:19 +08:00
|
|
|
# Endof Tao's code
|
|
|
|
get 'robots.txt', :to => 'welcome#robots'
|
2014-05-12 18:46:39 +08:00
|
|
|
|
2014-04-15 16:57:19 +08:00
|
|
|
##############测试留言功能 fq
|
|
|
|
post 'words/new', :to => 'words#new'
|
|
|
|
post 'words/create', :to => 'words#create'
|
|
|
|
post 'words/append', :to => 'words#append'
|
|
|
|
post 'words/create_reply', :to => 'words#create_reply'
|
|
|
|
delete 'words/destroy', :to => 'words#destroy'
|
|
|
|
get 'words/more', :to => 'words#more'
|
|
|
|
get 'words/back', :to=> 'words#back'
|
|
|
|
############## fq
|
|
|
|
post 'calls/create', :to => 'bids#create'
|
|
|
|
delete 'calls/destroy', :to => 'bids#destroy'
|
|
|
|
match 'calls/new', :controller => 'bids', :action => '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'
|
2014-06-17 15:06:31 +08:00
|
|
|
match 'calls/:id/show_course', :controller => 'bids', :action => 'show_courseEx', :as => 'course_for_bid' # nwb added
|
2014-06-03 15:47:00 +08:00
|
|
|
match 'calls/:id/new_exercise_book', :controller => 'homework_attach', :action => 'new', :as => 'new_homework_attach'
|
2014-04-15 16:57:19 +08:00
|
|
|
match 'calls/:id/add', :controller => 'bids', :action => 'add'
|
2014-05-15 10:50:46 +08:00
|
|
|
match 'calls/:id/delete', :controller => 'bids', :action => 'delete'
|
2014-04-15 16:57:19 +08:00
|
|
|
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'
|
2014-05-12 18:46:39 +08:00
|
|
|
|
2014-04-15 16:57:19 +08:00
|
|
|
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'
|
2014-05-29 15:21:22 +08:00
|
|
|
|
2014-04-15 16:57:19 +08:00
|
|
|
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'
|
2014-05-12 18:46:39 +08:00
|
|
|
|
2014-04-15 16:57:19 +08:00
|
|
|
match 'project/:id/share', :to => 'projects#share', :as => 'share_show' #share
|
2014-05-12 18:46:39 +08:00
|
|
|
|
|
|
|
post 'join_in/join', :to => 'courses#join', :as => 'join'
|
2014-04-15 16:57:19 +08:00
|
|
|
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
|
2014-05-12 18:46:39 +08:00
|
|
|
|
2014-04-15 16:57:19 +08:00
|
|
|
delete 'attachment/:id', :to => 'attachments#delete_homework'
|
2014-06-16 17:14:05 +08:00
|
|
|
match 'new_join', :to => 'courses#new_join', :as => 'try_join'
|
2014-04-15 16:57:19 +08:00
|
|
|
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]
|
2014-05-29 15:21:22 +08:00
|
|
|
|
2014-05-12 18:46:39 +08:00
|
|
|
|
2014-04-15 16:57:19 +08:00
|
|
|
#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'
|
|
|
|
|
|
|
|
# added by young
|
|
|
|
match 'calls', :controller => 'bids', :action => 'index'
|
2014-05-12 18:46:39 +08:00
|
|
|
|
2014-04-15 16:57:19 +08:00
|
|
|
match 'calls/:id', :controller => 'bids', :action => 'show', :as => 'respond'
|
2014-04-18 16:03:52 +08:00
|
|
|
match 'contest', :controller => 'bids', :action => 'contests', :as => 'contest' #modified @20140403
|
2014-05-12 18:46:39 +08:00
|
|
|
|
2014-04-15 16:57:19 +08:00
|
|
|
########################
|
|
|
|
##added by wen##########
|
|
|
|
#######confusing########
|
2014-05-27 08:32:43 +08:00
|
|
|
get 'welcome/search', to: 'welcome#search'
|
|
|
|
get 'school/index', to: 'school#index'
|
2014-07-05 11:00:01 +08:00
|
|
|
get 'school/:school_id', to: 'welcome#course', :as => 'school_course_list'
|
2014-07-01 17:49:12 +08:00
|
|
|
#get 'course/:school_id', to: 'welcome#course'
|
2014-04-15 16:57:19 +08:00
|
|
|
post 'school/get_options/:province', :to => 'school#get_options'
|
|
|
|
get 'school/get_options/:province', :to => 'school#get_options'
|
2014-04-30 20:26:15 +08:00
|
|
|
|
|
|
|
post 'school/get_province', :to => 'school#get_province'
|
|
|
|
get 'school/get_province', :to => 'school#get_province'
|
2014-05-27 09:01:36 +08:00
|
|
|
|
2014-04-23 21:20:03 +08:00
|
|
|
post 'school/get_schoollist/:province', :to => 'school#get_schoollist'
|
|
|
|
get 'school/get_schoollist/:province', :to => 'school#get_schoollist'
|
2014-05-27 09:01:36 +08:00
|
|
|
|
2014-04-24 08:58:24 +08:00
|
|
|
post 'school/search_school/', :to => 'school#search_school'
|
|
|
|
get 'school/search_school/', :to => 'school#search_school'
|
2014-05-27 09:01:36 +08:00
|
|
|
|
2014-04-28 16:13:37 +08:00
|
|
|
post 'school/upload', :to => 'school#upload'
|
2014-06-13 16:37:38 +08:00
|
|
|
get 'school/upload_logo', :to => 'school#upload_logo'
|
2014-05-27 09:01:36 +08:00
|
|
|
|
2014-04-15 16:57:19 +08:00
|
|
|
######added by nie
|
|
|
|
match 'tags/show_projects_tags',:to => '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"
|
2014-05-12 18:46:39 +08:00
|
|
|
|
2014-04-15 16:57:19 +08:00
|
|
|
match 'words/add_brief_introdution', :controller => 'words', :action => 'add_brief_introdution'
|
|
|
|
|
2014-04-21 15:41:51 +08:00
|
|
|
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
|
2014-04-15 16:57:19 +08:00
|
|
|
end
|