FIX
This commit is contained in:
parent
59223c67c0
commit
2eaa6e2732
|
@ -13,6 +13,8 @@ class HomesController < ApplicationController
|
|||
@first_companies_group = Array(@companies.slice(0, 5))
|
||||
@second_companies_group = Array(@companies.slice(5, 8))
|
||||
@third_companies_group = Array(@companies.slice(13, 5))
|
||||
|
||||
fresh_when :last_modified => @home.updated_at.utc, :etag => [@home, @companies, @partners, @slide_wall, @first_companies_group, @second_companies_group, @third_companies_group]
|
||||
end
|
||||
|
||||
def partners
|
||||
|
|
|
@ -0,0 +1,13 @@
|
|||
<a href="<%= dynamic_new.remote_url %>">
|
||||
<div class="homepage_activity_list_item">
|
||||
<div>
|
||||
<p class="f18 mb15 lh20 color-grey3"><%= h dynamic_new.title %></p>
|
||||
<p class="f13 mb8 c_grey02 task-hide-2" style="height: 38px;"><%= h dynamic_new.simple_intruduce %></p>
|
||||
<p>
|
||||
<span class="activity_tag">行业动态</span>
|
||||
<span class="fontGrey4 ml14 fl"><i class="iconfont icon-shijian f12 mr5 lh18 fl"></i><%= format_time(dynamic_new.created_at) %></span>
|
||||
</p>
|
||||
</div>
|
||||
<img src="<%= dynamic_new.cover_url %>" class="ml20" width="158px" height="100px" />
|
||||
</div>
|
||||
</a>
|
|
@ -1,15 +0,0 @@
|
|||
<% dynamic_news&.each do |dynamic_new| %>
|
||||
<a href="<%= dynamic_new.remote_url %>">
|
||||
<div class="homepage_activity_list_item">
|
||||
<div>
|
||||
<p class="f18 mb15 lh20 color-grey3"><%= h dynamic_new.title %></p>
|
||||
<p class="f13 mb8 c_grey02 task-hide-2" style="height: 38px;"><%= h dynamic_new.simple_intruduce %></p>
|
||||
<p>
|
||||
<span class="activity_tag">行业动态</span>
|
||||
<span class="fontGrey4 ml14 fl"><i class="iconfont icon-shijian f12 mr5 lh18 fl"></i><%= format_time(dynamic_new.created_at) %></span>
|
||||
</p>
|
||||
</div>
|
||||
<img src="<%= dynamic_new.cover_url %>" class="ml20" width="158px" height="100px" />
|
||||
</div>
|
||||
</a>
|
||||
<% end %>
|
|
@ -23,7 +23,7 @@
|
|||
<a href="<%= news_homes_path %>" class="fr fontGrey4 mt8">更多>></a>
|
||||
</p>
|
||||
<div class="homepage_activity_list">
|
||||
<%= render :partial => 'dynamic_news', :locals => {:dynamic_news => @dynamic_news}%>
|
||||
<%= render :partial => 'dynamic_new', :collection => @dynamic_news %>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
Loading…
Reference in New Issue