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

149 lines
5.9 KiB
Plaintext
Raw Normal View History

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<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 %>
2016-07-22 18:20:11 +08:00
<%= stylesheet_link_tag 'jquery/jquery-ui-1.9.2','css/common','css/public','css/structure','css/courses','css/popup','prettify','syllabus','sy_public',:media => 'all'%>
<%= stylesheet_link_tag 'rtl', :media => 'all' if l(:direction) == 'rtl' %>
<%= javascript_heads %>
2016-07-22 16:00:56 +08:00
<%= javascript_include_tag "bootstrap","avatars","course",'attachments','prettify','syllabus','cookie'%>
<%= heads_for_theme %>
<%= call_hook :view_layouts_base_html_head %>
<%= yield :header_tags -%>
<!-- MathJax的配置 -->
2016-07-22 18:20:11 +08:00
<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>
<body onload="prettyPrint();">
2016-06-29 10:45:56 +08:00
<% is_current_user = User.current.logged?%>
<div class="navContainer">
<% if User.current.logged? %>
<%= render :partial => 'layouts/logined_header' %>
<% else%>
<%= render :partial => 'layouts/unlogin_header' %>
<% end%>
</div>
<div class="cl"></div>
2016-07-22 10:20:28 +08:00
<div class="sy_contanier">
<div class="sy_top">
2016-07-22 16:00:56 +08:00
<div class="sy_top_con" onmouseover="$('#syllabus_edit_title_png').show();$('#syllabus_edit_ng_name_png').show();" onmouseout="$('#syllabus_edit_title_png').hide();$('#syllabus_edit_ng_name_png').hide();"> <!-- onmouseover="$('#syllabus_edit_title_png').show();$('#syllabus_edit_ng_name_png').show();" onmouseout="$('#syllabus_edit_title_png').hide();$('#syllabus_edit_ng_name_png').hide();" -->
<%=render :partial => 'layouts/syllabus_info' %>
</div>
2016-07-22 10:20:28 +08:00
</div>
2016-07-22 10:20:28 +08:00
<div class="sy_content ">
<div class="sy_con_l fl mb15">
<%= yield %>
</div><!--sy_con_l end-->
<div class="sy_con_r fr ">
<div class="sy_right_box" id="syllabus_base_info">
2016-07-01 11:11:53 +08:00
<%= render :partial => 'layouts/syllabus_base_info', :locals => {:syllabus => @syllabus} %>
</div>
2016-07-22 10:20:28 +08:00
<div class="sy_right_box">
<%= render :partial => 'layouts/syllabus_teacher_list', :locals => {:syllabus => @syllabus} %>
2016-06-29 10:45:56 +08:00
</div>
2016-07-22 10:20:28 +08:00
</div><!--sy_con_r end-->
<div class="cl"></div>
2016-07-22 10:20:28 +08:00
</div><!--sy_content end-->
</div>
<div class="cl"></div>
<%= render :partial => 'layouts/footer' %>
<div class="cl"></div>
<div id="ajax-modal" style="display:none;"></div>
<div id="ajax-indicator" style="display:none;">
<span><%= l(:label_loading) %></span>
</div>
<script type="text/javascript">
$(function() {
$('#user_hide_course').hide();
$("#syllabus_title_edit").live("blur", function () {
edit_syllabus_title('<%= edit_syllabus_title_syllabus_path(@syllabus.id)%>');
});
$("#syllabus_eng_name_edit").live("blur", function () {
edit_syllabus_eng_name('<%= edit_syllabus_eng_name_syllabus_path(@syllabus.id)%>');
});
$("#courseMenu").mouseenter(function () {
$("#topnav_course_menu").show();
});
$("#courseMenu").mouseleave(function () {
$("#topnav_course_menu").hide();
});
2016-07-22 10:20:28 +08:00
// Store variables
var accordion_head = $('.accordion > li > a'),
accordion_body = $('.accordion li > .sub-menu');
// Click function
accordion_head.on('click', function(event) {
// Disable header links
event.preventDefault();
// Show and hide the tabs on click
if ($(this).attr('class') != 'active'){
accordion_body.slideUp('normal');
$(this).next().stop(true,true).slideToggle('normal');
accordion_head.removeClass('active');
$(this).addClass('active');
}
});
});
function leftCourseslistChange(){
$('#homepageLeftMenuCourses').slideToggle();
$('#hide_show_courseicon').toggleClass("homepageLeftMenuHideIcon");
$('#hide_show_courseicon').toggleClass("homepageLeftMenuMoreIcon");
}
2016-07-01 11:11:53 +08:00
function show_edit_base_info() {
$("#syllabus_base_info").html("<%=escape_javascript(render :partial => 'layouts/syllabus_edit_info', :locals => {:syllabus => @syllabus}) %>");
}
2016-07-22 10:20:28 +08:00
function g(o){return document.getElementById(o);}
function HoverLi(n){
for(var i=1;i<=2;i++){
//g('sy_tab_nav_'+i).className='sy_tab_nomal';
//g('sy_tab_con_'+i).className='undis';
}
//g('sy_tab_con_'+n).className='dis';
//g('sy_tab_nav_'+n).className='sy_tab_hover';
if(n == 1) {
window.location.href = '<%=syllabus_path(@syllabus) %>';
} else {
window.location.href = '<%=syllabus_courselist_syllabus_path(@syllabus) %>';
}
}
//侧导航栏配置设置
2016-07-21 10:28:50 +08:00
$(".homepageLeftMenuCoursesLine").mouseover(function(){
$(this).children(".shild").css("background","url(/images/hwork_icon.png) -82px -399px no-repeat");
$(this).children().css("color","#ffffff");
});
$(".homepageLeftMenuCoursesLine").mouseout(function(){
$(this).children(".shild").css("background","url(/images/hwork_icon.png) -6px -354px no-repeat");
$(this).children().css("color","#808080");
});
$(".subNavRow").mouseover(function(){
$(this).css("background-color","#269ac9");
$(this).children().css("color","#ffffff");
});
$(".subNavRow").mouseout(function(){
$(this).css("background-color","#ffffff");
$(this).children().css("color","#888888");
});
</script>
</body>
</html>