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.
|
|
|
|
|
2014-09-12 16:45:03 +08:00
|
|
|
# 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
|
|
|
|
|
2014-04-15 16:57:19 +08:00
|
|
|
RedmineApp::Application.routes.draw do
|
2014-11-27 19:43:04 +08:00
|
|
|
mount Mobile::API => '/api'
|
|
|
|
|
2015-07-01 22:54:07 +08:00
|
|
|
# Enable Grack support
|
2015-08-26 20:37:43 +08:00
|
|
|
# mount Trustie::Grack.new, at: '/', constraints: lambda { |request| /[-\/\w\.]+\.git\//.match(request.path_info) }, via: [:get, :post]
|
2015-07-01 22:54:07 +08:00
|
|
|
|
2016-02-02 12:40:00 +08:00
|
|
|
constraints(Subdomain.new) do
|
|
|
|
get '/', to: 'organizations#show'
|
|
|
|
end
|
|
|
|
|
|
|
|
constraints(Subdomain.new(sub: true)) do
|
|
|
|
get '/:sub_dir_name', to: 'fake#fake'
|
|
|
|
end
|
|
|
|
|
2016-04-27 10:28:36 +08:00
|
|
|
resources :shield_wechat_messages do
|
|
|
|
collection do
|
|
|
|
delete 'show_messages'
|
|
|
|
end
|
|
|
|
end
|
2016-01-08 14:42:21 +08:00
|
|
|
resources :shield_activities do
|
|
|
|
collection do
|
|
|
|
delete 'show_acts'
|
|
|
|
end
|
|
|
|
end
|
2015-11-05 17:57:07 +08:00
|
|
|
resources :organizations do
|
2016-04-01 00:27:34 +08:00
|
|
|
resource :files do
|
|
|
|
member do
|
|
|
|
|
|
|
|
end
|
|
|
|
collection do
|
|
|
|
|
|
|
|
end
|
|
|
|
end
|
2016-01-14 17:52:48 +08:00
|
|
|
resources :org_document_comments do
|
|
|
|
member do
|
|
|
|
|
|
|
|
end
|
|
|
|
collection do
|
|
|
|
|
|
|
|
end
|
|
|
|
end
|
2015-11-05 17:57:07 +08:00
|
|
|
member do
|
2016-01-29 18:43:14 +08:00
|
|
|
get 'edit'
|
2015-11-05 17:57:07 +08:00
|
|
|
get 'setting'#, :action => 'settings', :as => 'settings'
|
|
|
|
get 'clear_org_avatar_temp'
|
2015-11-12 09:32:00 +08:00
|
|
|
put 'set_homepage'
|
2015-11-30 16:04:43 +08:00
|
|
|
put 'cancel_homepage'
|
2015-11-12 20:57:41 +08:00
|
|
|
get 'members'
|
2016-10-09 09:02:12 +08:00
|
|
|
get 'more_org_submains'
|
2015-11-14 10:45:49 +08:00
|
|
|
get 'more_org_projects'
|
2015-11-18 16:05:08 +08:00
|
|
|
get 'more_org_courses'
|
2015-11-26 16:29:50 +08:00
|
|
|
get 'search_courses'
|
2016-05-12 15:02:23 +08:00
|
|
|
get 'teachers'
|
2016-05-31 10:31:08 +08:00
|
|
|
get 'students'
|
2016-06-01 17:38:41 +08:00
|
|
|
get 'projects'
|
|
|
|
get 'courses'
|
|
|
|
get 'acts'
|
2015-11-26 16:29:50 +08:00
|
|
|
post 'join_course_menu'
|
|
|
|
post 'join_courses'
|
2015-11-27 09:50:17 +08:00
|
|
|
get 'search_projects'
|
|
|
|
post 'join_project_menu'
|
|
|
|
post 'join_projects'
|
2015-12-07 15:52:13 +08:00
|
|
|
post 'logout'
|
2016-01-05 16:46:06 +08:00
|
|
|
post 'apply_subdomain'
|
2015-12-29 17:13:01 +08:00
|
|
|
get 'org_resources_subfield'
|
2016-01-13 16:21:37 +08:00
|
|
|
get '/:sub_dir_name', :to => 'org_subfields#show', :as => 'show_org_subfield'
|
2015-11-05 17:57:07 +08:00
|
|
|
end
|
|
|
|
collection do
|
|
|
|
get 'check_uniq'
|
2016-01-18 10:43:22 +08:00
|
|
|
get 'check_uniq_domain'
|
2015-11-12 09:32:00 +08:00
|
|
|
get 'autocomplete_search'
|
2015-12-31 13:26:28 +08:00
|
|
|
post 'hide_org_subfield'
|
|
|
|
post 'show_org_subfield'
|
2016-05-13 09:53:22 +08:00
|
|
|
post 'set_excellent_teacher'
|
2016-05-31 10:31:08 +08:00
|
|
|
post 'set_excellent_student'
|
2016-05-13 09:53:22 +08:00
|
|
|
post 'reset_excellent_teacher'
|
2016-05-31 10:31:08 +08:00
|
|
|
post 'reset_excellent_student'
|
2016-01-05 16:46:06 +08:00
|
|
|
post 'agree_apply_subdomain'
|
2016-06-01 17:38:41 +08:00
|
|
|
post 'update_field_by_admin'
|
|
|
|
post 'reset_update_field_by_admin'
|
2015-11-12 09:32:00 +08:00
|
|
|
end
|
2015-11-05 17:57:07 +08:00
|
|
|
end
|
|
|
|
|
2016-01-18 11:06:08 +08:00
|
|
|
|
2015-12-30 13:14:32 +08:00
|
|
|
|
2016-01-22 09:25:58 +08:00
|
|
|
|
2015-11-05 17:57:07 +08:00
|
|
|
resources :org_member do
|
|
|
|
member do
|
|
|
|
|
|
|
|
end
|
|
|
|
collection do
|
|
|
|
get 'org_member_autocomplete'
|
2016-09-02 13:25:01 +08:00
|
|
|
get 'org_member_paging'
|
2016-06-27 15:47:06 +08:00
|
|
|
get 'deleteOrgMember'
|
2015-11-05 17:57:07 +08:00
|
|
|
end
|
|
|
|
end
|
2015-11-03 11:19:38 +08:00
|
|
|
|
2015-12-04 17:34:48 +08:00
|
|
|
resources :org_subfields do
|
2015-12-11 16:30:50 +08:00
|
|
|
resources :files, :only => [:index, :new, :create] do
|
|
|
|
collection do
|
|
|
|
match "getattachtype", :via => [:get, :post]
|
2015-12-14 10:26:34 +08:00
|
|
|
match "search_files_in_subfield",:via => [:post,:get]
|
2015-12-11 16:30:50 +08:00
|
|
|
match "searchone4reload",:via => [:post,:get]
|
2015-12-15 17:30:24 +08:00
|
|
|
match "search_org_subfield_tag_attachment", :via => [:post,:get]
|
2015-12-14 16:41:18 +08:00
|
|
|
match "subfield_upload_file", :via => :post
|
2015-12-11 16:30:50 +08:00
|
|
|
end
|
|
|
|
member do
|
2015-12-17 14:51:02 +08:00
|
|
|
match "quote_resource_show_org_subfield", :via => [:get]
|
2016-06-16 16:55:25 +08:00
|
|
|
get "update_file_description"
|
2016-10-09 15:09:18 +08:00
|
|
|
post "edit_file_description"
|
2015-12-11 16:30:50 +08:00
|
|
|
end
|
|
|
|
end
|
2016-04-27 17:02:44 +08:00
|
|
|
|
2016-05-05 12:27:35 +08:00
|
|
|
resources :sub_domains, :only => [:index, :new, :create, :show, :update, :destroy] do
|
2016-05-06 14:42:13 +08:00
|
|
|
resources :sub_document_comments, :only => [:index, :new, :create, :show, :update, :destroy, :edit] do
|
2016-04-28 17:36:29 +08:00
|
|
|
member do
|
|
|
|
post 'add_reply'
|
2016-05-03 19:03:28 +08:00
|
|
|
get 'quote'
|
2016-04-28 17:36:29 +08:00
|
|
|
post 'reply'
|
2016-05-03 19:03:28 +08:00
|
|
|
post 'add_reply_in_doc'
|
|
|
|
delete 'delete_reply'
|
2016-05-06 14:42:13 +08:00
|
|
|
match 'edit'
|
2016-04-28 17:36:29 +08:00
|
|
|
end
|
|
|
|
collection do
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
2016-04-27 17:02:44 +08:00
|
|
|
collection do
|
|
|
|
end
|
|
|
|
member do
|
2016-05-05 14:39:27 +08:00
|
|
|
match 'domain_update_sub_dir', :via => [:put]
|
|
|
|
match 'domain_update_priority', :via => [:put]
|
|
|
|
match 'domain_update_status', :via => [:post]
|
2016-05-05 15:16:14 +08:00
|
|
|
post 'hide_sub_domain'
|
|
|
|
post 'show_sub_domain'
|
2016-04-27 17:02:44 +08:00
|
|
|
end
|
|
|
|
end
|
|
|
|
|
2016-01-13 15:17:13 +08:00
|
|
|
member do
|
|
|
|
match 'update_sub_dir', :via => [:put]
|
2016-03-09 18:06:28 +08:00
|
|
|
match 'update_priority', :via => [:put]
|
2016-03-31 15:21:40 +08:00
|
|
|
match 'update_status', :via => [:post]
|
2016-01-13 15:17:13 +08:00
|
|
|
end
|
2015-12-30 15:46:01 +08:00
|
|
|
resource :boards
|
2015-12-04 17:34:48 +08:00
|
|
|
end
|
|
|
|
|
2015-11-12 09:32:00 +08:00
|
|
|
resources :org_document_comments do
|
|
|
|
member do
|
|
|
|
post 'add_reply'
|
2015-11-20 10:52:26 +08:00
|
|
|
get 'quote'
|
|
|
|
post 'reply'
|
|
|
|
post 'add_reply_in_doc'
|
|
|
|
delete 'delete_reply'
|
2015-11-12 09:32:00 +08:00
|
|
|
end
|
|
|
|
collection do
|
|
|
|
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
resources :org_projects do
|
|
|
|
member do
|
|
|
|
|
|
|
|
end
|
|
|
|
collection do
|
|
|
|
|
|
|
|
end
|
|
|
|
end
|
2015-11-17 17:34:50 +08:00
|
|
|
|
|
|
|
resources :org_courses do
|
|
|
|
member do
|
|
|
|
|
|
|
|
end
|
|
|
|
collection do
|
|
|
|
|
|
|
|
end
|
|
|
|
end
|
2015-11-12 09:32:00 +08:00
|
|
|
#match '/organizations/:organization_id/org_document_comments/new', :to => 'org_document_comments#new', :as => 'new_org_documents', :via => [:get, :post]
|
|
|
|
#match '/organizations/:organization_id/org_document_comments/create', :to => 'org_document_comments#create', :as => 'create_org_documents', :via => [:post]
|
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'
|
2015-11-26 09:57:53 +08:00
|
|
|
match 'site_search', :to => 'users#site_search', :as => 'site_search', :via => [:get, :post, :put]
|
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'
|
|
|
|
|
2016-07-20 17:00:18 +08:00
|
|
|
resources :comments do
|
|
|
|
member do
|
|
|
|
post 'reply'
|
|
|
|
get 'quote'
|
|
|
|
end
|
|
|
|
end
|
2015-11-13 15:02:12 +08:00
|
|
|
# resources :organization, :except => [:show] do
|
|
|
|
#
|
|
|
|
# end
|
2015-03-05 14:15:07 +08:00
|
|
|
|
2015-08-29 10:07:36 +08:00
|
|
|
resources :school, :except => [:show] do
|
2015-07-27 18:20:20 +08:00
|
|
|
collection do
|
2016-06-30 16:08:36 +08:00
|
|
|
get 'apply_add_school'
|
|
|
|
get 'search_repeat_schoolname'
|
2015-07-27 18:20:20 +08:00
|
|
|
end
|
|
|
|
|
|
|
|
member do
|
|
|
|
get 'upload_logo'
|
|
|
|
post 'upload'
|
2016-07-29 21:19:09 +08:00
|
|
|
get 'edit_apply_name'
|
|
|
|
get 'edit_apply_address'
|
|
|
|
get 'edit_apply_province'
|
2015-07-27 18:20:20 +08:00
|
|
|
end
|
|
|
|
end
|
|
|
|
|
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-09-12 16:45:03 +08:00
|
|
|
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]
|
2014-10-30 15:12:45 +08:00
|
|
|
get 'get_not_batch_homework'
|
2014-10-30 16:33:14 +08:00
|
|
|
get 'get_batch_homeworks'
|
|
|
|
get 'get_homeworks'
|
|
|
|
get 'get_homework_jours'
|
2014-11-01 11:02:13 +08:00
|
|
|
get 'get_student_batch_homework'
|
|
|
|
get 'get_my_homework'
|
2014-06-11 15:28:13 +08:00
|
|
|
end
|
|
|
|
member do
|
2014-09-12 16:45:03 +08:00
|
|
|
match 'add_homework_users', :via => [:get,:post]
|
|
|
|
match 'destory_homework_users', :via => [:get,:post]
|
2014-11-02 09:39:18 +08:00
|
|
|
get 'praise_homework'
|
2014-05-19 10:00:24 +08:00
|
|
|
end
|
|
|
|
end
|
2014-06-10 17:33:31 +08:00
|
|
|
|
2015-01-13 15:59:02 +08:00
|
|
|
resources :poll do
|
|
|
|
member do
|
|
|
|
get 'statistics_result'
|
2015-01-15 09:41:19 +08:00
|
|
|
post 'commit_answer'
|
2015-01-14 14:23:41 +08:00
|
|
|
post 'create_poll_question'
|
2015-01-15 17:36:30 +08:00
|
|
|
post 'commit_poll'
|
2015-01-16 15:57:49 +08:00
|
|
|
get 'publish_poll'
|
2016-10-15 15:16:21 +08:00
|
|
|
get 'save_poll'
|
2015-01-20 11:42:28 +08:00
|
|
|
get 'republish_poll'
|
2015-01-21 17:51:12 +08:00
|
|
|
get 'poll_result'
|
2015-01-27 09:45:15 +08:00
|
|
|
get 'close_poll'
|
2015-06-09 17:03:28 +08:00
|
|
|
get 'export_poll'
|
2015-07-29 10:10:41 +08:00
|
|
|
get 'import_poll'
|
2016-10-27 18:25:47 +08:00
|
|
|
post 'update_question_num'
|
2015-01-13 15:59:02 +08:00
|
|
|
end
|
2015-01-15 17:15:29 +08:00
|
|
|
collection do
|
|
|
|
delete 'delete_poll_question'
|
2015-01-15 18:17:45 +08:00
|
|
|
post 'update_poll_question'
|
2015-08-10 09:12:26 +08:00
|
|
|
get 'other_poll'
|
|
|
|
post 'import_other_poll'
|
2015-01-15 17:15:29 +08:00
|
|
|
end
|
2015-01-13 15:59:02 +08:00
|
|
|
end
|
2015-01-12 16:02:15 +08:00
|
|
|
|
2015-11-13 16:40:39 +08:00
|
|
|
#show、index、new、create、edit、update、destroy路由自动生成
|
|
|
|
resources :exercise do
|
|
|
|
member do #生成路径为 /exercise/:id/方法名
|
2015-11-13 17:23:52 +08:00
|
|
|
get 'statistics_result'
|
2015-11-17 09:33:40 +08:00
|
|
|
get 'student_exercise_list'
|
2015-11-13 17:23:52 +08:00
|
|
|
get 'export_exercise'
|
2015-11-19 20:35:08 +08:00
|
|
|
get 'publish_exercise'
|
|
|
|
get 'republish_exercise'
|
2015-11-27 15:19:13 +08:00
|
|
|
get 'show_student_result'
|
2015-11-17 18:33:42 +08:00
|
|
|
post 'create_exercise_question'
|
2015-11-18 21:16:24 +08:00
|
|
|
post 'commit_answer'
|
|
|
|
post 'commit_exercise'
|
2015-11-13 16:40:39 +08:00
|
|
|
end
|
|
|
|
|
|
|
|
collection do #生成路径为 /exercise/方法名
|
2015-11-18 16:51:47 +08:00
|
|
|
delete 'delete_exercise_question'
|
2015-11-18 17:56:01 +08:00
|
|
|
post 'update_exercise_question'
|
2015-11-13 16:40:39 +08:00
|
|
|
end
|
|
|
|
end
|
|
|
|
|
2015-05-19 17:12:43 +08:00
|
|
|
resources :homework_common, :except => [:show]do
|
|
|
|
member do
|
|
|
|
get 'start_anonymous_comment'
|
|
|
|
get 'stop_anonymous_comment'
|
|
|
|
get 'alert_anonymous_comment'
|
2015-11-04 10:54:09 +08:00
|
|
|
get 'alert_forbidden_anonymous_comment'
|
2016-02-25 16:18:24 +08:00
|
|
|
get 'alert_open_student_works'
|
|
|
|
get 'open_student_works'
|
2015-09-23 15:44:48 +08:00
|
|
|
get 'start_evaluation_set'
|
2015-10-23 14:45:56 +08:00
|
|
|
get 'score_rule_set'
|
2015-09-23 15:44:48 +08:00
|
|
|
post 'set_evaluation_attr'
|
2015-05-19 17:12:43 +08:00
|
|
|
end
|
2015-11-04 10:54:09 +08:00
|
|
|
|
2015-05-19 17:12:43 +08:00
|
|
|
collection do
|
2015-06-16 14:45:57 +08:00
|
|
|
post 'next_step'
|
2015-07-30 20:36:00 +08:00
|
|
|
post 'programing_test'
|
2015-05-19 17:12:43 +08:00
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
resources :student_work do
|
|
|
|
member do
|
2015-05-23 11:24:24 +08:00
|
|
|
post 'add_score'
|
2015-12-04 16:21:11 +08:00
|
|
|
post 'revise_attachment'
|
2015-12-01 15:18:14 +08:00
|
|
|
get 'retry_work'
|
2016-05-11 09:18:55 +08:00
|
|
|
get 'add_comments_to_work'
|
2015-05-28 16:10:40 +08:00
|
|
|
get 'praise_student_work'
|
2015-11-04 10:54:09 +08:00
|
|
|
get 'forbidden_anonymous_comment'
|
2015-05-19 17:12:43 +08:00
|
|
|
end
|
|
|
|
collection do
|
2015-05-27 15:11:11 +08:00
|
|
|
post 'add_score_reply'
|
2015-12-08 17:37:15 +08:00
|
|
|
post 'student_work_project'
|
|
|
|
get 'new_student_work_project'
|
2015-12-09 10:29:54 +08:00
|
|
|
get 'search_user_projects'
|
2015-12-11 14:57:09 +08:00
|
|
|
get 'search_course_students'
|
2015-12-09 16:33:48 +08:00
|
|
|
get 'cancel_relate_project'
|
2015-12-01 15:18:14 +08:00
|
|
|
get 'delete_work'
|
2015-05-27 15:11:11 +08:00
|
|
|
get 'destroy_score_reply'
|
2015-06-18 17:56:28 +08:00
|
|
|
get 'student_work_absence_penalty'
|
2015-06-30 15:30:51 +08:00
|
|
|
get 'absence_penalty_list'
|
|
|
|
get 'evaluation_list'
|
2015-09-17 16:53:38 +08:00
|
|
|
# post 'set_program_score'
|
2016-03-25 14:43:51 +08:00
|
|
|
post 'program_test_ex'
|
2016-04-14 11:29:22 +08:00
|
|
|
post 'code_repeattest'
|
|
|
|
post 'last_codecomparetime'
|
2015-09-17 20:20:20 +08:00
|
|
|
post 'set_score_rule'
|
2016-04-15 17:07:38 +08:00
|
|
|
get 'work_canrepeat'
|
2016-06-14 17:36:12 +08:00
|
|
|
get 'get_user_infor'
|
2016-11-01 15:59:00 +08:00
|
|
|
post 'add_group_member'
|
2015-05-19 17:12:43 +08:00
|
|
|
end
|
|
|
|
end
|
|
|
|
|
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
|
2014-09-12 16:45:03 +08:00
|
|
|
match 'search', :via => [:get, :post]
|
|
|
|
match 'remove_condition', :via => [:get, :post]
|
|
|
|
match 'allbug', :via => [:get, :post]
|
2014-05-12 18:46:39 +08:00
|
|
|
end
|
|
|
|
resources :relative_memos
|
|
|
|
member do
|
2014-09-12 16:45:03 +08:00
|
|
|
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]
|
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
|
|
|
|
|
2015-04-02 17:20:52 +08:00
|
|
|
namespace :zipdown do
|
|
|
|
match 'assort'
|
|
|
|
match 'download_user_homework', :as => :download_user_homework
|
|
|
|
match 'download'
|
|
|
|
end
|
2014-05-12 18:46:39 +08:00
|
|
|
namespace :test do
|
|
|
|
match 'courselist'
|
|
|
|
match 'zip'
|
2015-04-23 17:42:03 +08:00
|
|
|
match 'mailer'
|
2015-06-01 23:02:55 +08:00
|
|
|
match 'view_office'
|
2014-05-12 18:46:39 +08:00
|
|
|
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
|
2014-09-12 16:45:03 +08:00
|
|
|
match 'new_message', :via => :get
|
|
|
|
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-09-12 16:45:03 +08:00
|
|
|
match 'create_message' , :via => :post
|
2014-05-12 18:46:39 +08:00
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
## 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
|
2015-09-01 16:37:43 +08:00
|
|
|
resources :notificationcomments
|
2014-06-07 10:02:00 +08:00
|
|
|
end
|
|
|
|
|
2014-05-12 18:46:39 +08:00
|
|
|
collection do
|
2014-09-12 16:45:03 +08:00
|
|
|
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
|
2014-05-12 18:46:39 +08:00
|
|
|
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-09-12 16:45:03 +08:00
|
|
|
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]
|
2014-10-08 14:57:26 +08:00
|
|
|
match 'show_contest_user'
|
2014-10-23 11:30:34 +08:00
|
|
|
get 'watcherlist', :action=> 'watcherlist'
|
2014-05-27 09:01:36 +08:00
|
|
|
end
|
|
|
|
end
|
|
|
|
|
2014-10-13 09:40:49 +08:00
|
|
|
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]
|
|
|
|
match '/contestnotifications/preview', :to => 'previews#contestnotification', :as => 'preview_contestnotifications', :via => [:get, :post, :put]
|
|
|
|
|
2014-04-15 16:57:19 +08:00
|
|
|
resources :stores do
|
|
|
|
collection do
|
2014-09-12 16:45:03 +08:00
|
|
|
match 'search', :via => [:get, :post]
|
2015-07-02 10:41:08 +08:00
|
|
|
get 'lost_file'
|
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]
|
2015-09-18 17:44:16 +08:00
|
|
|
match 'check_forum_name',:via => [:get]
|
2014-04-15 16:57:19 +08:00
|
|
|
end
|
|
|
|
member do
|
|
|
|
post 'create_memo'
|
2015-01-10 15:39:02 +08:00
|
|
|
post 'create_feedback'
|
2014-04-15 16:57:19 +08:00
|
|
|
match 'search_memo', :via => [:get, :post]
|
2015-09-18 17:44:16 +08:00
|
|
|
match 'delete_forum_tag',:via =>[:get]
|
|
|
|
match 'add_forum_tag',:via=>[:get]
|
2014-04-15 16:57:19 +08:00
|
|
|
end
|
|
|
|
resources :memos do
|
|
|
|
collection do
|
|
|
|
get "quote"
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
2015-09-01 16:37:43 +08:00
|
|
|
|
2014-04-15 16:57:19 +08:00
|
|
|
|
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"
|
2016-01-13 16:32:05 +08:00
|
|
|
get "praise_tread/praise_minus"
|
2014-04-15 16:57:19 +08:00
|
|
|
|
|
|
|
get "praise_tread/tread_plus"
|
|
|
|
#end
|
|
|
|
|
|
|
|
root :to => 'welcome#index', :as => 'home'
|
2014-09-12 16:45:03 +08:00
|
|
|
# added by longjun
|
|
|
|
match 'welcome/contest', :via => :get
|
|
|
|
# end longjun
|
|
|
|
|
2014-04-15 16:57:19 +08:00
|
|
|
#added by nie
|
2014-09-12 16:45:03 +08:00
|
|
|
match '/projects/search', :via => [:get, :post]
|
|
|
|
match '/users/search', :via => [:get, :post]
|
2014-04-15 16:57:19 +08:00
|
|
|
#end
|
2015-05-06 11:04:57 +08:00
|
|
|
|
2015-09-09 17:05:32 +08:00
|
|
|
# 消息相关路由
|
|
|
|
resources :system_messages do
|
|
|
|
collection do
|
|
|
|
post 'create', :as => 'system_messages'
|
|
|
|
get 'index', :as => 'index'
|
|
|
|
end
|
|
|
|
end
|
|
|
|
# match 'system_messages/index', to: 'system_messages#index', :via => :get, :as => 'system_messages'
|
|
|
|
|
2015-05-06 11:04:57 +08:00
|
|
|
match 'account/heartbeat', to: 'account#heartbeat', :via => :get
|
2014-04-15 16:57:19 +08:00
|
|
|
match 'login', :to => 'account#login', :as => 'signin', :via => [:get, :post]
|
|
|
|
match 'logout', :to => 'account#logout', :as => 'signout', :via => [:get, :post]
|
2015-08-26 16:31:28 +08:00
|
|
|
match 'agreement',:to => 'account#agreement',:as => 'agreement',:via=>[:get]
|
2015-09-01 15:34:22 +08:00
|
|
|
match 'about_us',:to=>'account#about_us',:as=>'about_us',:via=>[:get]
|
2016-06-24 11:22:43 +08:00
|
|
|
match 'account/register',:to=>'account#register', :via => [:get, :post], :as => 'register'
|
2014-09-12 16:45:03 +08:00
|
|
|
match 'account/lost_password', :via => [:get, :post], :as => 'lost_password'
|
|
|
|
match 'account/activate', :via => :get
|
|
|
|
match 'account/valid_ajax', :via => :get
|
2014-12-19 10:51:53 +08:00
|
|
|
match 'account/email_valid', :to => 'account#email_valid', :via => :get
|
2016-06-22 14:04:47 +08:00
|
|
|
match 'account/resendmail', :to => 'account#resendmail', :via=> :get, :as => 'resendmail'
|
2014-04-15 16:57:19 +08:00
|
|
|
match 'projects/:id/wiki', :to => 'wikis#edit', :via => :post
|
|
|
|
match 'projects/:id/wiki/destroy', :to => 'wikis#destroy', :via => [:get, :post]
|
|
|
|
|
2016-06-22 14:04:47 +08:00
|
|
|
#激活邮箱反馈问题
|
2016-07-01 15:49:25 +08:00
|
|
|
match 'users/:id/leave_email_activation_message', :to => 'words#leave_email_activation_message', :via => :post, :as => "leave_email_activation_message"
|
2016-06-22 14:04:47 +08:00
|
|
|
|
2014-04-15 16:57:19 +08:00
|
|
|
# boards
|
|
|
|
match 'boards/:board_id/topics/new', :to => 'messages#new', :via => [:get, :post], :as => 'new_board_message'
|
2015-12-22 15:48:41 +08:00
|
|
|
match 'boards/:id/join_to_org_subfields', :to => 'boards#join_to_org_subfields'
|
2016-10-14 14:28:19 +08:00
|
|
|
match 'boards/:id/update_position', :to => 'boards#update_position', :via => :post
|
|
|
|
match 'boards/:id/update_name', :to => 'boards#update_name', :via => :put
|
2014-04-15 16:57:19 +08:00
|
|
|
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]
|
2015-12-31 15:36:42 +08:00
|
|
|
get 'boards/:board_id/topics/:id/edit', :to => 'messages#edit',:as=>'edit_board_message'
|
2014-04-15 16:57:19 +08:00
|
|
|
|
|
|
|
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'
|
2015-12-31 15:36:42 +08:00
|
|
|
post 'boards/:board_id/topics/:id/destroy', :to => 'messages#destroy',:as=>'delete_board_message'
|
2015-12-23 15:35:26 +08:00
|
|
|
match 'messages/join_org_subfield', :to => 'messages#join_org_subfield'
|
|
|
|
match 'messages/get_subfield_on_click_org', :to => 'messages#get_subfield_on_click_org'
|
|
|
|
match 'messages/join_org_subfields', :to => 'messages#join_org_subfields'
|
2014-04-15 16:57:19 +08:00
|
|
|
# boards end
|
|
|
|
|
|
|
|
# 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'
|
|
|
|
|
2016-10-21 14:06:45 +08:00
|
|
|
get 'projects/:id/issues/statistics', :to => 'issues#statistics', :as => 'project_issues_statistics'
|
2014-04-15 16:57:19 +08: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'
|
|
|
|
post '/users/:id/user_activities', :to => 'users#show', :as => "user_activities"
|
2016-01-21 10:33:53 +08:00
|
|
|
match 'projects/:project_id/news/index', :to => 'news#index', :via => [:get, :post], :as => 'new_course_news'
|
|
|
|
match 'projects/:project_id/news/new', :to => 'news#new', :via => [:get, :post]
|
2014-05-12 18:46:39 +08:00
|
|
|
|
2015-09-24 16:30:14 +08:00
|
|
|
post '/courses/:id/course_activity', :to => 'courses#show', :as => 'course_activity'
|
2015-10-12 17:19:55 +08:00
|
|
|
get '/boards/:id/boards_topic', :to =>'boards#show', :as => 'boards_topic'
|
2015-12-24 16:45:45 +08:00
|
|
|
match 'courses/:course_id/news/index', :to => 'news#index', :via => [:get, :post], :as => 'new_course_news'
|
2015-12-25 19:02:26 +08:00
|
|
|
match 'courses/:course_id/news/new', :to => 'news#new', :via => [:get, :post]
|
2016-10-20 10:50:59 +08:00
|
|
|
match 'users/:user_id/homepage/articles/:id', :to => 'article_homepages#show', :as => "user_homepage_show"
|
2015-09-24 16:30:14 +08:00
|
|
|
|
2016-05-10 09:00:59 +08:00
|
|
|
scope ":username" do
|
|
|
|
resources :posts
|
|
|
|
end
|
|
|
|
|
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
|
2014-09-12 16:45:03 +08:00
|
|
|
match "tag_saveEx" , :via => [:get, :post]
|
2015-08-26 17:29:47 +08:00
|
|
|
post "user_new_homework"
|
2015-09-01 16:18:03 +08:00
|
|
|
get 'new_user_commit_homework'
|
2016-05-06 17:36:28 +08:00
|
|
|
get 'reply_to'
|
|
|
|
get 'show_all_replies'
|
2016-06-03 16:28:11 +08:00
|
|
|
get 'user_messages_unviewed'
|
2015-09-01 16:18:03 +08:00
|
|
|
post "user_commit_homework"
|
2015-08-28 11:32:57 +08:00
|
|
|
post 'user_select_homework'
|
2016-08-03 15:00:16 +08:00
|
|
|
post 'check_homework'
|
2016-06-07 16:02:00 +08:00
|
|
|
get 'all_journals'
|
2014-05-28 14:43:20 +08:00
|
|
|
end
|
2015-09-01 16:18:03 +08:00
|
|
|
|
2014-04-15 16:57:19 +08:00
|
|
|
member do
|
2014-10-17 15:02:09 +08:00
|
|
|
match 'user_projects_index', :to => 'users#user_projects_index', :via => :get
|
2014-04-15 16:57:19 +08:00
|
|
|
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"
|
2015-07-29 10:34:04 +08:00
|
|
|
# match 'user_newfeedback', :to => 'users#user_newfeedback', :via => :get, :as => "user_newfeedback"
|
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
|
2015-07-09 15:27:49 +08:00
|
|
|
match 'user_courses4show', :to => 'users#user_courses4show', :via => :get
|
|
|
|
match 'user_projects4show', :to => 'users#user_projects4show', :via => :get
|
|
|
|
match 'user_course_activities', :to => 'users#user_course_activities', :via => :get
|
|
|
|
match 'user_project_activities', :to => 'users#user_project_activities', :via => :get
|
|
|
|
match 'user_feedback4show', :to => 'users#user_feedback4show', :via => :get
|
2015-07-14 15:16:15 +08:00
|
|
|
match 'user_visitorlist', :to => 'users#user_visitorlist', :via => :get
|
2016-05-06 18:47:38 +08:00
|
|
|
match 'apply_for_homework', :to => 'users#apply_for_homework', :via => :post
|
2016-05-04 16:17:37 +08:00
|
|
|
match 'apply_homework', :to => 'users#apply_homework', :via => :get
|
2014-04-15 16:57:19 +08:00
|
|
|
match 'user_homeworks', :to => 'users#user_homeworks', :via => :get
|
2016-08-05 16:12:53 +08:00
|
|
|
match 'my_homeworks', :to => 'users#my_homeworks', :via => :get
|
2016-03-03 17:04:38 +08:00
|
|
|
match 'student_homeworks', :to => 'users#student_homeworks', :via => :get
|
2016-05-18 14:49:13 +08:00
|
|
|
get 'apply_resource'
|
2015-08-27 16:03:41 +08:00
|
|
|
get 'user_import_homeworks'
|
2016-01-27 17:26:57 +08:00
|
|
|
get 'user_search_homeworks'
|
2016-03-03 17:04:38 +08:00
|
|
|
get 'choose_user_course'
|
2015-08-28 16:47:43 +08:00
|
|
|
get 'user_import_resource'
|
2014-05-12 18:46:39 +08:00
|
|
|
match 'watch_projects', :to => 'users#watch_projects', :via => :get
|
2015-08-26 17:29:47 +08:00
|
|
|
#
|
2014-05-12 18:46:39 +08:00
|
|
|
# added by bai
|
2014-04-15 16:57:19 +08:00
|
|
|
match 'show_score', :to => 'users#show_score', :via => :get
|
2014-09-12 16:45:03 +08:00
|
|
|
match 'topic_score_index', :to => 'users#topic_score_index', :via => [:get, :post]
|
2014-04-15 16:57:19 +08:00
|
|
|
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
|
2014-09-12 16:45:03 +08:00
|
|
|
match 'topic_new_score_index', :to => 'users#topic_new_score_index', :via => [:get, :post]
|
2014-06-16 17:50:28 +08:00
|
|
|
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]
|
2016-01-21 10:38:07 +08:00
|
|
|
match 'user_act_issue_assign_to', :to => 'users#user_act_issue_assign_to', :via => [:get, :post]
|
2016-04-24 10:49:33 +08:00
|
|
|
|
|
|
|
#addby yk
|
|
|
|
match 'user_courselist', :to => 'users#user_courselist', :via => :get, :as => "user_courselist"
|
2016-04-27 09:54:49 +08:00
|
|
|
match 'user_projectlist', :to => 'users#user_projectlist', :via => :get, :as => "user_projectlist"
|
2016-04-24 10:49:33 +08:00
|
|
|
|
2016-07-26 16:45:36 +08:00
|
|
|
match 'sort_syllabus_list', :to => 'users#sort_syllabus_list', :via => :get, :as => "sort_syllabus_list"
|
2016-08-13 15:35:03 +08:00
|
|
|
match 'sort_project_list', :to => 'users#sort_project_list', :via => :get, :as => "sort_project_list"
|
2016-07-26 16:45:36 +08:00
|
|
|
|
2015-08-21 16:29:25 +08:00
|
|
|
get 'edit_brief_introduction'
|
2015-08-15 17:06:41 +08:00
|
|
|
get "user_resource"
|
2016-03-02 17:46:10 +08:00
|
|
|
get "import_resources"
|
2016-03-04 16:05:58 +08:00
|
|
|
get "import_resources_search"
|
2016-03-03 17:15:47 +08:00
|
|
|
post "import_into_container"
|
2015-08-20 17:38:30 +08:00
|
|
|
get "resource_search"
|
2015-08-15 17:06:41 +08:00
|
|
|
post "user_resource_create"
|
|
|
|
post "user_resource_delete"
|
2015-08-18 09:31:03 +08:00
|
|
|
get "search_user_course"
|
2016-03-03 17:04:38 +08:00
|
|
|
post "send_homework_to_course"
|
2015-08-18 09:31:03 +08:00
|
|
|
post "add_exist_file_to_course"
|
2015-08-20 10:14:26 +08:00
|
|
|
post "add_exist_file_to_project"
|
2015-12-29 17:13:01 +08:00
|
|
|
post 'add_exist_file_to_org'
|
2016-01-20 16:24:14 +08:00
|
|
|
post 'share_news_to_course'
|
|
|
|
post 'share_news_to_project'
|
|
|
|
post 'share_news_to_org'
|
2016-01-25 14:19:39 +08:00
|
|
|
post 'share_message_to_course'
|
|
|
|
post 'share_message_to_project'
|
|
|
|
post 'share_message_to_org'
|
2015-08-18 09:31:03 +08:00
|
|
|
get 'resource_preview'
|
2015-12-07 17:29:14 +08:00
|
|
|
get 'rename_resource'
|
2015-08-20 10:14:26 +08:00
|
|
|
get 'search_user_project'
|
2015-09-01 11:29:43 +08:00
|
|
|
get 'user_resource_type'
|
|
|
|
get 'user_ref_resource_search'
|
|
|
|
post 'import_resources_to_homework'
|
2015-10-21 14:52:00 +08:00
|
|
|
get 'dealwith_apply_request'
|
2016-04-29 15:46:26 +08:00
|
|
|
get 'dealwith_apply_homework'
|
2016-05-19 11:32:58 +08:00
|
|
|
get 'deal_with_apply_resource'
|
2015-10-12 15:51:47 +08:00
|
|
|
get 'store_selected_resource'
|
2015-11-13 16:34:00 +08:00
|
|
|
get 'user_organizations'
|
2015-11-16 15:02:57 +08:00
|
|
|
get 'search_user_orgs'
|
2015-12-29 17:13:01 +08:00
|
|
|
get 'search_user_org' #for send resource
|
2016-01-27 17:26:57 +08:00
|
|
|
get 'user_homework_type'
|
|
|
|
get 'user_ref_homework_search'
|
|
|
|
get 'show_homework_detail'
|
2016-05-06 18:47:38 +08:00
|
|
|
post 'apply_for_homework'
|
2016-05-18 14:49:13 +08:00
|
|
|
post 'apply_for_resource'
|
2016-08-05 16:12:53 +08:00
|
|
|
match 'manage_or_receive_homeworks', :to => 'users#manage_or_receive_homeworks', :via => :get
|
|
|
|
get 'search_m_r_homeworks'
|
2016-08-25 11:30:47 +08:00
|
|
|
get 'expand_courses'
|
|
|
|
get 'cancel_or_collect'
|
2016-10-19 18:03:59 +08:00
|
|
|
get 'homepage'
|
2015-09-01 16:37:43 +08:00
|
|
|
# end
|
2014-04-15 16:57:19 +08:00
|
|
|
end
|
2015-10-24 11:11:49 +08:00
|
|
|
#resources :blogs
|
|
|
|
resources :blogs do
|
|
|
|
resources :blog_comments do
|
|
|
|
member do
|
|
|
|
post 'reply'
|
|
|
|
get 'quote'
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
2016-10-19 18:03:59 +08:00
|
|
|
|
|
|
|
resources :homepages do
|
|
|
|
resources :article_homepages do
|
|
|
|
member do
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
2014-04-15 16:57:19 +08:00
|
|
|
end
|
2015-11-26 09:57:53 +08:00
|
|
|
resources :blog_comments do
|
|
|
|
collection do
|
|
|
|
get :search
|
|
|
|
end
|
|
|
|
end
|
2016-10-19 18:03:59 +08:00
|
|
|
resource :homepages do
|
|
|
|
member do
|
|
|
|
post 'set_homepage'
|
|
|
|
post 'cancel_homepage'
|
|
|
|
end
|
|
|
|
collection do
|
|
|
|
|
|
|
|
end
|
|
|
|
end
|
|
|
|
resources :article_homepages do
|
|
|
|
member do
|
|
|
|
end
|
|
|
|
end
|
2014-04-15 16:57:19 +08:00
|
|
|
match 'users/:id/user_newfeedback', :to => 'users#user_newfeedback', :via => :get, :as => "feedback"
|
2014-09-12 16:45:03 +08:00
|
|
|
match 'users/:id/user_projects', :to => 'users#user_projects', :via => :get
|
2015-08-24 23:53:28 +08:00
|
|
|
#消息
|
2015-08-24 11:11:45 +08:00
|
|
|
match 'users/:id/user_messages', :to => 'users#user_messages', :via => :get, :as => "user_message"
|
2015-09-17 16:07:41 +08:00
|
|
|
match 'users/:id/user_system_messages', :to => 'users#user_system_messages', :via => :get, :as => "user_system_messages"
|
2016-01-07 15:09:09 +08:00
|
|
|
match 'set_homepage', :to => 'blogs#set_homepage', :via => :post
|
|
|
|
match 'cancel_homepage', :to => 'blogs#cancel_homepage', :via => :post
|
2015-08-24 23:53:28 +08:00
|
|
|
#match 'users/:id/user_messages/:homework', :to => 'users#user_messages_homework', :via => :get, :as => "user_message_homewrok"
|
2014-05-12 18:46:39 +08:00
|
|
|
|
2015-08-15 17:06:41 +08:00
|
|
|
|
|
|
|
|
2014-04-15 16:57:19 +08:00
|
|
|
#end
|
2014-09-12 16:45:03 +08:00
|
|
|
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
|
2015-04-23 17:42:03 +08:00
|
|
|
match 'my/change_mail_notification', via: :get
|
2015-07-09 15:27:49 +08:00
|
|
|
match 'my/save_user_avatar', :to => 'my#save_user_avatar', :via => [:get, :post]
|
|
|
|
match 'my/clear_user_avatar_temp', :to => 'my#clear_user_avatar_temp', :via => [:get, :post]
|
2014-04-15 16:57:19 +08:00
|
|
|
|
2014-08-22 09:38:07 +08:00
|
|
|
get 'my/page2', :to => 'my#page2', :as => "my_page2"
|
|
|
|
|
2014-04-15 16:57:19 +08:00
|
|
|
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
|
2014-09-12 16:45:03 +08:00
|
|
|
match 'users/tag_save', :via => :post, :as => 'tag'
|
|
|
|
match 'users/tag_saveEx', :via => [:get, :post]
|
2015-11-13 16:34:00 +08:00
|
|
|
#get 'users/:id/user_organizations', :to => 'users#user_organizations', :as => 'user_organizations'
|
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'
|
|
|
|
|
2016-07-26 08:55:07 +08:00
|
|
|
post 'applied_project/applied_join', :to => 'applied_project#applied_join_project', :as => 'applied_join_project'
|
2016-07-28 10:18:35 +08:00
|
|
|
post 'applied_project/applied_project_info', :to => 'applied_project#applied_project_info', :as => 'applied_project_info'
|
2016-07-26 08:55:07 +08:00
|
|
|
delete 'applied_project/applied', :to => 'applied_project#unapplied_join_project', :as => 'unapplied_join_project'
|
2014-05-21 16:45:11 +08:00
|
|
|
|
2014-04-15 16:57:19 +08:00
|
|
|
resources :projects do
|
|
|
|
member do
|
2015-04-14 10:17:42 +08:00
|
|
|
match 'change_project_type', :via => [:get, :post]
|
2014-04-15 16:57:19 +08:00
|
|
|
get 'settings(/:tab)', :action => 'settings', :as => 'settings'
|
|
|
|
#by young
|
2014-09-12 16:45:03 +08:00
|
|
|
get 'member', :to => 'projects#member', :as => 'member'
|
2016-10-11 10:03:00 +08:00
|
|
|
match 'store_mine', :to => 'projects#store_mine', :as => 'store_mine'
|
2016-10-27 12:39:44 +08:00
|
|
|
match 'enshrine', :to => 'projects#enshrine', :as => 'enshrine'
|
2016-11-08 10:23:02 +08:00
|
|
|
match 'member_forked', :to => 'projects#member_forked', :as => 'member_forked'
|
2014-04-15 16:57:19 +08:00
|
|
|
get 'file', :action => 'file', :as => 'file'
|
|
|
|
get 'statistics', :action => 'statistics', :as => 'statistics'
|
2016-10-19 15:18:26 +08:00
|
|
|
get 'repository_tree_changes', :action => 'repository_tree_changes', :as => 'repository_tree_changes'
|
2014-09-12 16:45:03 +08:00
|
|
|
|
2014-04-15 16:57:19 +08:00
|
|
|
get 'feedback', :action => 'feedback', :as => 'project_feedback'
|
|
|
|
get 'watcherlist', :action=> 'watcherlist'
|
2015-07-20 16:03:33 +08:00
|
|
|
|
2015-09-16 17:35:26 +08:00
|
|
|
# get 'invite_members', :action=> 'invite_members'
|
2015-03-07 10:52:20 +08:00
|
|
|
get 'invite_members_by_mail', :action=> 'invite_members_by_mail'
|
2015-07-18 19:13:33 +08:00
|
|
|
# get 'dts_repos', :aciton => 'dts_repos'
|
2015-03-07 10:52:20 +08:00
|
|
|
get 'send_mail_to_member', :action => 'send_mail_to_member'
|
2015-07-18 19:13:33 +08:00
|
|
|
match 'user_watcherlist', :to => 'projects#watcherlist', :via => :get, :as => "watcherlist"
|
2014-04-15 16:57:19 +08:00
|
|
|
#end
|
2016-10-11 09:30:45 +08:00
|
|
|
|
2014-04-15 16:57:19 +08:00
|
|
|
post 'modules'
|
|
|
|
post 'archive'
|
|
|
|
post 'unarchive'
|
|
|
|
post 'close'
|
|
|
|
post 'reopen'
|
2015-11-12 14:55:31 +08:00
|
|
|
get 'search_public_orgs_not_in_project'
|
2014-04-15 16:57:19 +08:00
|
|
|
match 'copy', :via => [:get, :post]
|
2016-01-13 15:17:13 +08:00
|
|
|
match 'set_public_or_private', :via => [:post]
|
2014-04-15 16:57:19 +08:00
|
|
|
end
|
|
|
|
|
2015-01-22 17:03:01 +08:00
|
|
|
collection do
|
|
|
|
match 'join_project', :via => [:get, :post]
|
|
|
|
end
|
|
|
|
|
2014-04-15 16:57:19 +08:00
|
|
|
#by young
|
2014-09-12 16:45:03 +08:00
|
|
|
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 '/watcherlist', :to=>'projects#watcherlist', :as => 'watcherlist', :via => :get #add by huang
|
2014-04-15 16:57:19 +08:00
|
|
|
|
|
|
|
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'
|
2016-07-29 14:49:37 +08:00
|
|
|
post 'allow_to_join_project'
|
|
|
|
get 'refused_allow_to_join_project'
|
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
|
2014-09-12 16:45:03 +08:00
|
|
|
match 'issues/update_form', :to => 'issues#update_form', :via => [:put, :post], :as => 'issue_form'
|
2014-04-15 16:57:19 +08:00
|
|
|
|
2014-05-13 11:54:21 +08:00
|
|
|
resources :files, :only => [:index, :new, :create] do
|
|
|
|
collection do
|
2016-01-04 17:05:32 +08:00
|
|
|
match "getattachtype", :via => [:get, :post]
|
2016-01-05 11:00:26 +08:00
|
|
|
match "search_project",:via => [:post,:get]
|
2016-01-04 17:05:32 +08:00
|
|
|
match "searchone4reload",:via => [:post,:get]
|
|
|
|
match "search_tag_attachment", :via => [:post,:get]
|
|
|
|
end
|
|
|
|
member do
|
|
|
|
match "quote_resource_show", :via => [:get]
|
2016-02-23 11:04:19 +08:00
|
|
|
get "file_hidden"
|
2016-06-16 16:55:25 +08:00
|
|
|
get "update_file_description"
|
2016-10-09 15:09:18 +08:00
|
|
|
post "edit_file_description"
|
2014-05-13 11:54:21 +08:00
|
|
|
end
|
|
|
|
end
|
2014-04-15 16:57:19 +08:00
|
|
|
|
2016-08-01 16:54:31 +08:00
|
|
|
resources :pull_requests do
|
2016-08-01 15:33:47 +08:00
|
|
|
collection do
|
|
|
|
end
|
|
|
|
member do
|
2016-08-04 15:07:15 +08:00
|
|
|
get 'accept_pull_request'
|
2016-08-03 13:57:59 +08:00
|
|
|
get 'pull_request_commits'
|
|
|
|
get 'pull_request_changes'
|
2016-08-08 15:23:55 +08:00
|
|
|
get 'update_pull_request'
|
2016-08-09 10:53:44 +08:00
|
|
|
get 'pull_request_comments'
|
2016-08-09 14:51:48 +08:00
|
|
|
post 'create_pull_request_comment'
|
2016-08-01 15:33:47 +08:00
|
|
|
end
|
|
|
|
end
|
|
|
|
|
2016-07-12 16:23:30 +08:00
|
|
|
resources :quality_analysis, :only => [:index, :create, :edit, :update, :delete] do
|
2016-06-17 11:29:49 +08:00
|
|
|
collection do
|
|
|
|
end
|
|
|
|
member do
|
2016-07-01 09:31:05 +08:00
|
|
|
match 'update_jenkins_job'
|
|
|
|
match 'edit'
|
2016-07-12 16:23:30 +08:00
|
|
|
match 'delete'
|
2016-07-01 17:50:08 +08:00
|
|
|
match 'create'
|
2016-07-07 14:22:48 +08:00
|
|
|
get 'error_list'
|
2016-06-17 11:29:49 +08:00
|
|
|
end
|
|
|
|
end
|
2016-01-04 17:05:32 +08:00
|
|
|
# resources :files, :only => [:index, :new, :create] do
|
|
|
|
# member do
|
|
|
|
# match "quote_resource_show_project",:via => [:get]
|
|
|
|
# end
|
|
|
|
# collection do
|
|
|
|
# match "getattachtype" , :via => [:get, :post]
|
|
|
|
# match "search_project",:via => [:post,:get]
|
|
|
|
# #match 'getattachtype/:attachtype', :to => 'files#getattachtype', :via => [:get, :post]
|
|
|
|
# end
|
|
|
|
# end
|
|
|
|
|
2014-10-30 10:06:35 +08:00
|
|
|
|
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]
|
2015-10-18 21:04:04 +08:00
|
|
|
put 'to_gitlab'
|
2015-09-01 16:37:43 +08:00
|
|
|
# get 'create', :via=>[:get, :post]
|
2014-04-15 16:57:19 +08:00
|
|
|
end
|
|
|
|
end
|
2015-11-13 17:30:14 +08:00
|
|
|
|
2014-09-12 16:45:03 +08:00
|
|
|
match 'wiki/index', :via => :get
|
2014-04-15 16:57:19 +08:00
|
|
|
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
|
2014-09-12 16:45:03 +08:00
|
|
|
match 'wiki', :to => 'wiki#show', :via => :get
|
2014-04-15 16:57:19 +08:00
|
|
|
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
|
2015-09-01 16:37:43 +08:00
|
|
|
member do
|
|
|
|
post 'add_journal'
|
2015-11-16 17:21:26 +08:00
|
|
|
post 'add_journal_in_org'
|
2015-12-17 17:15:03 +08:00
|
|
|
get 'delete_journal'
|
2015-12-17 18:12:38 +08:00
|
|
|
get 'reply'
|
|
|
|
post 'add_reply'
|
2015-09-01 16:37:43 +08:00
|
|
|
end
|
2014-04-15 16:57:19 +08:00
|
|
|
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
|
2014-09-12 16:45:03 +08:00
|
|
|
match '/issues', :to => 'issues#destroy', :via => :delete
|
2014-04-15 16:57:19 +08:00
|
|
|
|
|
|
|
resources :queries, :except => [:show]
|
|
|
|
|
|
|
|
resources :news, :only => [:index, :show, :edit, :update, :destroy]
|
|
|
|
match '/news/:id/comments', :to => 'comments#create', :via => :post
|
2014-10-21 10:40:03 +08:00
|
|
|
#match '/news/:id/comments/:comment_id', :to => 'comments#destroy', :via => :delete
|
|
|
|
delete '/news/:id/comments/:comment_id', :to => 'comments#destroy', as: :delete_news_comments
|
2014-04-15 16:57:19 +08:00
|
|
|
|
|
|
|
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
|
2016-04-12 16:00:54 +08:00
|
|
|
get 'projects/:id/repository/:repository_id/statistics', :to => 'repositories#stats', :as => "stats_repository_project"
|
2016-06-21 16:50:45 +08:00
|
|
|
get 'projects/:id/repository/:repository_id/quality_analysis', :to => 'repositories#quality_analysis', :as => "quality_analysis"
|
2014-04-15 16:57:19 +08:00
|
|
|
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 => {
|
2016-02-23 15:09:15 +08:00
|
|
|
:action => /(browse|show|entry|raw|annotate|diff|commit_diff)/,
|
2015-09-01 16:37:43 +08:00
|
|
|
:rev => /[a-z0-9\.\-_]+/
|
2014-04-15 16:57:19 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
get 'projects/:id/repository/statistics', :to => 'repositories#stats'
|
2016-06-29 11:10:19 +08:00
|
|
|
get 'projects/:id/repository/quality_analysis', :to => 'repositories#quality_analysis'
|
2016-06-13 15:21:29 +08:00
|
|
|
|
2014-04-15 16:57:19 +08:00
|
|
|
get 'projects/:id/repository/graph', :to => 'repositories#graph'
|
|
|
|
|
|
|
|
get 'projects/:id/repository/changes(/*path(.:ext))', :to => 'repositories#changes'
|
|
|
|
|
2015-11-13 17:30:14 +08:00
|
|
|
get 'projects/:id/repository/forked', :to => 'repositories#forked'
|
2016-10-12 10:45:14 +08:00
|
|
|
get 'projects/:id/repository/tree_head_message', :to => 'repositories#tree_head_message', :as => "tree_head_message"
|
2016-09-26 16:17:21 +08:00
|
|
|
get 'projects/:id/repository/export_rep_static', :to => 'repositories#export_rep_static'
|
2016-05-11 13:44:15 +08:00
|
|
|
get 'projects/:id/repository/project_archive', :to => 'repositories#project_archive', :as => 'project_archive'
|
2014-04-15 16:57:19 +08:00
|
|
|
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 => {
|
2016-02-23 15:09:15 +08:00
|
|
|
:action => /(browse|show|entry|raw|annotate|diff|commit_diff)/,
|
2015-09-01 16:37:43 +08:00
|
|
|
:rev => /[a-z0-9\.\-_]+/
|
2014-04-15 16:57:19 +08:00
|
|
|
}
|
|
|
|
get 'projects/:id/repository/:repository_id/:action(/*path(.:ext))',
|
|
|
|
:controller => 'repositories',
|
2016-02-23 15:09:15 +08:00
|
|
|
:action => /(browse|show|entry|raw|changes|annotate|diff|commit_diff)/
|
2014-04-15 16:57:19 +08:00
|
|
|
get 'projects/:id/repository/:action(/*path(.:ext))',
|
|
|
|
:controller => 'repositories',
|
2016-02-23 15:09:15 +08:00
|
|
|
:action => /(browse|show|entry|raw|changes|annotate|diff|commit_diff)/
|
2014-04-15 16:57:19 +08:00
|
|
|
|
|
|
|
get 'projects/:id/repository/:repository_id', :to => 'repositories#show', :path => nil
|
|
|
|
get 'projects/:id/repository', :to => 'repositories#show', :path => nil
|
2014-08-08 16:43:34 +08:00
|
|
|
get 'projects/:id/exit', :to => 'projects#exit_project', :as => 'exit_cur_project'
|
2014-04-15 16:57:19 +08:00
|
|
|
|
|
|
|
# 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'
|
2015-12-30 17:27:44 +08:00
|
|
|
get 'attachments/attachment_versions/:id',:to=>'attachments#attachment_versions',:as=>'attachments_versions'
|
2016-10-14 19:21:41 +08:00
|
|
|
get 'attachments/attachment_versions_delete/:id',:to=>'attachments#attachment_versions_delete',:as=>'attachment_versions_delete'
|
2016-03-17 12:37:05 +08:00
|
|
|
get 'attachments/attachment_history_download/:id',:to=>'attachments#attachment_history_download',:as=>'attachment_history_download'
|
2015-12-30 17:27:44 +08:00
|
|
|
post 'attachments/upload_attachment_version',:to=>'attachments#upload_attachment_version',:as=>'upload_attachment_version'
|
2014-04-15 16:57:19 +08:00
|
|
|
get 'attachments/download/:id/:filename', :to => 'attachments#download', :id => /\d+/, :filename => /.*/, :as => 'download_named_attachment'
|
2016-02-20 16:19:35 +08:00
|
|
|
get 'attachments/download_history/:id/:filename', :to => 'attachments#download_history', :id => /\d+/, :filename => /.*/, :as => 'download_history_attachment'
|
2014-04-15 16:57:19 +08:00
|
|
|
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'
|
2014-09-12 16:45:03 +08:00
|
|
|
match 'attachments/autocomplete', :to => 'attachments#autocomplete', :via => [:post]
|
2014-04-15 16:57:19 +08:00
|
|
|
post 'attachments/relationfile', to: 'attachments#add_exist_file_to_project', as: 'attach_relation'
|
2015-03-31 15:57:15 +08:00
|
|
|
post 'attachments/relationfiles', to: 'attachments#add_exist_file_to_projects', as: 'attach_relations'
|
2014-07-02 09:11:45 +08:00
|
|
|
post 'attachments/courserelationfile', to: 'attachments#add_exist_file_to_course', as: 'course_attach_relation'
|
2014-11-20 17:44:30 +08:00
|
|
|
post 'attachments/courserelationfiles', to: 'attachments#add_exist_file_to_courses', as: 'course_attach_relations'
|
2015-12-17 14:51:02 +08:00
|
|
|
match 'attachments/add_exist_file_to_org_subfield'
|
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
|
2014-09-12 16:45:03 +08:00
|
|
|
match "updateType" , :via => [:get, :post]
|
|
|
|
match "updateFileDense" , :via => [:get, :post]
|
2014-11-19 11:03:23 +08:00
|
|
|
match "update_file_dense", :via => [:post]
|
2014-09-12 16:45:03 +08:00
|
|
|
match "renderTag" , :via => [:get, :post]
|
|
|
|
match 'delete_softapplications', :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
|
|
|
|
|
2014-09-12 16:45:03 +08:00
|
|
|
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
|
2014-04-15 16:57:19 +08:00
|
|
|
|
|
|
|
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
|
2014-10-16 15:07:36 +08:00
|
|
|
resources :web_footer_companies, :except => :show
|
2014-04-15 16:57:19 +08:00
|
|
|
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'
|
|
|
|
|
2014-09-12 16:45:03 +08:00
|
|
|
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
|
2016-11-03 15:35:09 +08:00
|
|
|
match 'admin/export_rep_static_users', :via => :get
|
2016-07-07 09:02:41 +08:00
|
|
|
get 'admin/courses', as: :all_courses
|
|
|
|
get 'admin/syllabuses', as: :all_syllabuses
|
|
|
|
get 'admin/non_syllabus_courses', as: :non_syllabus_courses
|
|
|
|
post 'admin/update_course_name'
|
2016-07-15 14:48:39 +08:00
|
|
|
post 'admin/update_syllabus_title'
|
2016-04-15 11:26:56 +08:00
|
|
|
get 'admin/excellent_courses', as: :excellent_courses
|
|
|
|
get 'admin/excellent_all_courses', as: :excellent_all_courses
|
|
|
|
match 'admin/set_excellent_course/:id', :to => 'admin#set_excellent_course'
|
2016-06-13 11:10:28 +08:00
|
|
|
match 'admin/cancel_excellent_course/:id', :to => 'admin#cancel_excellent_course'
|
2016-03-07 16:46:02 +08:00
|
|
|
get 'admin/course_resource_list'
|
2016-03-08 11:01:08 +08:00
|
|
|
get 'admin/project_resource_list'
|
2014-09-12 16:45:03 +08:00
|
|
|
match 'admin/users', :via => :get
|
2015-09-09 17:05:32 +08:00
|
|
|
match 'admin/messages', :via => :get
|
2014-10-17 15:02:09 +08:00
|
|
|
match 'admin/first_page_made', as: :first_page_made
|
|
|
|
match 'admin/course_page_made', as: :course_page_made
|
|
|
|
match 'admin/contest_page_made', as: :contest_page_made
|
|
|
|
match 'admin/web_footer_made', as: :web_footer_made
|
2015-01-31 17:14:01 +08:00
|
|
|
match 'admin/enterprise_page_made', as: :enterprise_page_made
|
2015-03-05 17:37:33 +08:00
|
|
|
match 'admin/mobile_version', as: :mobile_version
|
2015-03-07 15:36:00 +08:00
|
|
|
match 'admin/create_version', as: :create_version
|
2014-09-12 16:45:03 +08:00
|
|
|
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
|
2015-03-05 15:27:22 +08:00
|
|
|
get 'admin/organization'
|
2015-07-27 16:07:29 +08:00
|
|
|
get 'admin/schools'
|
2016-07-25 18:31:28 +08:00
|
|
|
get 'admin/applied_schools', as: :unapplied_schools
|
|
|
|
get 'admin/has_applied_schools', as: :applied_schools
|
2016-07-27 10:46:48 +08:00
|
|
|
get 'admin/approve_applied_schools'
|
2016-07-28 20:01:22 +08:00
|
|
|
post 'admin/edit_applied_schools'
|
|
|
|
get 'admin/all_schools'
|
2016-07-29 16:11:26 +08:00
|
|
|
get 'admin/apply_shcool_sort', as: :apply_shcool_sort
|
2016-07-28 20:01:22 +08:00
|
|
|
delete 'admin/delete_applied_schools'
|
2016-07-27 10:46:48 +08:00
|
|
|
|
2015-08-15 17:06:50 +08:00
|
|
|
get 'admin/leave_messages'
|
|
|
|
match 'admin/messages_list', as: :messages_list
|
|
|
|
match 'admin/project_messages', as: :project_messages
|
|
|
|
match'admin/course_messages', as: :course_messages
|
|
|
|
get 'admin/notices'
|
2016-02-26 16:26:20 +08:00
|
|
|
match 'admin/latest_login_users', as: :latest_login_users
|
|
|
|
match 'admin/latest_login_teachers', as: :latest_login_teachers
|
2015-08-15 17:06:50 +08:00
|
|
|
get 'admin/homework'
|
2016-05-09 18:40:21 +08:00
|
|
|
get 'admin/apply_for_homework'
|
2016-04-14 11:29:22 +08:00
|
|
|
get 'admin/code_work_tests'
|
2016-07-07 09:02:41 +08:00
|
|
|
post 'admin/select_course_syllabus'
|
|
|
|
post 'admin/create_syllabus'
|
2014-04-15 16:57:19 +08:00
|
|
|
|
|
|
|
resources :auth_sources do
|
|
|
|
member do
|
|
|
|
get 'test_connection', :as => 'try_connection'
|
|
|
|
end
|
|
|
|
collection do
|
2015-09-01 16:37:43 +08:00
|
|
|
get 'autocomplete_for_new_user'
|
2014-04-15 16:57:19 +08:00
|
|
|
end
|
|
|
|
end
|
|
|
|
|
2014-09-12 16:45:03 +08:00
|
|
|
match 'courses/search'
|
|
|
|
match '/contests/search', :via => [:get, :post]
|
2016-06-28 15:13:04 +08:00
|
|
|
|
|
|
|
#课程大纲路由设置
|
|
|
|
resources :syllabuses do
|
|
|
|
member do
|
2016-06-30 10:44:11 +08:00
|
|
|
match 'syllabus_courselist', :to => 'syllabuses#syllabus_courselist', :via => :get, :as => 'syllabus_courselist'
|
2016-07-01 11:11:53 +08:00
|
|
|
get 'edit_syllabus_eng_name'
|
2016-07-07 15:04:57 +08:00
|
|
|
get 'edit_syllabus_title'
|
2016-07-01 11:11:53 +08:00
|
|
|
post 'update_base_info'
|
2016-07-01 16:25:52 +08:00
|
|
|
get 'delete_syllabus'
|
|
|
|
get 'delete_des'
|
2016-09-23 09:22:47 +08:00
|
|
|
get 'members'
|
2016-06-28 15:13:04 +08:00
|
|
|
end
|
|
|
|
|
|
|
|
collection do
|
|
|
|
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
2016-09-23 09:22:47 +08:00
|
|
|
resources :syllabus_member do
|
|
|
|
member do
|
|
|
|
post 'update_rank'
|
|
|
|
end
|
|
|
|
|
|
|
|
collection do
|
|
|
|
get 'syl_member_autocomplete'
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
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'
|
2015-04-16 17:28:08 +08:00
|
|
|
get 'search_member', :action => 'search_member'
|
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'
|
2016-04-14 11:29:22 +08:00
|
|
|
get 'code_repeat', :action => 'code_repeat', :as => 'code_repeat'
|
2014-06-12 14:57:25 +08:00
|
|
|
get 'member', :controller => 'courses', :action => 'member', :as => 'member'
|
2016-10-21 17:34:02 +08:00
|
|
|
get 'group_member', :controller => 'courses', :action => 'group_member', :as => 'group_member'
|
2014-12-30 17:49:48 +08:00
|
|
|
get 'export_course_member_excel',:controller => 'courses',:action => 'export_course_member_excel'
|
2014-12-17 17:36:12 +08:00
|
|
|
get 'member_score', :to => 'courses#member_score'
|
2014-05-29 15:21:22 +08:00
|
|
|
post 'finishcourse'
|
|
|
|
post 'restartcourse'
|
2015-12-10 18:59:54 +08:00
|
|
|
match "renew", :to => 'courses#renew', :via => [:post, :get], :as =>'renew'
|
2014-12-03 19:17:10 +08:00
|
|
|
match "searchmembers", :controller => 'courses', :action => 'searchmembers', :via => [:post,:get]
|
2014-12-04 19:09:10 +08:00
|
|
|
match "searchgroupmembers", :via => [:post, :get]
|
2014-12-18 18:24:37 +08:00
|
|
|
match 'member_score_sort', :via => [:get]
|
2014-12-04 19:09:10 +08:00
|
|
|
match "updategroupname", :via => [:post, :get]
|
2014-12-08 16:50:20 +08:00
|
|
|
match "addgroups", :via => [:post, :get]
|
|
|
|
match 'deletegroup', :via => [:delete]
|
2014-12-17 17:36:12 +08:00
|
|
|
match 'show_member_score', :via => [:get]
|
2016-05-17 14:18:14 +08:00
|
|
|
match 'show_member_act_score', :via => [:get]
|
2014-12-19 23:12:32 +08:00
|
|
|
match 'valid_ajax', :to => 'courses#valid_ajax', :via => :get
|
2014-12-04 22:02:10 +08:00
|
|
|
post 'join_in/join_group', :to => 'courses#join_group', :as => 'join_group'
|
|
|
|
delete 'join_in/join_group', :to => 'courses#unjoin_group'
|
2015-02-09 10:28:33 +08:00
|
|
|
get 'copy_course'
|
2015-12-29 10:15:53 +08:00
|
|
|
get 'private_or_public'
|
2015-09-24 16:30:14 +08:00
|
|
|
match 'course_activity', :to => 'courses#course_activity', :via => :get, :as => "course_activity"
|
2015-10-28 15:54:27 +08:00
|
|
|
get 'course_outline'
|
2015-10-29 09:07:26 +08:00
|
|
|
post 'search_course_outline'
|
2015-10-29 11:53:52 +08:00
|
|
|
post 'set_course_outline'
|
2016-03-10 17:04:26 +08:00
|
|
|
post 'teacher_assign_group'
|
2015-10-30 17:21:12 +08:00
|
|
|
get 'syllabus'
|
2015-11-17 17:34:50 +08:00
|
|
|
get 'search_public_orgs_not_in_course'
|
2016-01-29 15:37:03 +08:00
|
|
|
get "homework_search"
|
2016-04-14 11:29:22 +08:00
|
|
|
get "show_comparecode"
|
2016-07-22 15:32:37 +08:00
|
|
|
get "statistics_course"
|
2016-07-29 14:34:42 +08:00
|
|
|
get "switch_role"
|
2016-10-21 17:34:02 +08:00
|
|
|
get 'search_not_group_member'
|
|
|
|
post 'add_members'
|
2014-06-05 15:20:09 +08:00
|
|
|
end
|
2014-10-16 10:56:13 +08:00
|
|
|
collection do
|
|
|
|
match 'join_private_courses', :via => [:get, :post]
|
2016-07-29 19:19:58 +08:00
|
|
|
post "join_course_multi_role"
|
|
|
|
|
2014-10-16 10:56:13 +08:00
|
|
|
end
|
|
|
|
|
2014-09-12 16:45:03 +08:00
|
|
|
match '/member', :to => 'courses#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-09-12 16:45:03 +08:00
|
|
|
match "getattachtype", :via => [:get, :post]
|
2014-11-21 11:38:53 +08:00
|
|
|
match "search",:via => [:post,:get]
|
2015-05-20 11:56:34 +08:00
|
|
|
match "searchone4reload",:via => [:post,:get]
|
2015-04-15 19:57:16 +08:00
|
|
|
match "search_tag_attachment", :via => [:post,:get]
|
2014-06-09 14:23:31 +08:00
|
|
|
end
|
2014-11-20 17:44:30 +08:00
|
|
|
member do
|
|
|
|
match "quote_resource_show", :via => [:get]
|
2016-02-23 11:04:19 +08:00
|
|
|
get "file_hidden"
|
|
|
|
post "republish_file"
|
2016-06-16 14:04:12 +08:00
|
|
|
get "update_file_description"
|
2016-10-09 15:09:18 +08:00
|
|
|
post "edit_file_description"
|
2014-11-20 17:44:30 +08:00
|
|
|
end
|
2014-06-09 14:23:31 +08:00
|
|
|
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]
|
2015-10-12 17:19:55 +08:00
|
|
|
# resources :boards do
|
|
|
|
# member do
|
|
|
|
# match 'boards_topic', :to => 'boards#boards_topic', :via => :get, :as => "boards_topic"
|
|
|
|
# end
|
|
|
|
# end
|
2014-09-12 16:45:03 +08:00
|
|
|
match '/homework', :to => 'courses#homework', :as => 'homework', :via => :get
|
2015-06-04 15:55:41 +08:00
|
|
|
resources :activity_notifys do
|
|
|
|
collection do
|
|
|
|
match 'chang_read_flag', :via => :get
|
|
|
|
end
|
2015-09-01 16:37:43 +08:00
|
|
|
end
|
2015-06-04 15:55:41 +08:00
|
|
|
|
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-09-12 16:45:03 +08:00
|
|
|
match '/courses/search', :via => [:get, :post]
|
|
|
|
match 'words/:id/leave_course_message', :to => 'words#leave_course_message'
|
2014-05-29 15:21:22 +08:00
|
|
|
|
|
|
|
|
2014-09-12 16:45:03 +08:00
|
|
|
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]
|
2014-04-15 16:57:19 +08:00
|
|
|
match 'settings', :controller => 'settings', :action => 'index', :via => :get
|
2014-09-12 16:45:03 +08:00
|
|
|
match 'settings/edit', :via => [:get, :post]
|
|
|
|
match 'settings/plugin/:id', :to => 'settings#plugin', :via => [:get, :post], :as => 'plugin_settings'
|
2015-04-09 10:33:15 +08:00
|
|
|
match 'settings/hidden_non_project', :via => [:get, :post]
|
2016-04-24 14:23:08 +08:00
|
|
|
match 'settings/hidden_courses', :via => [:get, :post]
|
2014-04-15 16:57:19 +08:00
|
|
|
|
2014-09-12 16:45:03 +08:00
|
|
|
match 'sys/projects', :via => :get
|
2014-04-15 16:57:19 +08:00
|
|
|
match 'sys/projects/:id/repository', :to => 'sys#create_project_repository', :via => :post
|
2014-09-12 16:45:03 +08:00
|
|
|
match 'sys/fetch_changesets', :via => :get
|
2014-04-15 16:57:19 +08:00
|
|
|
|
|
|
|
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'
|
|
|
|
##############测试留言功能 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'
|
2014-08-23 16:41:07 +08:00
|
|
|
delete 'words/destroyJournal', :to => 'words#destroyJournal'
|
2014-04-15 16:57:19 +08:00
|
|
|
get 'words/more', :to => 'words#more'
|
|
|
|
get 'words/back', :to=> 'words#back'
|
2014-08-20 10:50:29 +08:00
|
|
|
get 'words/destroyJournal', :to => 'words#destroyJournal'
|
2014-09-12 16:45:03 +08:00
|
|
|
match 'words/add_project_respond', :to => 'words#add_project_respond'
|
|
|
|
match 'words/:id/leave_project_message', :to => 'words#leave_project_message'
|
2014-04-15 16:57:19 +08:00
|
|
|
match 'projects/:id/feedback', :to => 'projects#feedback', :via => :get, :as => 'project_feedback'
|
|
|
|
match 'project/:id/share', :to => 'projects#share', :as => 'share_show' #share
|
2015-07-29 18:26:04 +08:00
|
|
|
post 'words/:id/leave_user_message', :to => 'words#leave_user_message', :as => "leave_user_message"
|
2016-06-30 10:44:11 +08:00
|
|
|
post 'words/:id/leave_syllabus_message', :to => 'words#leave_syllabus_message', :as => "leave_syllabus_message"
|
2015-10-22 09:20:19 +08:00
|
|
|
post 'words/:id/leave_homework_message', :to => 'words#leave_homework_message', :as => "leave_homework_message"
|
2016-05-06 17:36:28 +08:00
|
|
|
post 'words/:id/reply_to_homework', :to => 'words#reply_to_homework', :as => "reply_to_homework"
|
2016-07-25 13:56:26 +08:00
|
|
|
post 'words/:id/reply_to_syllabus', :to => 'words#reply_to_syllabus', :as => "reply_to_syllabus"
|
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'
|
2014-12-04 19:09:10 +08:00
|
|
|
post 'join_in/join_group', :to => 'courses#join_group', :as => 'join_group'
|
|
|
|
delete 'join_in/join_group', :to => 'courses#unjoin_group'
|
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-12-04 19:09:10 +08:00
|
|
|
match 'new_join_group', :to => 'courses#new_join_group', :as => 'try_join_group'
|
2014-04-15 16:57:19 +08:00
|
|
|
match 'projects/:id/respond', :to => 'projects#project_respond', :via => :post
|
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-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
|
|
|
|
2015-10-15 12:04:55 +08:00
|
|
|
post 'school/on_search'
|
2015-10-15 17:06:42 +08:00
|
|
|
post 'school/add_school'
|
2014-04-15 16:57:19 +08:00
|
|
|
######added by nie
|
2014-09-12 16:45:03 +08:00
|
|
|
match 'tags/show_projects_tags'
|
2014-04-15 16:57:19 +08:00
|
|
|
########### added by liuping
|
2014-09-12 16:45:03 +08:00
|
|
|
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"
|
2014-11-19 10:07:49 +08:00
|
|
|
match 'tags/remove_tag_new', :as=>"remove_tag_new"
|
2014-11-18 18:02:01 +08:00
|
|
|
match 'tags/tag_save', :as => "save_tag"
|
2015-09-15 10:31:59 +08:00
|
|
|
match 'tags/update_tag_name',:as => "update_tag_name"
|
2016-01-07 17:15:19 +08:00
|
|
|
match 'tags/update_project_tag_name',:as => "update_project_tag_name"
|
2015-12-16 11:17:06 +08:00
|
|
|
match 'tags/update_org_subfield_tag_name'
|
2014-09-12 16:45:03 +08:00
|
|
|
|
|
|
|
match 'words/add_brief_introdution'
|
2014-04-15 16:57:19 +08:00
|
|
|
|
2015-01-19 14:06:52 +08:00
|
|
|
##added by lizanle 日志查看路由
|
|
|
|
match 'system_log/index'
|
2015-01-22 16:40:22 +08:00
|
|
|
match 'system_log/access_analysis'
|
|
|
|
match 'system_log/time_analysis'
|
2015-01-19 14:06:52 +08:00
|
|
|
match "/system_log" ,:to => 'system_log#index'
|
|
|
|
match 'system_log/clear'
|
2016-01-06 16:22:13 +08:00
|
|
|
get 'upload_files_menu', :to => 'files#upload_files_menu'
|
2016-01-28 16:49:25 +08:00
|
|
|
get '/manual/feedback', to:redirect("http://forge.trustie.net/forums/1/memos/1168")
|
2015-01-19 14:06:52 +08:00
|
|
|
##ended by lizanle
|
|
|
|
|
2015-03-17 20:52:12 +08:00
|
|
|
resources :git_callback do
|
|
|
|
collection do
|
|
|
|
post 'post_update'
|
|
|
|
end
|
|
|
|
end
|
2014-08-20 10:50:29 +08:00
|
|
|
|
2015-12-09 09:59:13 +08:00
|
|
|
resources :at
|
2016-01-19 14:07:59 +08:00
|
|
|
resource :wechat, only:[:show, :create] do
|
|
|
|
collection do
|
|
|
|
get :login
|
2016-05-31 19:20:15 +08:00
|
|
|
get :user_activities
|
2016-01-19 14:07:59 +08:00
|
|
|
post :bind
|
2016-06-22 12:11:34 +08:00
|
|
|
post :get_bind
|
2016-08-09 09:23:06 +08:00
|
|
|
post :is_bind
|
2016-01-19 14:07:59 +08:00
|
|
|
end
|
|
|
|
end
|
2016-01-15 17:01:30 +08:00
|
|
|
|
2016-05-05 14:06:47 +08:00
|
|
|
resource :sso, only: [:show, :create]
|
2015-12-09 09:59:13 +08:00
|
|
|
|
2016-01-18 11:06:08 +08:00
|
|
|
get '/:sub_dir_name', :to => 'org_subfields#show', :as => 'show_subfield_without_id'
|
|
|
|
|
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
|