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

140 lines
6.6 KiB
Plaintext
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<% work_num = visable_contest_work @contest %>
<% is_admin = User.current.admin? || User.current.admin_of_contest?(@contest) %>
<!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'%>
<%= javascript_include_tag "course","avatars","header","attachments",'prettify','contest' %>
<!-- page specific tags -->
<%= yield :header_tags -%>
<!-- 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>
</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">
<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">
<li id="sy_01" class="sy_icons_game">
<a href="<%= contest_path(@contest) %>">动态<span><%=@contest.contest_activities.count %></span></a>
</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">
<a href="<%= works_path(:contest => @contest) %>">提交<span><%= work_num%></span></a>
<% if is_admin %>
<a href="<%= works_path(:contest => @contest.id,:is_new => 1) %>" class="sy_class_add"></a>
<% end %>
</li>
<% contest_board = @contest.boards.where("parent_id is NULL").first %>
<li id="sy_04" class="sy_icons_boards">
<% count = contest_board ? contest_board.messages.count : 0 %>
<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">
<%= render :partial => 'layouts/contest_board_children_list', :locals => {:contest_board => contest_board} if contest_board %>
</div>
<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" %>
<% if is_admin %>
<%= link_to "", contest_news_index_path(@contest,:is_new => 1), :class => "sy_class_add" %>
<% end %>
</li>
<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-->
<% update_visiti_count @contest %>
<div class="fontGrey5 mt10 ml20">访问计数 <%= @contest.visits.to_i %> 自2016年5月</div>
</div><!--sy_class_l end-->
<%= render_flash_messages %>
<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>
</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;">
<%=render :partial => 'contests/upload_img', :locals => {:source => @contest} %>
<%#=render :partial => 'layouts/upload_avatar', :locals => {:source => @contest} %>
</div>
<%= call_hook :view_layouts_base_body_bottom %>
</body>
<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);
}
</script>
</html>