socialforge/app/views/welcome/_search_project_results.htm...

24 lines
1.6 KiB
Plaintext

<% unless projects.nil? || projects.empty?%>
<% projects.each do |project|%>
<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(Project.find(project.id)), :width => "75", :height => "75",:class=>'searchCourseImage'), project_path(project.id), :alt => "项目图片" %>
</li>
<li class="fl searchContentDes">
<ul class="fl">
<li class="f16 mb5"><a href="<%= project_path(project.id)%>" class="fontGrey3 fl"><%= project.try(:highlight).try(:name) ? project.highlight.name[0].html_safe : project.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"><%= project.try(:highlight).try(:description) ? project.highlight.description[0].html_safe : project.description%></li>
<li class="f12 fontGrey2"><span class="mr30">管理人员:<%= project.user_id ? User.find(project.user_id).login : '无' %></span><span class="mr30">更新时间:<%= date_format_local( Project.find(project.id).updated_on) %></span></li>
</ul>
</li>
<div class="cl"></div>
</ul>
<% end %>
<div class="pageRoll">
<%= paginate projects,:params => {:controller => 'welcome', :action => 'search',:search_type=>'project'}%>
</div>
<% end %>