You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
41 lines
2.1 KiB
41 lines
2.1 KiB
<% if @competition.identifier == 'hn' || @competition.identifier == 'gcc-dev-2018' || @competition.identifier == "gcc-annotation-2018" || @competition.identifier == "gcc-task-2019" || @competition.identifier == "gcc-course-2019" %>
|
|
<div class="competion-ranking">
|
|
<div class="ranking-nav edu-txt-center clearfix">
|
|
<div class="inline">
|
|
<% if @competition.identifier == "gcc-annotation-2018" %>
|
|
<li class="active"><a href="<%= charts_competition_path(@competition) %>" data-remote="true">开源标注正赛排行榜</a></li>
|
|
<% elsif @competition.identifier == "gcc-course-2019" %>
|
|
<li class="active"><a href="<%= charts_competition_path(@competition) %>" data-remote="true">排行榜</a></li>
|
|
<% else %>
|
|
<% if @max_min_stage.count == 1 %>
|
|
<li class="active"><a href="<%= charts_competition_path(@competition) %>" data-remote="true">排行榜</a></li>
|
|
<% else %>
|
|
<% if @competition.end_time < Time.now %>
|
|
<li class="<%= @type == "总排行榜" ? "active" : "" %>"><a href="<%= charts_competition_path(@competition) %>" data-remote="true">总排行榜</a></li>
|
|
<% end %>
|
|
<% @max_min_stage.reverse.each do |section| %>
|
|
<% stage = section.competition_stage %>
|
|
<% if stage.name != "模拟赛" && !stage.name.blank? %>
|
|
<% if section.min_start_time < Time.now %>
|
|
<li class="<%= @type == stage.name ? "active" : "" %>"><a href="<%= charts_competition_path(@competition, :stage_id => stage.id) %>" data-remote="true"><%= stage.name %>排行榜</a></li>
|
|
<% end %>
|
|
<% end %>
|
|
<% end %>
|
|
<% end %>
|
|
<% end %>
|
|
</div>
|
|
</div>
|
|
|
|
<div id="chart_list">
|
|
<%= render :partial => "competitions/chartList" %>
|
|
</div>
|
|
</div>
|
|
<% end %>
|
|
<script>
|
|
$(function(){
|
|
$(".ranking-nav li a").on("click", function(){
|
|
$(".ranking-nav li").removeClass("active");
|
|
$(this).parent().addClass("active");
|
|
});
|
|
});
|
|
</script> |