57 lines
3.0 KiB
Plaintext
57 lines
3.0 KiB
Plaintext
<% is_teacher = User.current.logged? && (User.current.admin? || User.current.allowed_to?(:as_teacher,@course)) %>
|
||
<% teacher_num = TeacherAndAssistantCount(@course) %>
|
||
<% student_num = studentCount(@course) %>
|
||
<% course_file_num = visable_attachemnts_incourse(@course).count %>
|
||
<div class="pr_info_logo fl mr10 mb5">
|
||
<% if is_excellent_course(@course) %>
|
||
<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>
|
||
<div class="pr_info_id fl f14">
|
||
<% if @course.syllabus%>
|
||
<a class="pr_info_name fb c_dark fl hidden" title="<%=@course.syllabus.title %>" style="max-width: 120px;" href="<%= Setting.protocol%>://<%= Setting.host_name%>/syllabuses/<%= @course.syllabus_id%>" target="_blank">
|
||
<%=@course.syllabus.title %>
|
||
</a>
|
||
<% end %>
|
||
<div class="cl"></div>
|
||
|
||
<span class="hidden fl" style="max-width: 80px;" title="<%= @course.name %><%=@course.is_public == 0 ? '(私有)' : '(公开)' %>"><%= @course.name %></span><span class="fl"><%=@course.is_public == 0 ? '(私有)' : '(公开)' %></span>
|
||
</br>
|
||
<div class="cl"></div>
|
||
<% if is_excellent_course(@course) %>
|
||
<img src="/images/course/medal.png" alt="精品课程" style="vertical-align:bottom;" class="ml5" />
|
||
<% end %>
|
||
</div>
|
||
<div class="pr_info_id fl f14" style="margin-top: 0px;">
|
||
<% unless is_teacher %>
|
||
<div id="join_in_course_header"><%= join_in_course_header(@course, User.current) %></div>
|
||
<% end %>
|
||
</div>
|
||
<div class="cl"></div>
|
||
<div>
|
||
<span class="f14">邀请码:</span>
|
||
<span class="f14 fontBlue2"><%=@course.generate_invite_code %></span>
|
||
</div>
|
||
<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">
|
||
<li><%= link_to "班级配置", {:controller => 'courses', :action => 'settings', :id => @course}, :class => "postOptionLink" %></li>
|
||
<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 %>
|