修改重复加入项目提示语
This commit is contained in:
parent
9f6ff04e65
commit
d135274281
|
@ -10,8 +10,10 @@ class AppliedProjectController < ApplicationController
|
||||||
if @applieds.count == 0
|
if @applieds.count == 0
|
||||||
appliedproject = AppliedProject.create(:user_id => params[:user_id], :project_id => params[:project_id])
|
appliedproject = AppliedProject.create(:user_id => params[:user_id], :project_id => params[:project_id])
|
||||||
Mailer.applied_project(appliedproject).deliver
|
Mailer.applied_project(appliedproject).deliver
|
||||||
|
@status = 2
|
||||||
|
else
|
||||||
|
@status = 1
|
||||||
end
|
end
|
||||||
@status = 1
|
|
||||||
else
|
else
|
||||||
@status = 0
|
@status = 0
|
||||||
end
|
end
|
||||||
|
|
|
@ -1,6 +1,8 @@
|
||||||
<% if @status == 0%>
|
<% if @status == 0%>
|
||||||
alert("您申请的项目不存在");
|
alert("您申请的项目不存在");
|
||||||
<% elsif @status == 1%>
|
<% elsif @status == 1%>
|
||||||
|
alert("请勿重复申请加入该项目");
|
||||||
|
<% elsif @status == 2%>
|
||||||
alert("申请成功");
|
alert("申请成功");
|
||||||
<%else%>
|
<%else%>
|
||||||
alert("申请失败");
|
alert("申请失败");
|
||||||
|
|
Loading…
Reference in New Issue