socialforge/app/views/welcome/_search_attachment_results....

24 lines
1.5 KiB
Plaintext
Raw Normal View History

2015-11-26 09:57:53 +08:00
<% unless attachments.nil? || attachments.empty?%>
<% attachments.each do |attachment|%>
<ul class="searchContent">
<li class="fl">
</li>
<li class="fl searchContentDes">
<ul class="fl">
2015-11-30 11:21:21 +08:00
<li class="f16 mb5 fontGrey3">
<a href="<%= download_named_attachment_path(attachment.id,attachment.filename)%>" class="fontGrey3 mr10 fl"><%= attachment.try(:highlight).try(:filename) ? attachment.highlight.filename[0].html_safe : attachment.filename %></a><span class="f12 fl" style="padding-top: 5px">(<%= number_to_human_size(attachment.filesize)%>)</span>
<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>
2015-11-26 09:57:53 +08:00
<li class="f12 fontGrey2"><span class="mr30">发布者:<%= User.find(attachment.author_id).login%><%= User.find(attachment.author_id).realname%></span>
<!--<span class="mr30">职称:<%#= get_technical_title User.find(attachment.author_id) %></span>-->
<span class="mr30">发布时间:<%= format_date(attachment.created_on)%></span></li>
</ul>
</li>
<div class="cl"></div>
</ul>
<% end %>
<div class="pageRoll">
<%= paginate attachments,:params => {:controller => 'welcome', :action => 'search',:search_type=>'attachment'}%>
</div>
<% end %>