<% unless memos.nil? || memos.empty?%>
    <% memos.each do |memo|%>
        <ul class="searchContent">
          <li class="fl">
            <!--<img src="images/homepageImage.jpg" alt="个人图片" width="75" height="75" class="searchCourseImage" />-->
            <%= link_to image_tag(url_to_avatar(User.find(memo.author_id)), :width => "75", :height => "75",:class=>'searchCourseImage'), forum_memo_path(:forum_id=>memo.forum_id,:id=>memo.id), :alt => "贴吧图片" %>
          </li>
          <li class="fl searchContentDes">
            <ul class="fl">
              <li class="f16 mb5"><a href="<%= forum_memo_path(:forum_id=>memo.forum_id,:id=>memo.id)%>" class="fontGrey3 fl"><%= memo.try(:highlight).try(:subject) ? memo.highlight.subject[0].html_safe : memo.subject  %></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"><%= memo.try(:highlight).try(:content) ? memo.highlight.content[0].html_safe : memo.content.html_safe%></li>
              <li class="f12 fontGrey2"><span class="mr30">发帖人：<%=  memo.author_id ?  User.find(memo.author_id).login : '无' %></span><span class="mr30">更新时间:<%= format_date( memo.updated_at) %></span></li>
            </ul>
          </li>
          <div class="cl"></div>
        </ul>
    <% end %>
    <div class="pageRoll">
      <%= paginate memos,:params => {:controller => 'welcome', :action => 'search',:search_type=>'memo'}%>
    </div>
<% end %>