From 277aa81a60c2d44ebfbf590405c0109363388960 Mon Sep 17 00:00:00 2001 From: sw <939547590@qq.com> Date: Thu, 12 Jun 2014 16:43:02 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E5=8D=A0=E4=BD=8D?= =?UTF-8?q?=E5=88=97=E8=A1=A8=E7=95=8C=E9=9D=A2=E6=98=BE=E7=A4=BA=E7=9A=84?= =?UTF-8?q?=E4=BD=9C=E4=B8=9A=E6=8F=8F=E8=BF=B0=E6=A0=B7=E5=BC=8F=E4=B8=8D?= =?UTF-8?q?=E6=AD=A3=E7=A1=AE=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/homework_attach/show.html.erb | 2 +- app/views/layouts/base_homework.html.erb | 16 +--------------- 2 files changed, 2 insertions(+), 16 deletions(-) diff --git a/app/views/homework_attach/show.html.erb b/app/views/homework_attach/show.html.erb index d4bc0de42..4ab6141dc 100644 --- a/app/views/homework_attach/show.html.erb +++ b/app/views/homework_attach/show.html.erb @@ -105,7 +105,7 @@ <%= @stars_status_map["star#{(star/20).to_s}".to_sym] %> -
+
<% end %> diff --git a/app/views/layouts/base_homework.html.erb b/app/views/layouts/base_homework.html.erb index 65cdd62ff..34d3b7b5a 100644 --- a/app/views/layouts/base_homework.html.erb +++ b/app/views/layouts/base_homework.html.erb @@ -74,14 +74,6 @@ - @@ -97,7 +89,7 @@ - <%= project.description %> + <%= textilizable project.description %> @@ -132,12 +124,6 @@
- - From f8bfa83ae44f34297af021c2ea45bde05ddc455f Mon Sep 17 00:00:00 2001 From: yanxd Date: Fri, 13 Jun 2014 08:35:37 +0800 Subject: [PATCH 2/2] move cache --- app/views/welcome/index.html.erb | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/app/views/welcome/index.html.erb b/app/views/welcome/index.html.erb index 483dbfc02..a9d7e994a 100644 --- a/app/views/welcome/index.html.erb +++ b/app/views/welcome/index.html.erb @@ -53,8 +53,8 @@
    <% projects = find_miracle_project(10, 3) %> - <% cache projects do %> <% projects.map do |project| %> + <% cache "welcome_index_hotProject_ul_#{project}_li" do %>
  • <%= image_tag(get_project_avatar(project), :class => "avatar-4") %> @@ -75,9 +75,9 @@ :id => "tooltip-#{project.id}" %>
  • + <% end %> <% end; reset_cycle %>
- <% end %>
@@ -87,8 +87,8 @@ <%= link_to "更多>>", { :controller => 'users', :action => 'index'}, :target => "_blank" %>
<%activities = find_all_activities%> - <% cache activities do %> <% activities.each do |event| %> + <% cache "welcome_index_userActivity_ul_#{event}_li" do %>
  • <%= image_tag url_to_avatar(event.event_author), :class => "avatar-3" %> @@ -99,8 +99,8 @@

    <%= l(:field_updated_on) %><%= time_tag_welcome event.event_datetime %>前     <%= show_event_reply event %>

  • - <% end %> <% end %> + <% end %>
    @@ -118,8 +118,8 @@ <% end %>
    <% topics = find_new_forum_topics(7) %> - <% cache topics do %> <% topics.each do |topic|%> + <% cache "welcome_index_memosActivity_ul_#{topic}_li" do %>
  • <%= 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 @@
  • - <% end %> <% end %> + <% end %>
    <%= l(:label_limit_time) %>: <%= @bid.deadline %>