move cache

This commit is contained in:
yanxd 2014-06-13 08:35:37 +08:00
parent b7458abd9e
commit f8bfa83ae4
1 changed files with 6 additions and 6 deletions

View File

@ -53,8 +53,8 @@
<div class="d-p-projectlist-box">
<ul class="d-p-projectlist">
<% projects = find_miracle_project(10, 3) %>
<% cache projects do %>
<% projects.map do |project| %>
<% cache "welcome_index_hotProject_ul_#{project}_li" do %>
<li style="position:relative;height:6em;" class='<%= cycle("odd", "even") %>'>
<div style="float: left;">
<%= image_tag(get_project_avatar(project), :class => "avatar-4") %>
@ -75,9 +75,9 @@
:id => "tooltip-#{project.id}" %>
</div>
</li>
<% end %>
<% end; reset_cycle %>
</ul>
<% end %>
</div>
</div>
@ -87,8 +87,8 @@
<span style="margin-top: -20px;float: right; display: block;"><%= link_to "更多>>", { :controller => 'users', :action => 'index'}, :target => "_blank" %></span>
<div class="user-message-box-list" style="margin-top: 10px;">
<%activities = find_all_activities%>
<% cache activities do %>
<% activities.each do |event| %>
<% cache "welcome_index_userActivity_ul_#{event}_li" do %>
<li style="display: block;height:60px; padding-bottom: 4px;">
<div class="inner-right" style="float: left; height: 100%; ">
<%= image_tag url_to_avatar(event.event_author), :class => "avatar-3" %>
@ -99,8 +99,8 @@
<p style="margin-top: 4px;"><span style="color: rgb(172, 174, 177)"><%= l(:field_updated_on) %><%= time_tag_welcome event.event_datetime %>前</span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style="float: right; color: rgb(172, 174, 177);"><%= show_event_reply event %></span></p>
</div>
</li>
<% end %>
<% end %><!-- cache -->
<% end %>
</div>
</ul>
</div>
@ -118,8 +118,8 @@
<% end %>
<div class="welcome-box-list-new memo_activity">
<% topics = find_new_forum_topics(7) %>
<% cache topics do %>
<% topics.each do |topic|%>
<% cache "welcome_index_memosActivity_ul_#{topic}_li" do %>
<li class="message-brief-intro">
<div class='memo_title text_nowrap'>
<%= link_to '['+topic.forum.name + ']',forum_path(topic.forum),:class => 'memo_Bar_title' %><%= link_to topic.subject.truncate(30, omission: '...'), topic.event_url,title: topic.subject %>
@ -139,8 +139,8 @@
</span>
</div>
</li>
<% end %>
<% end %> <!-- cache -->
<% end %>
</div>
</ul>
</div>