<% unless courses.nil? || courses.empty?%>
    <% courses.each do |course|%>
        <ul class="searchContent">
          <li class="fl">
            <%= link_to image_tag(url_to_avatar(Course.find(course.id)), :width => "75", :height => "75",:class=>'searchCourseImage'), course_path(course.id), :alt => "课程图片" %>
          </li>
          <li class="fl searchContentDes">
            <ul class="fl">
              <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>
                <div class="mt5 fl"><%= image_tag("search_icon_03.png", :width=>"8", :height=>"16" ,:class=>"fl") %><span class="searchTag">课程</span></div>
                <div class="cl"></div>
              </li>
              <li class="fontGrey3 mb5"><%= course.try(:highlight).try(:description) ? course.highlight.description[0].html_safe : (course.description.present? ? course.description : '暂时没有该课程描述') %></li>
              <li class="f12 fontGrey2">
                <span class="mr30">教师：<%= User.find(course.tea_id).realname %></span>
                <span class="mr30">授课时间：<%= course.time.to_s + course.term%></span>
                <span class="mr30">更新时间：<%= format_date(course.updated_at)%></span>
                <span class="mr30"><%= User.find(course.tea_id).user_extensions.occupation.present? ? '单位：'+User.find(course.tea_id).user_extensions.occupation : ''%></span></li>
            </ul>
          </li>
          <div class="cl"></div>
        </ul>
    <% end %>
    <div class="pageRoll">
      <%= paginate courses,:params => {:controller => 'welcome', :action => 'search',:search_type=>'course'}%>
    </div>
<% end %>