socialforge/app/views/courses/_recommendation.html.erb

23 lines
975 B
Plaintext
Raw Normal View History

2016-03-25 09:56:45 +08:00
<% exc_course = excellent_course_recommend(course) %>
<% unless exc_course.length == 0 %>
2016-07-22 15:32:37 +08:00
<ul class="sy_class_lclass">
<% exc_course.each_with_index do |e_course, i| %>
<li>
<span class="sy_sq_orange fl mr5 mt5"><%= i+1 %></span>
<%=link_to e_course.name, course_path(e_course.id), :class => "sy_class_ltitle fl mb10" %>
2016-07-22 18:26:48 +08:00
<p class="sy_cgrey ml20">
<% homework_count = e_course.homework_commons.where("publish_time <= '#{Date.today}'").count %>
<% if homework_count > 0 %>
作业<span class="sy_cir_grey ml5 mr5"><%=homework_count %></span>
<% end %>
<% file_count = visable_attachemnts_incourse(e_course).count %>
<% if file_count > 0 %>
资源<span class="sy_cir_grey ml5 mr5"><%=file_count %></span>
<% end %>
2016-07-22 15:32:37 +08:00
</p>
2016-01-24 10:58:58 +08:00
</li>
<% end %>
</ul>
<% end %>