|
|
|
@ -1,7 +1,8 @@
|
|
|
|
|
|
|
|
|
|
<div class="project_r_h">
|
|
|
|
|
<h2 class="project_h2">邀请加入</h2>
|
|
|
|
|
</div>
|
|
|
|
|
<%= error_messages_for 'member' %>
|
|
|
|
|
<%#= render_flash_messages %>
|
|
|
|
|
<%
|
|
|
|
|
roles = Role.givable.all
|
|
|
|
|
if @project.project_type == Project::ProjectType_course
|
|
|
|
@ -14,36 +15,46 @@
|
|
|
|
|
|
|
|
|
|
<div style="margin-left: 30px" >
|
|
|
|
|
<div class="floatbox" style="margin:100px;">
|
|
|
|
|
<div ><a href="#" class="box_close"></a></div>
|
|
|
|
|
<div >
|
|
|
|
|
<a href="#" class="box_close"></a>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="cl"></div>
|
|
|
|
|
<div class="box_main">
|
|
|
|
|
<h3 class="box_h3">邀请Trustie注册用户</h3>
|
|
|
|
|
<% if roles.any? %>
|
|
|
|
|
<%= form_for(@member, {:as => :membership, :url => project_memberships_path(@project), :remote => true, :method => :post}) do |f| %>
|
|
|
|
|
<%= form_for(@member, {:as => :membership, :url => project_memberships_path(@project), :method => :post}) do |f| %>
|
|
|
|
|
<div class="invi_search">
|
|
|
|
|
<input hidden="hidden" value="true" name="flag">
|
|
|
|
|
<input id="principal_search" class="invi_search_input fl" type="text" placeholder="输入用户名称搜索好友">
|
|
|
|
|
<%= javascript_tag "observeSearchfield('principal_search', null, '#{ escape_javascript autocomplete_project_memberships_path(@project, :format => 'js',:flag => true) }')" %>
|
|
|
|
|
<div class="cl"></div>
|
|
|
|
|
|
|
|
|
|
<div class="invi_search">
|
|
|
|
|
<%= label_tag "principal_search", l(:label_principal_search) %>
|
|
|
|
|
<%= text_field_tag 'principal_search', nil %>
|
|
|
|
|
<%= javascript_tag "observeSearchfield('principal_search', null, '#{ escape_javascript autocomplete_project_memberships_path(@project, :format => 'js') }')" %>
|
|
|
|
|
<div id="principals_for_new_member">
|
|
|
|
|
<%= render_project_members(@project) %>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="cl"></div>
|
|
|
|
|
|
|
|
|
|
<div id="principals_for_new_member">
|
|
|
|
|
<%= render_principals_for_new_members(@project) %>
|
|
|
|
|
</div>
|
|
|
|
|
<p style="padding-top: 5px">
|
|
|
|
|
<%= l(:label_role_plural) %>:
|
|
|
|
|
<% roles.each do |role| %>
|
|
|
|
|
<label>
|
|
|
|
|
<%= check_box_tag 'membership[role_ids][]', role.id %>
|
|
|
|
|
<%= h role %>
|
|
|
|
|
</label>
|
|
|
|
|
<ul class="rolebox">
|
|
|
|
|
<li class="fl mr5">
|
|
|
|
|
<%= l(:label_role_plural) %>:
|
|
|
|
|
</li>
|
|
|
|
|
<% roles.each do |role| %>
|
|
|
|
|
<li class="fl mr5">
|
|
|
|
|
<%= check_box_tag 'membership[role_ids][]', role.id %>
|
|
|
|
|
<%= h role %>
|
|
|
|
|
</li>
|
|
|
|
|
<% end %>
|
|
|
|
|
</ul>
|
|
|
|
|
<div class="cl mb10"></div>
|
|
|
|
|
<a href="#" class="btn_free" onclick="$('#new_membership').submit();">
|
|
|
|
|
<%= l(:label_invite_members)%>
|
|
|
|
|
</a>
|
|
|
|
|
</div>
|
|
|
|
|
<!--<p>-->
|
|
|
|
|
<!--<%#= submit_tag l(:label_invite_members), :id => 'member-add-submit', :style => 'display:block; width:80px; text-align:center; color:#fff; height:26px; padding-top:3px; margin-bottom:10px;' %>-->
|
|
|
|
|
<!--</p>-->
|
|
|
|
|
<% end %>
|
|
|
|
|
</p>
|
|
|
|
|
<p>
|
|
|
|
|
<%= submit_tag l(:label_invite_members), :id => 'member-add-submit', :style => 'display:block; width:80px; text-align:center; color:#fff; height:26px; padding-top:3px; margin-bottom:10px;' %>
|
|
|
|
|
</p>
|
|
|
|
|
<% end %>
|
|
|
|
|
<% end %>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|