<%= @competition.name %>

<% if @maximum_staff > 1 %>

<%= @competition.sub_title %>

<% unless User.current.logged? %> <%= link_to "创建战队", signin_path, :remote => true, :class => "enroll-in-b enroll-in-b-green fr" %> <% else %> <% unless @competition.enroll_end_time.present? && @competition.enroll_end_time < Time.now %> <% if !@can_enroll %> 创建战队 <% else %> 创建战队 <% end %> <% else %> 创建战队 <% end %> <% end %> <% unless User.current.logged? %> <%= link_to "加入战队", signin_path, :remote => true, :class => "enroll-in-b fr" %> <% else %> <% unless @competition.enroll_end_time.present? && @competition.enroll_end_time < Time.now %> <% if !@can_enroll %> 加入战队 <% else %> 加入战队 <% end %> <% else %> 加入战队 <% end %> <% end %>

<% else %> <% unless User.current.logged? %>

<%= link_to "立即报名", signin_path, :remote => true, :class => "enroll-in-b fr" %>

<% else %>

<% unless @competition.enroll_end_time.present? && @competition.enroll_end_time < Time.now %> <% if !@can_enroll %> 立即报名 <% else %> <%= link_to "立即报名", personal_enroll_competition_teams_path(:com_id => @competition.id), :remote => true, :class => "enroll-in-b enroll-in-b-green fr" %> <% end %> <% else %> 立即报名 <% end %>

<% end %> <% end %>
<% if @show_notice %>

您还未指定指导老师,将造成成绩无效

<% end %>
<% if @is_enroll.present? %>
<% if @maximum_staff > 1 %>
<% @is_enroll.each do |team| %>
  • <%= link_to image_tag(url_to_avatar(team.user), :width => "48", :height => "48", :class => "radius fl mr10"), user_path(team.user), :title => team.user.show_name, :target => "_blank", :alt => "用户头像" %> <%= team.name %> <% if team.teacher_id.present? %> <%= image_tag(url_to_avatar(team.teacher), :width => "26", :height => "26", :class => "radius fl mr4") %> <% end %> <% team.team_members.where("user_id != #{team.teacher_id.present? ? team.teacher_id : '-1'}")[0, 9].each do |member| %> <%= link_to image_tag(url_to_avatar(member.user), :width => "20", :height => "20", :class => "radius fl mr5 mt3"), user_path(member.user), :title => member.user.show_name, :target => "_blank", :class => "fl", :alt => "用户头像" %> <% end %> <% if team.team_members.size > 9 %> <% end %> 邀请码: <% if @competition.enroll_end_time.present? && @competition.enroll_end_time < Time.now %> <% if User.current.admin? || User.current == team.user %> <% end %> <% else %> <% if User.current.admin? || User.current == team.user %> <% else %> 退出 <% end %> <% end %> <%= link_to '进入大赛', competition_path(@competition), class: 'enrollOperation' %> <% if @competition.identifier == 'gcc-course-2019' %> <%= link_to '战队详情', competition_team_path(id: team.id), class: 'enrollOperation' %> <% end %>
  • <% end %>
    <% else %>
    已报名 <%= User.current.show_name %> <%= User.current.school_name %>
    <% end %>
    <% elsif !User.current.admin? %>

    您还未参与报名哦,赶紧来挑战吧~

    <% end %> <% if User.current.admin?%>
    搜索 战队数: 成员数: <%= @maximum_staff > 1 ? "战队总数" : "报名人数" %>:<%= @team_count %>
    <% if @teams.present? %> <%= render :partial => "competitions/team_list" %> <% else %>

    还没有人报名~

    <% end %>
    <% end %>