2016-12-23 14:41:21 +08:00
|
|
|
|
<% work_num = visable_contest_work @contest %>
|
2016-12-23 21:44:03 +08:00
|
|
|
|
<% is_admin = User.current.admin? || User.current.admin_of_contest?(@contest) %>
|
2016-12-22 14:47:42 +08:00
|
|
|
|
<!DOCTYPE html>
|
|
|
|
|
<html lang="en">
|
|
|
|
|
<head>
|
|
|
|
|
<meta charset="utf-8" />
|
|
|
|
|
<title><%= h html_title %></title>
|
|
|
|
|
<meta name="description" content="<%= Redmine::Info.app_name %>" />
|
|
|
|
|
<meta name="keywords" content="issue,bug,tracker" />
|
|
|
|
|
<%= csrf_meta_tag %>
|
|
|
|
|
<%= favicon %>
|
|
|
|
|
<%= javascript_heads %>
|
|
|
|
|
<%= heads_for_theme %>
|
|
|
|
|
<%= call_hook :view_layouts_base_html_head %>
|
2017-01-06 15:03:01 +08:00
|
|
|
|
<%= stylesheet_link_tag 'jquery/jquery-ui-1.9.2','css/common','css/public', 'css/structure','prettify', 'css/courses','css/popup','sy_public','syllabus', 'css/moduel','css/contest'%>
|
2017-01-06 15:52:34 +08:00
|
|
|
|
<%= javascript_include_tag "course","avatars","header","attachments",'prettify','contest' %>
|
2016-12-22 14:47:42 +08:00
|
|
|
|
<!-- page specific tags -->
|
|
|
|
|
<%= yield :header_tags -%>
|
2017-01-06 15:03:01 +08:00
|
|
|
|
|
|
|
|
|
<!-- MathJax的配置 -->
|
|
|
|
|
<script type="text/javascript" src="/javascripts/MathJax/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>
|
|
|
|
|
<!-- 配置 : 在生成的公式图片上去掉Math定义的右键菜单,$$ $$ \( \) \[ \] 中的公式给予显示-->
|
|
|
|
|
<script type="text/x-mathjax-config">
|
|
|
|
|
MathJax.Hub.Config({
|
|
|
|
|
showMathMenu: false,
|
|
|
|
|
showMathMenuMSIE: false,
|
|
|
|
|
tex2jax: {inlineMath: [['$','$'], ['\\(','\\)']]}
|
|
|
|
|
});
|
|
|
|
|
</script>
|
2016-12-22 14:47:42 +08:00
|
|
|
|
</head>
|
|
|
|
|
|
|
|
|
|
<!--add by huang-->
|
|
|
|
|
<body onload="prettyPrint();">
|
|
|
|
|
<div class="navContainer mb10"> <%= render :partial => User.current.logged? ? 'layouts/logined_header' : 'layouts/unlogin_header' %></div>
|
|
|
|
|
<div class="cl"></div>
|
|
|
|
|
|
|
|
|
|
<div id="Container">
|
2016-12-22 15:17:02 +08:00
|
|
|
|
<div class="sy_contanier">
|
2016-12-23 21:44:03 +08:00
|
|
|
|
<div class="sy_class_infobox" id="contest_base_info">
|
|
|
|
|
<%= render :partial => 'contests/contest_base_info' %>
|
2016-12-22 15:17:02 +08:00
|
|
|
|
</div>
|
|
|
|
|
<div class="sy_content ">
|
|
|
|
|
<div class="sy_class_l fl">
|
|
|
|
|
<div class="sy_class_leftnav mb12" >
|
|
|
|
|
<ul class="accordion">
|
2016-12-23 14:41:21 +08:00
|
|
|
|
<li id="sy_01" class="sy_icons_game">
|
|
|
|
|
<%= link_to '竞赛首页', contest_path(@contest) %>
|
|
|
|
|
</li>
|
|
|
|
|
<li id="sy_02" class="sy_icons_index">
|
|
|
|
|
<%= link_to '动态', contest_activities_contest_path(@contest) %>
|
|
|
|
|
</li>
|
|
|
|
|
<!--<li id="sy_03" class="sy_icons_boards"> <a href="">讨论区<span>26</span></a> <a href="javascript:void(0);" class="sy_class_add"></a></li>-->
|
|
|
|
|
<li id="sy_03" class="sy_icons_hwork">
|
2016-12-30 13:58:09 +08:00
|
|
|
|
<a href="<%= works_path(:contest => @contest) %>">提交<span><%= work_num%></span></a>
|
2016-12-23 21:44:03 +08:00
|
|
|
|
<% if is_admin %>
|
2016-12-23 14:41:21 +08:00
|
|
|
|
<a href="<%= works_path(:contest => @contest.id,:is_new => 1) %>" class="sy_class_add"></a>
|
2016-12-23 21:44:03 +08:00
|
|
|
|
<% end %>
|
2016-12-23 14:41:21 +08:00
|
|
|
|
</li>
|
2017-01-04 14:01:46 +08:00
|
|
|
|
<% contest_board = @contest.boards.where("parent_id is NULL").first %>
|
2016-12-30 16:37:20 +08:00
|
|
|
|
<li id="sy_04" class="sy_icons_boards">
|
2017-01-04 14:01:46 +08:00
|
|
|
|
<% count = contest_board ? contest_board.messages.count : 0 %>
|
2016-12-30 16:37:20 +08:00
|
|
|
|
<a href="<%=contest_boards_path(@contest) %>">讨论区<span><%=count %></span></a>
|
|
|
|
|
<%= link_to( "",contest_boards_path(@contest, :flag => true, :is_new => 1), :class => 'sy_class_add', :title =>"#{l(:label_message_new)}") if is_admin %>
|
|
|
|
|
</li>
|
2017-01-04 14:01:46 +08:00
|
|
|
|
<div id="board_children_list">
|
2017-01-06 22:35:44 +08:00
|
|
|
|
<%= render :partial => 'layouts/contest_board_children_list', :locals => {:contest_board => contest_board} if contest_board %>
|
2017-01-04 14:01:46 +08:00
|
|
|
|
</div>
|
2016-12-23 20:27:16 +08:00
|
|
|
|
<li id="sy_05" class="sy_icons_news">
|
|
|
|
|
<%= link_to "通知<span>#{@contest.news.count}</span>".html_safe, contest_news_index_path(@contest), :class => "sy_icons_feedback" %>
|
2016-12-24 16:29:10 +08:00
|
|
|
|
<% if is_admin %>
|
|
|
|
|
<%= link_to "", contest_news_index_path(@contest,:is_new => 1), :class => "sy_class_add" %>
|
|
|
|
|
<% end %>
|
2016-12-23 20:27:16 +08:00
|
|
|
|
</li>
|
2016-12-23 14:41:21 +08:00
|
|
|
|
<!--<li id="sy_06" class="sy_icons_feedback"> <a href="">留言<span>26</span></a> <a href="javascript:void(0);" class="sy_class_add"></a></li>-->
|
2016-12-22 15:17:02 +08:00
|
|
|
|
</ul>
|
|
|
|
|
</div><!--sy_class_leftnav end-->
|
|
|
|
|
</div><!--sy_class_l end-->
|
2016-12-22 14:47:42 +08:00
|
|
|
|
|
2016-12-22 15:17:02 +08:00
|
|
|
|
<%= render_flash_messages %>
|
2016-12-23 14:41:21 +08:00
|
|
|
|
<div class="fl">
|
|
|
|
|
<%= yield %>
|
|
|
|
|
</div><!--sy_class_r end-->
|
|
|
|
|
<div class="cl"></div>
|
2016-12-22 15:17:02 +08:00
|
|
|
|
<%= call_hook :view_layouts_base_content %>
|
|
|
|
|
<div style="clear:both;"></div>
|
|
|
|
|
<div class="cl"></div>
|
|
|
|
|
</div><!--sy_content end-->
|
|
|
|
|
</div>
|
2016-12-22 14:47:42 +08:00
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<div class="cl"></div>
|
|
|
|
|
<%= render :partial => 'layouts/footer' %>
|
|
|
|
|
<div class="cl"></div>
|
|
|
|
|
<% if hidden_unproject_infos %>
|
|
|
|
|
<%= render :partial => 'layouts/new_feedback' %>
|
|
|
|
|
<% end %>
|
|
|
|
|
<div id="ajax-indicator" style="display:none;">
|
|
|
|
|
<span><%= l(:label_loading) %></span>
|
|
|
|
|
</div>
|
|
|
|
|
<div id="ajax-modal" style="display:none;"></div>
|
|
|
|
|
<div id="nh_tx_dialog_html" class="white_content" style="display:none;">
|
2017-01-06 15:52:34 +08:00
|
|
|
|
<%=render :partial => 'contests/upload_img', :locals => {:source => @contest} %>
|
|
|
|
|
<%#=render :partial => 'layouts/upload_avatar', :locals => {:source => @contest} %>
|
2016-12-22 14:47:42 +08:00
|
|
|
|
</div>
|
|
|
|
|
<%= call_hook :view_layouts_base_body_bottom %>
|
|
|
|
|
</body>
|
2017-01-06 15:03:01 +08:00
|
|
|
|
|
2016-12-23 14:41:21 +08:00
|
|
|
|
<script>
|
|
|
|
|
var blog_artile_list_html = '';
|
|
|
|
|
$(function(){
|
|
|
|
|
if($("#sy_0<%=@left_nav_type %>").length > 0){
|
|
|
|
|
$("#sy_0<%=@left_nav_type %> a").addClass('active');
|
|
|
|
|
} else {
|
|
|
|
|
$("#expand_tools_expand a").addClass('active');
|
|
|
|
|
$("#navContentCourse").toggle();
|
|
|
|
|
}
|
|
|
|
|
<% unless @board.nil? %>
|
|
|
|
|
if($("#board_children_<%=@board.id %>").length > 0){
|
|
|
|
|
$("#board_children_<%=@board.id %> a").addClass('active');
|
|
|
|
|
$(".accordion>li>a").removeClass('active');
|
|
|
|
|
}
|
|
|
|
|
<% end %>
|
|
|
|
|
});
|
2016-12-30 11:18:29 +08:00
|
|
|
|
function alert_halt_code(){
|
|
|
|
|
var htmlvalue = '<div id="muban_popup_box" style="width:400px;"><div class="muban_popup_top"><h3 class="fl">提示</h3><a href="javascript:void(0);" class="muban_icons_close fr"></a></div>'+
|
|
|
|
|
'<div class="clear mt15"><p class="text_c f14">邀请码停用后,用户不能主动加入该竞赛了</p><p class="text_c mt10 f14">您是否确认停用</p><div class="cl"></div>'+
|
|
|
|
|
'<a href="<%=set_invite_code_halt_contest_path(@contest) %>" class="fr sy_btn_blue mr135 mt10" data-remote="true">确 定</a>'+
|
|
|
|
|
'<a href="javascript:void(0);" class="fr sy_btn_grey mt10 mr10" onclick="hideModal();">取 消</a></div></div>';
|
|
|
|
|
pop_box_new(htmlvalue, 400, 180);
|
|
|
|
|
}
|
2016-12-23 14:41:21 +08:00
|
|
|
|
</script>
|
2016-12-22 14:47:42 +08:00
|
|
|
|
</html>
|
|
|
|
|
|