From a3ec35c008c9a37e2618134c29e918dd85cf4318 Mon Sep 17 00:00:00 2001 From: daiao <358551898@qq.com> Date: Wed, 24 Aug 2016 15:56:03 +0800 Subject: [PATCH] =?UTF-8?q?=E4=B8=AA=E4=BA=BA=E4=B8=BB=E9=A1=B5=E6=8A=A550?= =?UTF-8?q?0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/helpers/application_helper.rb | 6 ++++++ app/helpers/organizations_helper.rb | 6 ------ app/views/users/_project_message.html.erb | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index 4a1033a31..0c0e0919e 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -3436,3 +3436,9 @@ def course_syllabus_option user = User.current end type end + +# 获取项目动态更新时间 +def get_forge_act_message(act, type) + forge_act = ForgeActivity.where(:forge_act_id => act.id, :forge_act_type => type).first + format_time(forge_act.nil? ? act.created_on : forge_act.try(:updated_at)) +end diff --git a/app/helpers/organizations_helper.rb b/app/helpers/organizations_helper.rb index 048d92458..48b5f068b 100644 --- a/app/helpers/organizations_helper.rb +++ b/app/helpers/organizations_helper.rb @@ -18,12 +18,6 @@ module OrganizationsHelper s + content_tag('ul', links,:class => 'wlist',:style=>'float:left !important', :id => "org_member_pagination_links" ) end - # 获取项目动态更新时间 - def get_forge_act_message(act, type) - forge_act = ForgeActivity.where(:forge_act_id => act.id, :forge_act_type => type).first - format_time(forge_act.nil? ? act.created_on : forge_act.try(:updated_at)) - end - def get_default_name field case field.name when 'activity' then diff --git a/app/views/users/_project_message.html.erb b/app/views/users/_project_message.html.erb index 9727b685c..afc45efde 100644 --- a/app/views/users/_project_message.html.erb +++ b/app/views/users/_project_message.html.erb @@ -29,7 +29,7 @@ 发帖时间:<%= format_time(activity.created_on) %>
- 更新时间:<%= get_forge_act_message(activity, activity.class) %> + 更新时间:<%= get_forge_act_message(activity, activity.class.to_s) %>
<% if activity.parent_id.nil? %>