2014-09-15 10:58:14 +08:00
|
|
|
<% course_list.map do |course| %>
|
2014-11-20 09:25:33 +08:00
|
|
|
<li class='<%= cycle("odd", "even") %>' title="<%= course.description.to_s.gsub(/<\/?.*?>/,'') %>" style="min-height: 69px;">
|
2014-09-15 10:58:14 +08:00
|
|
|
<div class='avatar'>
|
|
|
|
<%= image_tag(get_course_avatar(course), :class => "avatar-4") %>
|
|
|
|
</div>
|
|
|
|
<!-- 上左下右 -->
|
|
|
|
<div class='desc_item'>
|
2015-05-19 10:35:17 +08:00
|
|
|
<div class='' style="float:left;max-width:300px;white-space:nowrap;text-overflow:ellipsis;overflow:hidden;">
|
2014-11-05 14:13:50 +08:00
|
|
|
<% unless course.is_public == 1 %>
|
|
|
|
<span class="private_project"><%= l(:label_private) %></span>
|
|
|
|
<% end %>
|
2015-05-19 10:35:17 +08:00
|
|
|
<%= link_to(course.name+":", course_path(course.id), :class => "d-g-blue d-p-project-name", :title => "#{course.name}") %>
|
2014-09-15 10:58:14 +08:00
|
|
|
|
2015-05-19 10:35:17 +08:00
|
|
|
</div>
|
2014-11-05 14:13:50 +08:00
|
|
|
<span class='font_bolder'>
|
2014-11-20 09:30:04 +08:00
|
|
|
<%= link_to(course.try(:teacher).try(:realname).truncate(6, omission: '...'), user_path(course.teacher)) %>
|
2014-11-05 14:13:50 +08:00
|
|
|
<%#=course.try(:teacher).try(:name)%>
|
|
|
|
</span>
|
2014-09-15 10:58:14 +08:00
|
|
|
</div>
|
|
|
|
<div class='desc_item text_nowrap'>
|
|
|
|
[<%= get_course_term course %>]
|
|
|
|
<% if (course.school == nil) %>
|
|
|
|
|
|
|
|
<% else %>
|
|
|
|
<%= link_to course.school.name.try(:gsub, /(.+)$/, '\1'), options={:action => 'course', :school_id => course.school.id}, html_options={:method => 'get'} %>
|
|
|
|
<% end %>
|
|
|
|
(<%= course.members.count %>人)
|
2014-11-27 15:39:57 +08:00
|
|
|
<% files_count = course.attachments.count %>
|
|
|
|
<% if files_count > 0%>
|
2015-05-06 15:05:57 +08:00
|
|
|
(<%= link_to "#{files_count.to_s}份", course_files_path(course) %>公开资料)
|
2014-11-27 15:39:57 +08:00
|
|
|
<% end %>
|
2014-09-15 10:58:14 +08:00
|
|
|
</div>
|
|
|
|
</li>
|
|
|
|
<% end %>
|