|
|
@ -1,4 +1,5 @@
|
|
|
|
<% none_edit = @team.try(:id).present? && @competition.enroll_end_time.present? && @competition.enroll_end_time < Time.now %>
|
|
|
|
<% none_edit = @team.try(:id).present? && @competition.enroll_end_time.present? && @competition.enroll_end_time < Time.now %>
|
|
|
|
|
|
|
|
<% single_staff = @competition.competition_staffs.count == 1 %>
|
|
|
|
<%= labelled_form_for @team, :html => {:id => 'competition_team_form', :multipart => true, :remote => true} do |f| %>
|
|
|
|
<%= labelled_form_for @team, :html => {:id => 'competition_team_form', :multipart => true, :remote => true} do |f| %>
|
|
|
|
<% teacher_staff = @competition.competition_staffs.where(category: 'teacher').first %>
|
|
|
|
<% teacher_staff = @competition.competition_staffs.where(category: 'teacher').first %>
|
|
|
|
<% min_member_staff = @competition.competition_staffs.where('category != "teacher"').sum(:minimum) %>
|
|
|
|
<% min_member_staff = @competition.competition_staffs.where('category != "teacher"').sum(:minimum) %>
|
|
|
@ -10,19 +11,19 @@
|
|
|
|
<input type="hidden" id="team_id" value="<%= @team.try(:id) %>">
|
|
|
|
<input type="hidden" id="team_id" value="<%= @team.try(:id) %>">
|
|
|
|
<input type="hidden" name="com_id" value="<%= @competition.id %>">
|
|
|
|
<input type="hidden" name="com_id" value="<%= @competition.id %>">
|
|
|
|
|
|
|
|
|
|
|
|
<% if none_edit %>
|
|
|
|
<% if teacher_staff && none_edit %>
|
|
|
|
<p class="edu-txt-center color-orange">报名已截止,只能编辑导师信息</p>
|
|
|
|
<p class="edu-txt-center color-orange">报名已截止,只能编辑导师信息</p>
|
|
|
|
<% end %>
|
|
|
|
<% end %>
|
|
|
|
|
|
|
|
|
|
|
|
<div class="df pl20 pr20 mt10">
|
|
|
|
<div class="df pl20 pr20 mt10">
|
|
|
|
<label class="mt3"><span class="mr3 color-orange">*</span>队名:</label>
|
|
|
|
<label class="mt3"><span class="mr3 color-orange">*</span>队名:</label>
|
|
|
|
<input type="text" name="name" autocomplete="off" <%= none_edit ? "disabled" : "" %> maxlength="20" value="<%= @team.try(:name) %>" class="input-flex-35" placeholder="请输入您的组队名称"/>
|
|
|
|
<input type="text" name="name" autocomplete="off" <%= none_edit ? "disabled" : "" %> maxlength="20" value="<%= @team.try(:name) %>" class="input-flex-35" placeholder="请输入您的战队名称"/>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<p style="line-height: 27px;height: 27px"><span id="team_name_notice" class="color-orange-tip ml73 none"></span></p>
|
|
|
|
<p style="line-height: 27px;height: 27px"><span id="team_name_notice" class="color-orange-tip ml73 none"></span></p>
|
|
|
|
|
|
|
|
|
|
|
|
<% if teacher_staff.present? %>
|
|
|
|
<% if teacher_staff.present? %>
|
|
|
|
<div class="df pl20 pr20">
|
|
|
|
<div class="df pl20 pr20">
|
|
|
|
<label class="ml10 mt3">导师:</label>
|
|
|
|
<label class="ml10 mt3"><%= single_staff ? '队员' : '导师' %>:</label>
|
|
|
|
<div class="flex1 pr search-new">
|
|
|
|
<div class="flex1 pr search-new">
|
|
|
|
<input type="text" class="input-100-35 fl" autocomplete="off" placeholder="请您输入老师姓名进行搜索;可以后续再添加导师" id="teacher_search_input" value="">
|
|
|
|
<input type="text" class="input-100-35 fl" autocomplete="off" placeholder="请您输入老师姓名进行搜索;可以后续再添加导师" id="teacher_search_input" value="">
|
|
|
|
<input type="hidden" id="teacher_id" data-select="0" value="<%= @team.try(:id).present? ? @team.try(:teacher_id) : (@team_user.user_extensions.identity == 0 ? @team_user.id : "") %>">
|
|
|
|
<input type="hidden" id="teacher_id" data-select="0" value="<%= @team.try(:id).present? ? @team.try(:teacher_id) : (@team_user.user_extensions.identity == 0 ? @team_user.id : "") %>">
|
|
|
@ -41,7 +42,7 @@
|
|
|
|
<div class="df pl20 pr20">
|
|
|
|
<div class="df pl20 pr20">
|
|
|
|
<label class="mt3"><span class="mr3 color-orange">*</span>队员:</label>
|
|
|
|
<label class="mt3"><span class="mr3 color-orange">*</span>队员:</label>
|
|
|
|
<div class="flex1 search-new">
|
|
|
|
<div class="flex1 search-new">
|
|
|
|
<input type="text" class="search-new-input fl" <%= none_edit ? "disabled" : "" %> autocomplete="off" style="width: 100%" placeholder="请您输入想要添加的成员搜索" id="user_search_input">
|
|
|
|
<input type="text" class="search-new-input fl" <%= none_edit ? "disabled" : "" %> autocomplete="off" style="width: 100%" placeholder="请您输入想要添加的队员搜索" id="user_search_input">
|
|
|
|
<span class="search-span" style="background: #fff;"></span>
|
|
|
|
<span class="search-span" style="background: #fff;"></span>
|
|
|
|
<input type="hidden" id="member_id" data-select="0">
|
|
|
|
<input type="hidden" id="member_id" data-select="0">
|
|
|
|
<input type="hidden" id="member_name">
|
|
|
|
<input type="hidden" id="member_name">
|
|
|
@ -51,7 +52,7 @@
|
|
|
|
<ul class="pointerTeacher none" id="pointerStudent">
|
|
|
|
<ul class="pointerTeacher none" id="pointerStudent">
|
|
|
|
</ul>
|
|
|
|
</ul>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<a class="fl ml20 white-btn edu-blueback-btn mt4 add-member-btn" style="display: none;" onclick="<%= none_edit ? '' : 'add_member()' %>">添加成员</a>
|
|
|
|
<a class="fl ml20 white-btn edu-blueback-btn mt4 add-member-btn" style="display: none;" onclick="<%= none_edit ? '' : 'add_member()' %>">添加队员</a>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<p style="line-height: 27px;height: 27px"><span id="member_notice" class="color-orange-tip ml73 none"></span></p>
|
|
|
|
<p style="line-height: 27px;height: 27px"><span id="member_notice" class="color-orange-tip ml73 none"></span></p>
|
|
|
|
<% end %>
|
|
|
|
<% end %>
|
|
|
@ -68,7 +69,7 @@
|
|
|
|
<% creator_teacher = @team.user.user_extensions.identity == 0 %>
|
|
|
|
<% creator_teacher = @team.user.user_extensions.identity == 0 %>
|
|
|
|
<p class="personListLine clearfix pt5 pb5 personListMember <%= creator_teacher ? 'team-teacher' : 'team-member' %>" id="create_li">
|
|
|
|
<p class="personListLine clearfix pt5 pb5 personListMember <%= creator_teacher ? 'team-teacher' : 'team-member' %>" id="create_li">
|
|
|
|
<span class="t-c-1"><%= @team.user.show_name %></span>
|
|
|
|
<span class="t-c-1"><%= @team.user.show_name %></span>
|
|
|
|
<span class="t-c-2"><%= @team.user.user_extensions.identity == 0 ? "导师/创建者" : "创建者" %></span>
|
|
|
|
<span class="t-c-2"><%= @team.user.user_extensions.identity == 0 ? "#{ single_staff ? '队长' : '导师' }/创建者" : "#{ single_staff ? '队长/' : '' }创建者" %></span>
|
|
|
|
<span class="t-c-3"><%= @team.user.school_name %></span>
|
|
|
|
<span class="t-c-3"><%= @team.user.school_name %></span>
|
|
|
|
<span class="t-c-4"><%= @team.user.user_extensions.identity == 0 ? "职称:#{@team.user.identity}" : "学号:#{@team.user.user_extensions.student_id.present? ? @team.user.user_extensions.student_id : "--"}" %></span>
|
|
|
|
<span class="t-c-4"><%= @team.user.user_extensions.identity == 0 ? "职称:#{@team.user.identity}" : "学号:#{@team.user.user_extensions.student_id.present? ? @team.user.user_extensions.student_id : "--"}" %></span>
|
|
|
|
<span class="t-c-5"></span>
|
|
|
|
<span class="t-c-5"></span>
|
|
|
@ -79,7 +80,7 @@
|
|
|
|
<p class="personListLine clearfix pt5 pb5 personListMember team-teacher team-teacher-<%= teacher.user.id %>">
|
|
|
|
<p class="personListLine clearfix pt5 pb5 personListMember team-teacher team-teacher-<%= teacher.user.id %>">
|
|
|
|
<input type="hidden" name="teacher_ids[]" value="<%= teacher.user.id %>">
|
|
|
|
<input type="hidden" name="teacher_ids[]" value="<%= teacher.user.id %>">
|
|
|
|
<span class="t-c-1"><%= teacher.user.show_name %></span>
|
|
|
|
<span class="t-c-1"><%= teacher.user.show_name %></span>
|
|
|
|
<span class="t-c-2">导师</span>
|
|
|
|
<span class="t-c-2"><%= single_staff ? '队员' : '导师' %></span>
|
|
|
|
<span class="t-c-3"><%= teacher.user.school_name %></span>
|
|
|
|
<span class="t-c-3"><%= teacher.user.school_name %></span>
|
|
|
|
<span class="t-c-4">职称:<%= teacher.user.identity %></span>
|
|
|
|
<span class="t-c-4">职称:<%= teacher.user.identity %></span>
|
|
|
|
<span class="t-c-5"><span class="delete_member" data-tip-down="删除"><i class="iconfont icon-guanbi font-14 color-grey-c"></i></span></span>
|
|
|
|
<span class="t-c-5"><span class="delete_member" data-tip-down="删除"><i class="iconfont icon-guanbi font-14 color-grey-c"></i></span></span>
|
|
|
@ -91,7 +92,7 @@
|
|
|
|
<p class="personListLine clearfix pt3 pb3 personListMember team-member">
|
|
|
|
<p class="personListLine clearfix pt3 pb3 personListMember team-member">
|
|
|
|
<input type="hidden" name="member_ids[]" value="<%= team_user.user_id %>">
|
|
|
|
<input type="hidden" name="member_ids[]" value="<%= team_user.user_id %>">
|
|
|
|
<span class="t-c-1"><%= team_user.user.show_name %></span>
|
|
|
|
<span class="t-c-1"><%= team_user.user.show_name %></span>
|
|
|
|
<span class="t-c-2">成员</span>
|
|
|
|
<span class="t-c-2">队员</span>
|
|
|
|
<span class="t-c-3"><%= team_user.user.school_name %></span>
|
|
|
|
<span class="t-c-3"><%= team_user.user.school_name %></span>
|
|
|
|
<span class="t-c-4">学号:<%= team_user.user.user_extensions.student_id.present? ? team_user.user.user_extensions.student_id : "--" %></span>
|
|
|
|
<span class="t-c-4">学号:<%= team_user.user.user_extensions.student_id.present? ? team_user.user.user_extensions.student_id : "--" %></span>
|
|
|
|
<span class="t-c-5">
|
|
|
|
<span class="t-c-5">
|
|
|
@ -105,7 +106,7 @@
|
|
|
|
<% creator_teacher = @team_user.user_extensions.identity == 0 %>
|
|
|
|
<% creator_teacher = @team_user.user_extensions.identity == 0 %>
|
|
|
|
<p class="personListLine clearfix pt5 pb5 personListMember <%= creator_teacher ? 'team-teacher' : 'team-member' %>" id="create_li">
|
|
|
|
<p class="personListLine clearfix pt5 pb5 personListMember <%= creator_teacher ? 'team-teacher' : 'team-member' %>" id="create_li">
|
|
|
|
<span class="t-c-1"><%= @team_user.show_name %></span>
|
|
|
|
<span class="t-c-1"><%= @team_user.show_name %></span>
|
|
|
|
<span class="t-c-2"><%= @team_user.user_extensions.identity == 0 ? "导师/创建者" : "创建者" %></span>
|
|
|
|
<span class="t-c-2"><%= @team_user.user_extensions.identity == 0 ? "#{ single_staff ? '队长' : '导师' }/创建者" : "#{ single_staff ? '队长/' : '' }创建者" %></span>
|
|
|
|
<span class="t-c-3"><%= @team_user.school_name %></span>
|
|
|
|
<span class="t-c-3"><%= @team_user.school_name %></span>
|
|
|
|
<span class="t-c-4"><%= @team_user.user_extensions.identity == 0 ? "职称:#{@team_user.identity}" : "学号:#{@team_user.user_extensions.student_id.present? ? @team_user.user_extensions.student_id : "--"}" %></span>
|
|
|
|
<span class="t-c-4"><%= @team_user.user_extensions.identity == 0 ? "职称:#{@team_user.identity}" : "学号:#{@team_user.user_extensions.student_id.present? ? @team_user.user_extensions.student_id : "--"}" %></span>
|
|
|
|
<span class="t-c-5"></span>
|
|
|
|
<span class="t-c-5"></span>
|
|
|
@ -167,7 +168,7 @@
|
|
|
|
var li = '<p class="personListLine clearfix pt3 pb3 personListMember team-teacher team-teacher-' + $("#teacher_id").val() + '">' +
|
|
|
|
var li = '<p class="personListLine clearfix pt3 pb3 personListMember team-teacher team-teacher-' + $("#teacher_id").val() + '">' +
|
|
|
|
' <input type="hidden" name="teacher_ids[]" value="'+$("#teacher_id").val()+'">' +
|
|
|
|
' <input type="hidden" name="teacher_ids[]" value="'+$("#teacher_id").val()+'">' +
|
|
|
|
' <span class="t-c-1">'+$("#teacher_name").val()+'</span>' +
|
|
|
|
' <span class="t-c-1">'+$("#teacher_name").val()+'</span>' +
|
|
|
|
' <span class="t-c-2">导师</span>' +
|
|
|
|
' <span class="t-c-2"><%= single_staff ? "队员" : "导师" %></span>' +
|
|
|
|
' <span class="t-c-3">'+$("#teacher_school").val()+'</span>' +
|
|
|
|
' <span class="t-c-3">'+$("#teacher_school").val()+'</span>' +
|
|
|
|
' <span class="t-c-4">职称:'+$("#teacher_title").val()+'</span>' +
|
|
|
|
' <span class="t-c-4">职称:'+$("#teacher_title").val()+'</span>' +
|
|
|
|
' <span class="t-c-5"><span class="delete_member" data-tip-down="删除"><i class="iconfont icon-guanbi font-14 color-grey-c"></i></span></span>' +
|
|
|
|
' <span class="t-c-5"><span class="delete_member" data-tip-down="删除"><i class="iconfont icon-guanbi font-14 color-grey-c"></i></span></span>' +
|
|
|
@ -193,7 +194,7 @@
|
|
|
|
var li = '<p class="personListLine clearfix pt3 pb3 personListMember team-member team-member-' + $("#member_id").val() + '">' +
|
|
|
|
var li = '<p class="personListLine clearfix pt3 pb3 personListMember team-member team-member-' + $("#member_id").val() + '">' +
|
|
|
|
' <input type="hidden" name="member_ids[]" value="'+$("#member_id").val()+'">' +
|
|
|
|
' <input type="hidden" name="member_ids[]" value="'+$("#member_id").val()+'">' +
|
|
|
|
' <span class="t-c-1">'+$("#member_name").val()+'</span>' +
|
|
|
|
' <span class="t-c-1">'+$("#member_name").val()+'</span>' +
|
|
|
|
' <span class="t-c-2">成员</span>' +
|
|
|
|
' <span class="t-c-2">队员</span>' +
|
|
|
|
' <span class="t-c-3">'+$("#member_school").val()+'</span>' +
|
|
|
|
' <span class="t-c-3">'+$("#member_school").val()+'</span>' +
|
|
|
|
' <span class="t-c-4">学号:'+$("#member_student_id").val()+'</span>' +
|
|
|
|
' <span class="t-c-4">学号:'+$("#member_student_id").val()+'</span>' +
|
|
|
|
' <span class="t-c-5"><span class="delete_member" data-tip-down="删除"><i class="iconfont icon-guanbi font-14 color-grey-c"></i></span></span>' +
|
|
|
|
' <span class="t-c-5"><span class="delete_member" data-tip-down="删除"><i class="iconfont icon-guanbi font-14 color-grey-c"></i></span></span>' +
|
|
|
|