% contests.each do |contest|%>
<% is_teacher = User.current.logged? && (User.current.admin? || User.current.admin_of_contest?(contest)) %>
<% count = ShieldActivity.where("container_type='User' and container_id=#{user.id} and shield_type='Contest' and shield_id=#{contest.id}").count %>
-
<% if is_teacher %>
-
<%= link_to "提交",works_path(:contest => contest.id), :class => 'user_navmore_li fl', :target => '_blank' %>
<%= link_to '+',works_path(:contest => contest.id,:is_new => 1), :class => 'user_navmore_add fl', :title => '发布作品',:target => '_blank' %>
-
<%= link_to "通知", contest_news_index_path(contest), :class => 'user_navmore_li fl',:target => '_blank' %>
<%= link_to "+", new_contest_news_path(contest,:is_new=>1), :class => 'user_navmore_add fl', :title => '发布通知',:target => '_blank' %>
-
<%= link_to "论坛", contest_boards_path(contest), :class => 'user_navmore_li fl',:target => '_blank' %>
<%= link_to "+", contest_boards_path(contest, :flag => true, :is_new => 1), :class => 'user_navmore_add fl', :title => '发布帖子',:target => '_blank' %>
<% else %>
-
<%= link_to "提交",works_path(:contest => contest.id), :class => 'user_navmore_li', :target => '_blank' %>
-
<%= link_to "通知", contest_news_index_path(contest), :class => 'user_navmore_li',:target => '_blank' %>
-
<%= link_to "论坛", contest_boards_path(contest), :class => 'user_navmore_li fl',:target => '_blank' %>
<% end %>
<% if User.current == user %>
-
<%= link_to "取消收藏", cancel_or_collect_user_path(user, :contest => contest.id), :class => 'user_navmore_li',:target => '_blank', :remote => true %>
-
<% if count == 0 %>
<%= link_to "屏蔽动态", shield_activities_path(:user_id => user.id, :contest_id => contest.id), :method => 'post', :class => 'user_navmore_li',:remote => true %>
<% else %>
<%= link_to "显示动态", show_acts_shield_activities_path(:user_id => user.id, :contest_id => contest.id),:remote => true,:method => 'delete', :class => 'user_navmore_li' %>
<% end %>
<% end %>
<% end %>
<% if all_count > (page.to_i+1) * 10%>
<% end%>