2015-03-17 15:30:15 +08:00
|
|
|
|
<% course_model %>
|
2015-01-08 17:04:25 +08:00
|
|
|
|
<% teacher_num = teacherCount(@course) %>
|
|
|
|
|
<% student_num = studentCount(@course) %>
|
2015-03-18 15:18:06 +08:00
|
|
|
|
<% is_teacher = User.current.logged? && (User.current.admin? || User.current.allowed_to?(:as_teacher,@course)) %>
|
2013-12-11 10:00:38 +08:00
|
|
|
|
<!DOCTYPE html>
|
|
|
|
|
<html lang="en">
|
2014-05-19 17:56:39 +08:00
|
|
|
|
<head>
|
|
|
|
|
<meta charset="utf-8">
|
2014-10-21 14:00:45 +08:00
|
|
|
|
<title>
|
|
|
|
|
<%= h html_title %>
|
|
|
|
|
</title>
|
2014-05-19 17:56:39 +08:00
|
|
|
|
<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 %>
|
2015-03-19 11:42:52 +08:00
|
|
|
|
<%= stylesheet_link_tag 'public', 'leftside', 'courses'%>
|
2015-03-18 10:15:10 +08:00
|
|
|
|
<%= javascript_include_tag "course","header" %>
|
2014-05-19 17:56:39 +08:00
|
|
|
|
<!-- page specific tags -->
|
|
|
|
|
<%= yield :header_tags -%>
|
|
|
|
|
</head>
|
|
|
|
|
<!--add by huang-->
|
2015-03-17 15:30:15 +08:00
|
|
|
|
<body>
|
|
|
|
|
<div id="Container">
|
|
|
|
|
<%= render :partial => 'layouts/new_header' %>
|
2015-03-18 10:47:30 +08:00
|
|
|
|
<div class="cl"></div>
|
|
|
|
|
|
2015-03-17 17:34:43 +08:00
|
|
|
|
<div id="TopBar">
|
|
|
|
|
<div class="topbar_info02 fl">
|
2015-03-17 18:02:46 +08:00
|
|
|
|
<h2>
|
|
|
|
|
<a href="http://<%= Setting.host_course%>" target="_blank" class="c_blue">
|
|
|
|
|
<%= l(:label_courses_community)%>
|
|
|
|
|
</a>
|
|
|
|
|
</h2>
|
|
|
|
|
<p>
|
|
|
|
|
<%= l(:label_user_location) %> :
|
|
|
|
|
<%= link_to l(:field_homepage), home_path %>
|
|
|
|
|
>
|
|
|
|
|
<a href="http://<%= Setting.host_course%>">
|
|
|
|
|
<%=l(:label_courses_management_platform)%>
|
|
|
|
|
</a>
|
|
|
|
|
>
|
|
|
|
|
<%= link_to @course.name, nil %>
|
|
|
|
|
</p>
|
2015-03-17 17:34:43 +08:00
|
|
|
|
</div>
|
|
|
|
|
<div class="search fl">
|
2015-03-17 18:02:46 +08:00
|
|
|
|
<%= form_tag({:controller => 'courses', :action => 'search'},:id => "course_search_form", :method => :get, :class => "search_form") do %>
|
|
|
|
|
<%= text_field_tag 'name', params[:name], :placeholder => "课程名称", :class => "search_text fl", :onkeyup => "regexName('#{l(:label_search_conditions_not_null)}');" %>
|
|
|
|
|
<a href="#" onclick="submitSerch('<%= l(:label_search_conditions_not_null) %>');" class="search_btn fl f14 c_white" >
|
|
|
|
|
<%= l(:label_search)%>
|
|
|
|
|
</a>
|
|
|
|
|
<br />
|
|
|
|
|
<span id="project_name_span" style="float: left"></span>
|
|
|
|
|
<% end %>
|
2015-03-17 17:34:43 +08:00
|
|
|
|
</div>
|
|
|
|
|
</div><!--TopBar end-->
|
|
|
|
|
<div class="cl"></div>
|
2015-03-18 10:47:30 +08:00
|
|
|
|
<div id="content">
|
2015-03-17 17:34:43 +08:00
|
|
|
|
<div id="LSide" class="fl">
|
|
|
|
|
<div class="project_info">
|
2015-03-18 10:15:10 +08:00
|
|
|
|
<div class="pr_info_logo fl mr10 mb5">
|
|
|
|
|
<!--<a href="#"><img src="images/courses/pic_courses.jpg" width="60" height="60" alt="logo" /></a>-->
|
|
|
|
|
<% if get_avatar?(@course) %>
|
|
|
|
|
<%= image_tag(url_to_avatar(@course), :width => "60", :height => "60") %>
|
|
|
|
|
<% else %>
|
|
|
|
|
<%= link_to image_tag('../images/avatars/course/course.jpg', :width => "60", :height => "60"), course_path(@course) %>
|
|
|
|
|
<% end %>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="pr_info_id fl mb5 f14">
|
|
|
|
|
ID:<%= @course.id%>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="pr_info_join fl">
|
2015-03-18 17:14:26 +08:00
|
|
|
|
<% if is_teacher%>
|
|
|
|
|
<%= link_to "<span class='pr_setting'></span>#{l(:button_configure)}".html_safe, {:controller => 'courses', :action => 'settings', :id => @course}, :class => "pr_join_a" %>
|
|
|
|
|
<%= set_course_time @course%>
|
|
|
|
|
<%= link_to "<span class='pr_copy'></span>#{l(:button_copy)}".html_safe, copy_course_course_path(@course.id), :class => "pr_join_a" %>
|
|
|
|
|
<% else%>
|
|
|
|
|
<%= join_in_course_header(@course, User.current) %>
|
|
|
|
|
<% end%>
|
2015-03-18 10:15:10 +08:00
|
|
|
|
</div>
|
2015-03-17 17:34:43 +08:00
|
|
|
|
<div class="cl"></div>
|
2015-03-18 16:34:25 +08:00
|
|
|
|
|
2015-03-18 10:15:10 +08:00
|
|
|
|
<div >
|
2015-03-26 19:01:22 +08:00
|
|
|
|
<a class="pr_info_name fl c_dark fb" href="courses/<%= @course.id%>" target="_blank">
|
2015-03-18 10:15:10 +08:00
|
|
|
|
<%= @course.name %>
|
|
|
|
|
<% if @course.is_public == 0%>
|
|
|
|
|
<span class="img_private ">
|
|
|
|
|
<%= l(:field_is_private)%>
|
|
|
|
|
</span>
|
|
|
|
|
<% end %>
|
|
|
|
|
</a>
|
|
|
|
|
</div>
|
2015-03-17 17:34:43 +08:00
|
|
|
|
<div class="cl"></div>
|
2015-03-18 15:18:06 +08:00
|
|
|
|
<div class="pr_info_foot ">
|
|
|
|
|
<%= l(:label_account_identity_teacher)%>(<%= course_teacher_link teacher_num %>)
|
|
|
|
|
<span>| </span>
|
|
|
|
|
<%= l(:label_account_identity_student)%>(<%= course_student_link student_num %>)
|
|
|
|
|
<span>| </span>
|
|
|
|
|
<%= l(:project_module_attachments)%>(<%= link_to @course.attachments.count, course_files_path(@course), :class => 'info_foot_num c_blue' %>)</div>
|
2015-03-17 17:34:43 +08:00
|
|
|
|
<div class="cl"></div>
|
|
|
|
|
</div><!--课程信息 end-->
|
|
|
|
|
<div class="info_box">
|
|
|
|
|
<ul>
|
2015-03-18 15:18:06 +08:00
|
|
|
|
<li><%= l(:label_main_teacher)%> : <%= link_to(@course.teacher.lastname+@course.teacher.firstname, user_path(@course.teacher), :class => 'c_dblue') %></li>
|
|
|
|
|
<li><%= l(:label_class_period)%> : <span ><%= @course.class_period %> <%= l(:label_class_hour) %></span></li>
|
2015-03-18 17:14:26 +08:00
|
|
|
|
<li><%= l(:label_main_term)%> : <span><%= @course.time %> <%= @course.term %></span></li>
|
|
|
|
|
<% if @course.school%>
|
|
|
|
|
<li><%= l(:label_course_organizers)%> : <a href="http://<%= Setting.host_course%>/?school_id=<%= @course.school.id%>" target="_blank" class="c_dblue"><%= @course.school%></a></li>
|
|
|
|
|
<% end%>
|
2015-03-17 17:34:43 +08:00
|
|
|
|
</ul>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<div class="subNavBox">
|
2015-03-18 15:18:06 +08:00
|
|
|
|
<div class="subNav">
|
|
|
|
|
<%= link_to l(:label_activity), course_path(@course), :class => "f14 c_blue02" %>
|
|
|
|
|
<!--暂时不显示课程动态数,优化后在显示-->
|
2015-03-18 16:34:25 +08:00
|
|
|
|
<%= link_to "(#{course_activity_count @course})", course_path(@course), :class => "subnav_num c_orange"%>
|
2015-03-17 17:34:43 +08:00
|
|
|
|
</div>
|
2015-03-18 15:18:06 +08:00
|
|
|
|
<div class="subNav">
|
|
|
|
|
<%= link_to l(:label_homework), homework_course_path(@course), :class => "f14 c_blue02"%>
|
|
|
|
|
<%= link_to "(#{@course.homeworks.count})", homework_course_path(@course), :class => "subnav_num c_orange"%>
|
|
|
|
|
<%= link_to( "+#{l(:label_course_homework_new)}", new_homework_course_path(@course), :class => 'subnav_green c_white') if is_teacher %>
|
2015-03-17 17:34:43 +08:00
|
|
|
|
</div>
|
2015-03-18 15:18:06 +08:00
|
|
|
|
<div class="subNav">
|
|
|
|
|
<%= link_to l(:label_course_news), course_news_index_path(@course), :class => "f14 c_blue02" %>
|
|
|
|
|
<%= link_to "(#{@course.news.count})", course_news_index_path(@course), :class => "subnav_num c_orange"%>
|
|
|
|
|
<%= link_to( "+#{l(:label_course_news_new)}", course_news_index_path(@course), :class => 'subnav_green c_white') if is_teacher %>
|
2015-03-17 17:34:43 +08:00
|
|
|
|
</div>
|
2015-03-18 15:18:06 +08:00
|
|
|
|
<div class="subNav">
|
2015-03-20 11:37:56 +08:00
|
|
|
|
<%= link_to l(:label_course_file), course_files_path(@course), :class => "f14 c_blue02" %><%= link_to "(#{@course.attachments.count})", course_files_path(@course), :class => "subnav_num c_orange" %><%= link_to( "+#{l(:label_upload_files)}", course_files_path(@course), :class => 'subnav_green ml95 c_white') if is_teacher %>
|
2015-03-17 17:34:43 +08:00
|
|
|
|
</div>
|
2015-03-18 15:18:06 +08:00
|
|
|
|
<div class="subNav">
|
|
|
|
|
<%= link_to l(:label_course_board), course_boards_path(@course), :class => "f14 c_blue02" %>
|
2015-03-24 17:21:41 +08:00
|
|
|
|
<%= link_to "(#{@course.boards[0].topics.count})", course_boards_path(@course), :class => "subnav_num c_orange" %>
|
2015-03-18 15:18:06 +08:00
|
|
|
|
<%= link_to( "+#{l(:label_message_new)}", course_boards_path(@course), :class => 'subnav_green ml95 c_white') if is_teacher %>
|
2015-03-17 17:34:43 +08:00
|
|
|
|
</div>
|
2015-03-18 15:18:06 +08:00
|
|
|
|
<div class="subNav">
|
|
|
|
|
<%= link_to l(:label_course_feedback), course_feedback_path(@course), :class => "f14 c_blue02" %>
|
|
|
|
|
<%= link_to "(#{course_feedback_count})", course_feedback_path(@course), :class => "subnav_num c_orange" %>
|
2015-03-17 17:34:43 +08:00
|
|
|
|
</div>
|
2015-03-18 15:18:06 +08:00
|
|
|
|
<div class="subNav">
|
2015-03-19 15:04:44 +08:00
|
|
|
|
<%= link_to l(:label_poll), poll_index_path(:polls_type => "Course", :polls_group_id => @course.id), :class => " f14 c_blue02"%>
|
|
|
|
|
<%= link_to "(#{course_poll_count})", poll_index_path(:polls_type => "Course", :polls_group_id => @course.id), :class => "subnav_num c_orange" %>
|
|
|
|
|
<%= link_to( "+#{l(:label_new_poll)}", new_poll_path(:polls_type => "Course",:polls_group_id => @course.id), :class => 'subnav_green c_white') if is_teacher %>
|
2015-03-17 17:34:43 +08:00
|
|
|
|
</div>
|
2015-03-18 15:18:06 +08:00
|
|
|
|
</div><!--项目侧导航 end-->
|
|
|
|
|
<div class="cl"></div>
|
|
|
|
|
<div class="project_intro">
|
|
|
|
|
<div id="course_description" class="course_description">
|
|
|
|
|
<h4 ><%= l(:label_course_brief_introduction)%>:</h4>
|
2015-03-25 14:09:44 +08:00
|
|
|
|
<div id="course_description_content">
|
|
|
|
|
<%= textilizable(@course.description) if @course.description && !@course.description.blank? %>
|
|
|
|
|
</div>
|
2015-03-17 17:34:43 +08:00
|
|
|
|
</div>
|
2015-03-25 14:09:44 +08:00
|
|
|
|
<div class="lg-foot" id="lg-foot" onclick="show_more_msg();">
|
2015-03-18 15:18:06 +08:00
|
|
|
|
<%= l(:label_expend_information)%>
|
|
|
|
|
<span class="g-arr-down">
|
|
|
|
|
<img src="/images/jiantou.jpg" width="12" height="6" />
|
|
|
|
|
</span>
|
2015-03-17 17:34:43 +08:00
|
|
|
|
</div>
|
2015-03-18 15:18:06 +08:00
|
|
|
|
</div><!--项目简介 end-->
|
|
|
|
|
<div class="project_Label">
|
|
|
|
|
<h4 class="mb5" ><%= l(:label_tag)%>:</h4>
|
|
|
|
|
<div class="tag_h" >
|
|
|
|
|
<%= render :partial => 'tags/new_tag', :locals => {:obj => @course, :object_flag => "9"} %>
|
2015-03-17 17:34:43 +08:00
|
|
|
|
</div>
|
|
|
|
|
<div class="cl"></div>
|
2015-03-18 15:18:06 +08:00
|
|
|
|
</div><!--项目标签 end-->
|
|
|
|
|
</div><!--LSide end-->
|
2015-03-17 17:34:43 +08:00
|
|
|
|
|
2015-03-18 18:03:17 +08:00
|
|
|
|
<div id="RSide" class="fl">
|
|
|
|
|
<%= render_flash_messages %>
|
|
|
|
|
<%= yield %>
|
|
|
|
|
<%= call_hook :view_layouts_base_content %>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<div style="clear:both;"></div>
|
2015-03-17 17:34:43 +08:00
|
|
|
|
|
|
|
|
|
</div><!--Content end-->
|
2015-03-18 10:47:30 +08:00
|
|
|
|
<div class="cl"></div>
|
2015-03-18 15:18:06 +08:00
|
|
|
|
|
|
|
|
|
<%= render :partial => 'layouts/new_footer' %>
|
2015-03-18 10:47:30 +08:00
|
|
|
|
<div class="cl"></div>
|
|
|
|
|
</div><!--Container end-->
|
2015-03-17 15:30:15 +08:00
|
|
|
|
<%= render :partial => 'layouts/new_feedback' %>
|
2015-03-20 11:37:56 +08:00
|
|
|
|
<div id="ajax-indicator" style="display:none;">
|
2015-03-25 10:21:33 +08:00
|
|
|
|
<span><%= l(:label_loading) %></span>
|
2015-03-20 11:37:56 +08:00
|
|
|
|
</div>
|
|
|
|
|
<div id="ajax-modal" style="display:none;"></div>
|
|
|
|
|
<%= call_hook :view_layouts_base_body_bottom %>
|
2014-05-19 17:56:39 +08:00
|
|
|
|
</body>
|
2014-05-20 09:12:15 +08:00
|
|
|
|
|
2013-09-14 09:51:26 +08:00
|
|
|
|
</html>
|