diff --git a/app/controllers/projects_controller.rb b/app/controllers/projects_controller.rb index 7e549509b..1428b4997 100644 --- a/app/controllers/projects_controller.rb +++ b/app/controllers/projects_controller.rb @@ -332,10 +332,18 @@ class ProjectsController < ApplicationController @wiki ||= @project.wiki end - + def send_mail_to_member + unless params[:mail].nil? + email = params[:mail] + Mailer.send_invite_in_project(email, @project, User.current).deliver + end + end #发送邮件邀请新用户 def invite_members_by_mail - + respond_to do |format| + format.html + format.js + end end # 邀请Trustie注册用户 diff --git a/app/views/layouts/base_projects.html.erb b/app/views/layouts/base_projects.html.erb index 40f13a2f8..de85e7257 100644 --- a/app/views/layouts/base_projects.html.erb +++ b/app/views/layouts/base_projects.html.erb @@ -129,7 +129,7 @@