添加成员
This commit is contained in:
parent
b74c034237
commit
f37c292e99
|
@ -1,3 +1,4 @@
|
||||||
|
#encoding=utf-8
|
||||||
class ContestsController < ApplicationController
|
class ContestsController < ApplicationController
|
||||||
|
|
||||||
before_filter :find_contest, :only => [:show, :settings, :update]
|
before_filter :find_contest, :only => [:show, :settings, :update]
|
||||||
|
@ -56,6 +57,8 @@ class ContestsController < ApplicationController
|
||||||
end
|
end
|
||||||
|
|
||||||
def settings
|
def settings
|
||||||
|
@roles = ["管理人员","开发者","报告人员"]
|
||||||
|
@members = @contest.member_principals.includes(:roles, :principal).all.sort
|
||||||
end
|
end
|
||||||
|
|
||||||
def join_contest
|
def join_contest
|
||||||
|
|
|
@ -1,7 +1,8 @@
|
||||||
<div class="pro_new_setting_conbox fl " style="width:100%; border:none;">
|
<div class="pro_new_setting_conbox fl " style="width:100%; border:none;">
|
||||||
<a href="javascript:void(0);" class="fl sy_btn_green mb10 ml15">添加成员</a>
|
<a href="javascript:void(0);" class="fl sy_btn_green mb10 ml15" onclick="add_contest_member();">添加成员</a>
|
||||||
<div class="cl"></div>
|
<div class="cl"></div>
|
||||||
<div class=" sy_new_tchbox clear" style="margin-left:10px; margin-right:10px">
|
<div class=" sy_new_tchbox clear undis" style="margin-left:10px; margin-right:10px" id="add_contest_member">
|
||||||
|
<%= form_for(@member, {:as => :membership, :url => project_memberships_path(@contest), :remote => true, :method => :post}) do |f| %>
|
||||||
<div class="hw_search_box mb10">
|
<div class="hw_search_box mb10">
|
||||||
<input class=" sy_new_search" placeholder="支持姓名、邮箱、登录名搜索" type="text">
|
<input class=" sy_new_search" placeholder="支持姓名、邮箱、登录名搜索" type="text">
|
||||||
</div>
|
</div>
|
||||||
|
@ -29,6 +30,7 @@
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
<a href="javascript:void(0);" class="fr sy_btn_grey ">取消</a><a href="javascript:void(0);" class="fr sy_btn_blue mr5">保存</a>
|
<a href="javascript:void(0);" class="fr sy_btn_grey ">取消</a><a href="javascript:void(0);" class="fr sy_btn_blue mr5">保存</a>
|
||||||
|
<% end %>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class=" clear ml10 mr10" >
|
<div class=" clear ml10 mr10" >
|
||||||
|
@ -80,3 +82,9 @@
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
function add_contest_member(){
|
||||||
|
$("#add_contest_member").show();
|
||||||
|
}
|
||||||
|
</script>
|
Loading…
Reference in New Issue