From 90a81ee1f17d204bf5afc9da8d4c7bc3c102cf21 Mon Sep 17 00:00:00 2001 From: sw <939547590@qq.com> Date: Thu, 22 Jan 2015 17:03:01 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E7=BD=91=E7=AB=99=E9=A1=B9?= =?UTF-8?q?=E7=9B=AE=E9=A6=96=E9=A1=B5=E5=8A=A0=E5=85=A5=E9=A1=B9=E7=9B=AE?= =?UTF-8?q?=E7=9A=84=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/projects_controller.rb | 10 ++- app/views/projects/_join_project.html.erb | 83 +++++++++++++++++++++++ app/views/projects/join_project.js.erb | 9 +++ app/views/welcome/index.html.erb | 3 + config/locales/zh.yml | 1 + config/routes.rb | 4 ++ 6 files changed, 109 insertions(+), 1 deletion(-) create mode 100644 app/views/projects/_join_project.html.erb create mode 100644 app/views/projects/join_project.js.erb diff --git a/app/controllers/projects_controller.rb b/app/controllers/projects_controller.rb index 24a3ff19f..a2e793a10 100644 --- a/app/controllers/projects_controller.rb +++ b/app/controllers/projects_controller.rb @@ -35,7 +35,7 @@ class ProjectsController < ApplicationController # edit before_filter :authorize1, :only => [:show] # - before_filter :find_project, :except => [ :index, :search,:list, :new, :create, :copy, :statistics, :new_join, :course, :enterprise_course, :course_enterprise,:view_homework_attaches] + before_filter :find_project, :except => [ :index, :search,:list, :new, :create, :copy, :statistics, :new_join, :course, :enterprise_course, :course_enterprise,:view_homework_attaches,:join_project] # before_filter :authorize, :except => [:new_join, :new_homework, :homework, :statistics, :search, :watcherlist, :index, :list, :new, :create, :copy, :archive, :unarchive, :destroy, :member, :focus, :file, # :statistics, :feedback, :course, :enterprise_course, :course_enterprise, :project_respond, :share, # :show_projects_score, :issue_score_index, :news_score_index, :file_score_index, :code_submit_score_index, :projects_topic_score_index] @@ -917,6 +917,14 @@ class ProjectsController < ApplicationController end end end + + #加入私有项目 + def join_project + respond_to do |format| + format.js + end + end + private def memberAccess diff --git a/app/views/projects/_join_project.html.erb b/app/views/projects/_join_project.html.erb new file mode 100644 index 000000000..c7ce29dae --- /dev/null +++ b/app/views/projects/_join_project.html.erb @@ -0,0 +1,83 @@ + + +
+ +只要持有项目的ID,就可快速申请加入所在项目。项目页面搜索不到的私有项目只能从此通道进入哦!
+