2016-01-13 18:33:22 +08:00
|
|
|
|
<% is_teacher = User.current.logged? && (User.current.admin? || User.current.allowed_to?(:as_teacher,@course)) %>
|
2016-03-25 19:20:36 +08:00
|
|
|
|
<% teacher_num = TeacherAndAssistantCount(@course) %>
|
|
|
|
|
<% student_num = studentCount(@course) %>
|
2016-03-28 15:35:24 +08:00
|
|
|
|
<% course_file_num = visable_attachemnts_incourse(@course).count %>
|
2016-01-13 18:33:22 +08:00
|
|
|
|
<div class="pr_info_logo fl mr10 mb5">
|
2016-01-18 10:16:29 +08:00
|
|
|
|
<% if is_excellent_course(@course) %>
|
2016-01-13 18:33:22 +08:00
|
|
|
|
<img src="/images/course/boutique.png" width="50" height="auto" alt="精品" class="boutiqueP" />
|
|
|
|
|
<% end %>
|
|
|
|
|
<%= image_tag(url_to_avatar(@course), :width => "60", :height => "60") %>
|
|
|
|
|
</div>
|
2016-07-07 15:04:57 +08:00
|
|
|
|
<div class="pr_info_id fl f14 pr_info_name" style="margin-top: 0px;">
|
|
|
|
|
<!--<span class="pr_info_name hidden">-->
|
2016-06-29 10:45:56 +08:00
|
|
|
|
<% if @course.syllabus%>
|
2016-07-07 15:36:08 +08:00
|
|
|
|
<a class="c_dark" title="<%=@course.syllabus.title %>" href="<%= Setting.protocol%>://<%= Setting.host_name%>/syllabuses/<%= @course.syllabus_id%>" target="_blank">
|
2016-07-07 15:04:57 +08:00
|
|
|
|
<%= @course.syllabus.title + " •" %>
|
2016-06-29 10:45:56 +08:00
|
|
|
|
</a>
|
|
|
|
|
<% end %>
|
2016-07-07 15:04:57 +08:00
|
|
|
|
<%= @course.name %><%=@course.is_public == 0 ? '(私有)' : '(公开)' %>
|
2016-01-18 10:16:29 +08:00
|
|
|
|
<% if is_excellent_course(@course) %>
|
2016-07-05 11:22:58 +08:00
|
|
|
|
<img src="/images/course/medal.png" alt="精品课程" style="vertical-align:bottom;" />
|
2016-01-13 18:33:22 +08:00
|
|
|
|
<% end %>
|
2016-07-07 15:04:57 +08:00
|
|
|
|
<!--</span>-->
|
2016-01-13 18:33:22 +08:00
|
|
|
|
</div>
|
|
|
|
|
<div class="cl"></div>
|
2016-07-07 15:04:57 +08:00
|
|
|
|
|
2016-01-13 18:33:22 +08:00
|
|
|
|
<div>
|
2016-07-07 15:04:57 +08:00
|
|
|
|
<span class="f14 fl">邀请码:</span>
|
|
|
|
|
<span class="f14 fontBlue2 fl"><%=@course.generate_invite_code %></span>
|
|
|
|
|
<% unless is_teacher %>
|
2016-07-08 15:02:50 +08:00
|
|
|
|
<div id="join_in_course_header" class="fl ml30"><%= join_in_course_header(@course, User.current) %></div>
|
2016-07-07 15:04:57 +08:00
|
|
|
|
<% end %>
|
2016-01-13 18:33:22 +08:00
|
|
|
|
</div>
|
2016-07-07 15:04:57 +08:00
|
|
|
|
|
2016-01-13 18:33:22 +08:00
|
|
|
|
<div class="cl"></div>
|
|
|
|
|
<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_file_num, course_files_path(@course), :class => 'info_foot_num c_blue',:id=>'courses_files_count_info' %>)</div>
|
|
|
|
|
<div class="cl"></div>
|
|
|
|
|
<% if is_teacher %>
|
|
|
|
|
<div class="homepagePostSetting mt5 mr5">
|
|
|
|
|
<ul>
|
|
|
|
|
<li class="homepagePostSettingIcon">
|
|
|
|
|
<ul class="homepagePostSettiongText boxShadow">
|
2016-07-07 15:04:57 +08:00
|
|
|
|
<% if @course.syllabus %>
|
|
|
|
|
<li><%= link_to "查看课程", syllabus_path(@course.syllabus), :class => "postOptionLink", :target => "_blank" %></li>
|
|
|
|
|
<% end %>
|
2016-06-29 10:45:56 +08:00
|
|
|
|
<li><%= link_to "班级配置", {:controller => 'courses', :action => 'settings', :id => @course}, :class => "postOptionLink" %></li>
|
2016-01-13 18:33:22 +08:00
|
|
|
|
<li><%= link_to @course.is_public == 0 ? "设为公开" : "设为私有", {:controller => 'courses', :action => 'private_or_public', :id => @course},:remote=>true,:confirm=>"您确定要设置为"+(@course.is_public == 0 ? "公开" : "私有")+"吗", :class => "postOptionLink" %></li>
|
|
|
|
|
<li><%= link_to "复制学期", copy_course_course_path(@course.id),:remote=>true, :class => "postOptionLink" %></li>
|
|
|
|
|
</ul>
|
|
|
|
|
</li>
|
|
|
|
|
</ul>
|
|
|
|
|
</div>
|
|
|
|
|
<% end %>
|