diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index da66f249b..4a1033a31 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -2169,7 +2169,7 @@ module ApplicationHelper candown= User.current.member_of_course?(course) || (attachment.is_public == 1) || attachment.get_status_by_attach(User.current.id) == 2 elsif attachment.container.is_a?(OrgSubfield) org = attachment.container.organization - candown = User.current.member_of_org?(org) || (attachment.is_public == 1) || attachment.get_status_by_attach(User.current.id) == 2 + candown = User.current.member_of_org?(org) || ((attachment.is_public == 1 || attachment.get_status_by_attach(User.current.id) == 2) && org.allow_guest_download == true) elsif attachment.container.is_a?(OrgDocumentComment) org = attachment.container.organization candown = org.allow_guest_download || User.current.member_of_org?(org) || (org.is_public && attachment.is_public == 1) 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/attachments/_activity_attach.html.erb b/app/views/attachments/_activity_attach.html.erb index 3cc429185..b37c80dad 100644 --- a/app/views/attachments/_activity_attach.html.erb +++ b/app/views/attachments/_activity_attach.html.erb @@ -3,7 +3,7 @@