diff --git a/app/controllers/organizations_controller.rb b/app/controllers/organizations_controller.rb index aba656750..466fbd8e3 100644 --- a/app/controllers/organizations_controller.rb +++ b/app/controllers/organizations_controller.rb @@ -14,7 +14,7 @@ class OrganizationsController < ApplicationController include PollHelper helper :user_score helper :journals - + helper :attachments # added by liuping 关注 helper :watchers diff --git a/app/views/messages/_show_org_subfields.html.erb b/app/views/messages/_show_org_subfields.html.erb index 659e1230e..cbd316ea4 100644 --- a/app/views/messages/_show_org_subfields.html.erb +++ b/app/views/messages/_show_org_subfields.html.erb @@ -2,10 +2,14 @@ <% if !org.nil? %> 组织:<%= org.name %> - <% org.org_subfields.where("field_type='Post'").each do |subfield| %> -
  • - -
  • + <% if org.org_subfields.where("field_type='Post'").count > 0 %> + <% org.org_subfields.where("field_type='Post'").each do |subfield| %> +
  • + +
  • + <% end %> + <% else %> +
  • 暂无资源栏目
  • <% end %> <% else %> 请在左侧选择组织 diff --git a/app/views/organizations/_show_org_document.html.erb b/app/views/organizations/_show_org_document.html.erb index 2b0f11cdd..25f6d5044 100644 --- a/app/views/organizations/_show_org_document.html.erb +++ b/app/views/organizations/_show_org_document.html.erb @@ -18,6 +18,9 @@ <%= document.content.html_safe %> <% end %> +
    + <%= link_to_attachments_course document, :author => false %> +