|
|
|
@ -5,16 +5,16 @@
|
|
|
|
|
<% @teams.each do |team| %>
|
|
|
|
|
<li class="clearfix">
|
|
|
|
|
<%= link_to image_tag(url_to_avatar(team.user), :width => "40", :height => "40", :class => "radius fl mr10"), user_path(team.user), :title => team.user.show_name, :target => "_blank", :alt => "用户头像" %>
|
|
|
|
|
<span class="fl task-hide mr20 mt10" style="width: 130px;" data-tip-down="<%= @competition.max_num > 1 ? team.name : team.user.show_name %>"><%= @competition.max_num > 1 ? team.name : team.user.show_name %></span>
|
|
|
|
|
<% if @competition.max_num > 1 %>
|
|
|
|
|
<span class="fl task-hide mr20 mt10" style="width: 130px;" data-tip-down="<%= @maximum_staff > 1 ? team.name : team.user.show_name %>"><%= @maximum_staff > 1 ? team.name : team.user.show_name %></span>
|
|
|
|
|
<% if @maximum_staff > 1 %>
|
|
|
|
|
<span class="fl mr40 mt10" style="width: 270px;">
|
|
|
|
|
<% if team.teacher_id.present? %>
|
|
|
|
|
<a href="<%= user_path(team.teacher) %>" class="fl" target="_blank" data-tip-down="指导老师:<%= team.teacher.show_name %>"><%= image_tag(url_to_avatar(team.teacher), :width => "26", :height => "26", :class => "radius fl mr4") %></a>
|
|
|
|
|
<% team.teachers.each do |teacher| %>
|
|
|
|
|
<%= link_to image_tag(url_to_avatar(teacher.user), width: 26, height: 26, class: 'radius fl mr4'), user_path(teacher.user), class: 'fl', target: '_blank', data: { 'tip-down' => "指导老师:#{teacher.user.show_name}" } %>
|
|
|
|
|
<% end %>
|
|
|
|
|
<% team.team_members.where("user_id != #{team.teacher_id.present? ? team.teacher_id : '-1'}")[0, 9].each do |member| %>
|
|
|
|
|
<% team.members.each do |member| %>
|
|
|
|
|
<%= link_to image_tag(url_to_avatar(member.user), :width => "20", :height => "20", :class => "radius fl mr4 mt3"), user_path(member.user), :title => member.user.show_name, :target => "_blank", :class => "fl", :alt => "用户头像" %>
|
|
|
|
|
<% end %>
|
|
|
|
|
<% if team.team_members.size > 9 %>
|
|
|
|
|
<% if team.members.size > 9 %>
|
|
|
|
|
<span class="team-p-s mt3">...</span>
|
|
|
|
|
<% end %>
|
|
|
|
|
</span>
|
|
|
|
|