diff --git a/app/helpers/organizations_helper.rb b/app/helpers/organizations_helper.rb index 48b5f068b..048d92458 100644 --- a/app/helpers/organizations_helper.rb +++ b/app/helpers/organizations_helper.rb @@ -18,6 +18,12 @@ 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 0a5c18a9b..9727b685c 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) %>
- 更新时间:<%= format_time(ForgeActivity.where("forge_act_type='#{activity.class}' and forge_act_id =#{activity.id}").first.updated_at) %> + 更新时间:<%= get_forge_act_message(activity, activity.class) %>
<% if activity.parent_id.nil? %>