个人主页加入项目,如果已经申请了则提示已申请
This commit is contained in:
parent
30ce469483
commit
f7e8c5232c
2
Gemfile
2
Gemfile
|
@ -50,7 +50,7 @@ gem 'elasticsearch-model'
|
|||
gem 'elasticsearch-rails'
|
||||
|
||||
#rails 3.2.22.2 bug
|
||||
gem "test-unit", "~>3.0"
|
||||
# gem "test-unit", "~>3.0"
|
||||
|
||||
### profile
|
||||
# gem 'oneapm_rpm'
|
||||
|
|
|
@ -59,6 +59,8 @@ class AppliedProjectController < ApplicationController
|
|||
@flag = 2
|
||||
elsif params[:member].nil?
|
||||
@flag = 3
|
||||
elsif !AppliedProject.where(:project_id => @project.id, :user_id => User.current.id).first.nil?
|
||||
@flag = 5
|
||||
else
|
||||
@flag = 4
|
||||
role = params[:member] == "member_manager" ? 3 : (params[:member] == "member_developer" ? 4 :5)
|
||||
|
|
|
@ -15,6 +15,8 @@
|
|||
<p>请选择一个角色</p>
|
||||
<% elsif @flag == 4 %>
|
||||
<p>您的申请已提交,请等待项目管理员审批</p>
|
||||
<% elsif @flag == 5 %>
|
||||
<p>您已经申请加入该项目了,请耐心等待</p>
|
||||
<% end %>
|
||||
</li>
|
||||
<li>
|
||||
|
|
Loading…
Reference in New Issue