From 15cff47c9268f0389a0a7aa8fc215e5f7b897d0c Mon Sep 17 00:00:00 2001 From: ouyangxuhua Date: Tue, 29 Dec 2015 17:13:48 +0800 Subject: [PATCH] =?UTF-8?q?1.=E8=BD=AC=E5=8F=91=E5=B8=96=E5=AD=90=E6=97=B6?= =?UTF-8?q?=EF=BC=8C=E5=BD=93=E7=BB=84=E7=BB=87=E6=B2=A1=E6=9C=89=E8=B5=84?= =?UTF-8?q?=E6=BA=90=E6=A0=8F=E7=9B=AE=E6=97=B6=EF=BC=8C=E7=BB=99=E5=87=BA?= =?UTF-8?q?=E6=8F=90=E7=A4=BA=EF=BC=9B=202.=E7=BB=84=E7=BB=87=E6=96=87?= =?UTF-8?q?=E7=AB=A0=E7=9A=84=E9=99=84=E4=BB=B6=E6=98=BE=E7=A4=BA=E5=9C=A8?= =?UTF-8?q?=E7=BB=84=E7=BB=87=E5=8A=A8=E6=80=81/=E7=BB=84=E7=BB=87?= =?UTF-8?q?=E6=96=87=E7=AB=A0=E5=88=97=E8=A1=A8=E4=B8=AD=EF=BC=9B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/organizations_controller.rb | 2 +- app/views/messages/_show_org_subfields.html.erb | 12 ++++++++---- app/views/organizations/_show_org_document.html.erb | 3 +++ 3 files changed, 12 insertions(+), 5 deletions(-) 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 %> +