添加成员
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,34 +1,36 @@
|
||||||
<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">
|
||||||
<div class="hw_search_box mb10">
|
<%= form_for(@member, {:as => :membership, :url => project_memberships_path(@contest), :remote => true, :method => :post}) do |f| %>
|
||||||
<input class=" sy_new_search" placeholder="支持姓名、邮箱、登录名搜索" type="text">
|
<div class="hw_search_box mb10">
|
||||||
</div>
|
<input class=" sy_new_search" placeholder="支持姓名、邮箱、登录名搜索" type="text">
|
||||||
<div class="clear mb10">
|
</div>
|
||||||
<ul class="pro_new_idlist fl">
|
<div class="clear mb10">
|
||||||
<li class=" clear " ><input type="checkbox" class="mr5 fl" ><span class="fl pro_new_idname mt3">shashashashashashasshashashashashashshashashashashashshashashashashashshashashashashashhasha</span></li>
|
<ul class="pro_new_idlist fl">
|
||||||
<li class=" clear "><input type="checkbox" class="mr5 fl" ><span class="fl mt3">shashashashashashashasha</span></li>
|
<li class=" clear " ><input type="checkbox" class="mr5 fl" ><span class="fl pro_new_idname mt3">shashashashashashasshashashashashashshashashashashashshashashashashashshashashashashashhasha</span></li>
|
||||||
<li class=" clear "><input type="checkbox" class="mr5 fl" ><span class="fl mt3">shashashashashashashasha</span></li>
|
<li class=" clear "><input type="checkbox" class="mr5 fl" ><span class="fl mt3">shashashashashashashasha</span></li>
|
||||||
<li class=" clear "><input type="checkbox" class="mr5 fl" ><span class="fl mt3">shashashashashashashasha</span></li>
|
<li class=" clear "><input type="checkbox" class="mr5 fl" ><span class="fl mt3">shashashashashashashasha</span></li>
|
||||||
|
<li class=" clear "><input type="checkbox" class="mr5 fl" ><span class="fl mt3">shashashashashashashasha</span></li>
|
||||||
|
|
||||||
</ul>
|
</ul>
|
||||||
<ul class="fl pro_new_idbox">
|
<ul class="fl pro_new_idbox">
|
||||||
<li class="clear ">
|
<li class="clear ">
|
||||||
<input type="checkbox" class="mt2 fl" >
|
<input type="checkbox" class="mt2 fl" >
|
||||||
<p class="fl ml5"> 管理员</p>
|
<p class="fl ml5"> 管理员</p>
|
||||||
</li>
|
</li>
|
||||||
<li class="clear ">
|
<li class="clear ">
|
||||||
<input type="checkbox" class="mt2 fl" >
|
<input type="checkbox" class="mt2 fl" >
|
||||||
<p class="fl ml5"> 评委</p>
|
<p class="fl ml5"> 评委</p>
|
||||||
</li>
|
</li>
|
||||||
<li class="clear ">
|
<li class="clear ">
|
||||||
<input type="checkbox" class="mt2 fl" >
|
<input type="checkbox" class="mt2 fl" >
|
||||||
<p class="fl ml5"> 参赛者</p>
|
<p class="fl ml5"> 参赛者</p>
|
||||||
</li>
|
</li>
|
||||||
</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" >
|
||||||
|
@ -79,4 +81,10 @@
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
function add_contest_member(){
|
||||||
|
$("#add_contest_member").show();
|
||||||
|
}
|
||||||
|
</script>
|
Loading…
Reference in New Issue