2015-11-26 09:57:53 +08:00
|
|
|
<% unless courses.nil? || courses.empty?%>
|
|
|
|
<% courses.each do |course|%>
|
|
|
|
<ul class="searchContent">
|
|
|
|
<li class="fl">
|
2016-07-01 11:11:53 +08:00
|
|
|
<%= link_to image_tag(url_to_avatar(Course.find(course.id)), :width => "75", :height => "75",:class=>'searchCourseImage'), course_path(course.id), :alt => "班级图片" %>
|
2015-11-26 09:57:53 +08:00
|
|
|
</li>
|
|
|
|
<li class="fl searchContentDes">
|
|
|
|
<ul class="fl">
|
2015-11-30 11:21:21 +08:00
|
|
|
<li class="f16 mb5">
|
|
|
|
<a href="<%= course_path(course.id)%>" class="fontGrey3 fl"><%= course.try(:highlight).try(:name) ? course.highlight.name[0].html_safe : course.name %></a>
|
2016-07-01 11:11:53 +08:00
|
|
|
<div class="mt5 fl"><%= image_tag("search_icon_03.png", :width=>"8", :height=>"16" ,:class=>"fl") %><span class="searchTag">班级</span></div>
|
2015-11-30 11:21:21 +08:00
|
|
|
<div class="cl"></div>
|
|
|
|
</li>
|
2016-07-01 11:11:53 +08:00
|
|
|
<li class="fontGrey3 mb5"><%= course.try(:highlight).try(:description) ? course.highlight.description[0].html_safe : (course.description.present? ? course.description : '暂时没有该班级描述') %></li>
|
2015-12-14 11:11:09 +08:00
|
|
|
<li class="f12 fontGrey2">
|
2016-10-10 09:38:21 +08:00
|
|
|
<% user = User.find(course.tea_id)%>
|
|
|
|
<span class="mr30">教师:<%= user.realname %></span>
|
2015-12-14 11:11:09 +08:00
|
|
|
<span class="mr30">授课时间:<%= course.time.to_s + course.term%></span>
|
|
|
|
<span class="mr30">更新时间:<%= format_date(course.updated_at)%></span>
|
2016-10-10 09:38:21 +08:00
|
|
|
<span class="mr30"><%=user.show_occupation.nil? ? "": "单位:"+user.show_occupation %></span></li>
|
2015-11-26 09:57:53 +08:00
|
|
|
</ul>
|
|
|
|
</li>
|
|
|
|
<div class="cl"></div>
|
|
|
|
</ul>
|
|
|
|
<% end %>
|
|
|
|
<div class="pageRoll">
|
|
|
|
<%= paginate courses,:params => {:controller => 'welcome', :action => 'search',:search_type=>'course'}%>
|
|
|
|
</div>
|
|
|
|
<% end %>
|