cache test
This commit is contained in:
parent
e4ed8cf970
commit
09edfc7c0c
|
@ -52,7 +52,9 @@
|
|||
<span style="margin-top: -20px;float: right; display: block;"><%= link_to "更多>>", { :controller => 'projects', :action => 'index', :project_type => 0, :host => Setting.project_domain}, :target => "_blank" %></span>
|
||||
<div class="d-p-projectlist-box">
|
||||
<ul class="d-p-projectlist">
|
||||
<% find_miracle_project(10, 3).map do |project| %>
|
||||
<% projects = find_miracle_project(10, 3) %>
|
||||
<% cache projects do %>
|
||||
<% projects.map do |project| %>
|
||||
<li style="position:relative;height:6em;" class='<%= cycle("odd", "even") %>'>
|
||||
<div style="float: left;">
|
||||
<%= image_tag(get_project_avatar(project), :class => "avatar-4") %>
|
||||
|
@ -71,11 +73,11 @@
|
|||
:title => "项目得分,综合考虑了项目的各项活动,反映了该项目的活跃程度",
|
||||
:class => "tooltip",
|
||||
:id => "tooltip-#{project.id}" %>
|
||||
</p>
|
||||
</div>
|
||||
</li>
|
||||
<% end; reset_cycle %>
|
||||
</ul>
|
||||
<% end %>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
@ -84,7 +86,9 @@
|
|||
<h3 style="color: rgb(21, 188, 207)"><strong>用户动态</strong></h3>
|
||||
<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;">
|
||||
<% find_all_activities.each do |event| %>
|
||||
<%activities = find_all_activities%>
|
||||
<% cache activities do %>
|
||||
<% activities.each do |event| %>
|
||||
<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" %>
|
||||
|
@ -96,12 +100,14 @@
|
|||
</div>
|
||||
</li>
|
||||
<% end %>
|
||||
<% end %><!-- cache -->
|
||||
</div>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div class="right" style="float: right; width: 48%; ">
|
||||
<ul class="welcome-message-list">
|
||||
<% cache 'forum_links' do %>
|
||||
<div class="forum-topic" style="height: 25px; width: 98%; margin-left: 2px;">
|
||||
<h3 style="color: rgb(21, 188, 207);">
|
||||
<strong>贴吧动态</strong>
|
||||
|
@ -109,8 +115,11 @@
|
|||
<%= link_to "我要反馈" , suggestion_send_path, {:class => 'orangeButton idea_btn', :style => "color: #EEEEEE" }%></h3>
|
||||
<span style="margin-top: -30px;float: right; display: block;"><%= link_to "更多>>", forums_path %></span>
|
||||
</div>
|
||||
<% end %>
|
||||
<div class="welcome-box-list-new memo_activity">
|
||||
<% find_new_forum_topics(7).each do |topic|%>
|
||||
<% topics = find_new_forum_topics(7) %>
|
||||
<% cache topics do %>
|
||||
<% topics.each do |topic|%>
|
||||
<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 %>
|
||||
|
@ -131,6 +140,7 @@
|
|||
</div>
|
||||
</li>
|
||||
<% end %>
|
||||
<% end %> <!-- cache -->
|
||||
</div>
|
||||
</ul>
|
||||
</div>
|
||||
|
|
Loading…
Reference in New Issue