<%= link_to @contest.user.try(:show_name), user_path(@contest.user), :class => "sy_cgrey" %>  >  <%= link_to @contest.name, contest_path(@contest), :class => "sy_cgrey" %>

<% if User.current.admin_of_contest?(@contest) %> <%= render :partial => "contests/mamager_setting" %> <% end %>

<%= @contest.name %>

管理员:<%= contest_managers(@contest).count %> 评委:<%= contest_judges(@contest).count %> 参赛者:<%= contest_contestants(@contest).count %>

<% if User.current.member_of_contest?(@contest) %> <% if @contest.contest_members.where(:user_id => User.current.id)[0].contest_member_roles.count == 2 %> <% if User.current.admin_of_contest?(@contest) %> <%= link_to '评委身份', switch_role_contest_path(@contest, :user_id => User.current.id, :curr_role => 13, :tar_role => 14), :class => "fr sy_btn_blue mt28 ml10", :title => "由管理员身份切换至评委身份" %> <% elsif User.current.judge_of_contest?(@contest) %> <%= link_to '管理员身份', switch_role_contest_path(@contest, :user_id => User.current.id, :curr_role => 14, :tar_role => 13), :class => "fr sy_btn_blue mt28 ml10", :title => "由评委身份切换至管理员身份" %> <% end %> <% end %> <% else %> <%= link_to "加入竞赛",join_contest_contests_path(),:remote => true, :method => "get", :class => "fr sy_btn_blue mt28 ml10" %> <% end %> 邀请码:<%= @contest.invite_code %>