socialforge/app/views/layouts/base_contests.html.erb

140 lines
6.6 KiB
Plaintext
Raw Normal View History

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 %>
<%= stylesheet_link_tag 'jquery/jquery-ui-1.9.2','css/common','css/public', 'css/structure','prettify', 'css/courses','css/popup','css/sy_public','css/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">
<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' %>
</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">
<a href="<%= contest_path(@contest) %>">动态<span><%=@contest.contest_activities.count %></span></a>
2016-12-23 14:41:21 +08:00
</li>
<!--<li id="sy_02" class="sy_icons_index">-->
<!--<%#= link_to '动态', contest_activities_contest_path(@contest) %>-->
<!--</li>-->
2016-12-23 14:41:21 +08:00
<!--<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>
<% 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">
<% 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>
<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 %>
</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>
2017-01-11 10:16:25 +08:00
<li id="sy_06" class="sy_icons_feedback">
<a href="<%= feedback_contest_path(@contest) %>">留言<span id="course_jour_count"><%=contest_feedback_count %></span></a>
<%= link_to( "", feedback_contest_path(@contest), :class => 'sy_class_add', :title =>"#{l(:label_course_feedback)}") if User.current.member_of_contest?(@contest) %>
</li>
</ul>
</div><!--sy_class_leftnav end-->
2017-02-24 19:42:23 +08:00
<% update_visiti_count @contest %>
<div class="fontGrey5 mt10 ml20">访问计数 <%= @contest.visits.to_i %> 自2016年5月</div>
</div><!--sy_class_l end-->
2016-12-22 14:47:42 +08:00
2017-02-24 19:42:23 +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>
<%= 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 %>
});
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">确&nbsp;&nbsp;定</a>'+
'<a href="javascript:void(0);" class="fr sy_btn_grey mt10 mr10" onclick="hideModal();">取&nbsp;&nbsp;消</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>