diff --git a/app/controllers/organizations_controller.rb b/app/controllers/organizations_controller.rb
index 3ab62bbea..2ab724728 100644
--- a/app/controllers/organizations_controller.rb
+++ b/app/controllers/organizations_controller.rb
@@ -76,7 +76,7 @@ class OrganizationsController < ApplicationController
def show
# 组织新类型 show_mode:判断标准 1为新类型,0为旧
- if @organization.show_mode.to_i == 1 && params[:org_subfield_id].nil? && params[:list] .nil?
+ if @organization.switch_type && params[:org_subfield_id].nil? && params[:list] .nil?
if @organization.is_public? || User.current.admin? || User.current.member_of_org?(@organization)
# REDO:时间紧,暂时先这样
@org_logo_attchment = Attachment.find_by_sql("SELECT * from attachments WHERE container_id = #{@organization.id} and container_type = 'Organization' and attachtype = 0 and filename REGEXP '(.jpg|.png|.bmp|.gif|.jpeg)' ORDER BY created_on desc limit 1").first
diff --git a/app/views/layouts/base_org2.html.erb b/app/views/layouts/base_org2.html.erb
index 799aaa42b..e51a62e24 100644
--- a/app/views/layouts/base_org2.html.erb
+++ b/app/views/layouts/base_org2.html.erb
@@ -14,7 +14,7 @@
<%= javascript_include_tag 'attachments' %>
<%#= call_hook :view_layouts_base_html_head %>
- <%#= yield :header_tags -%>
+ <%= yield :header_tags -%>
- <% act = OrgActivity.where("org_act_type = 'OrgDocumentComment' and org_act_id =?", @organization.home_id).first %>
- <%= render :partial => 'show_home_page', :locals => {:document => OrgDocumentComment.find(@organization.home_id), :home_id => @organization.home_id, :act => act} %>
-<% end %>
-<% if @org_activities %>
- <%= render :partial => 'organizations/org_activities',
- :locals => {:org_activities => @org_activities,
- :page=> @page,
- :org => @organization,
- :org_act_count=> @org_activities.count} %>
+ <% end %>
+
+ <% end %>
+ <% if !@organization.home_id.nil? and OrgDocumentComment.where("id = ?", @organization.home_id).count > 0 and params[:org_subfield_id].nil? %>
+
+ <% act = OrgActivity.where("org_act_type = 'OrgDocumentComment' and org_act_id =?", @organization.home_id).first %>
+ <%= render :partial => 'show_home_page', :locals => {:document => OrgDocumentComment.find(@organization.home_id), :home_id => @organization.home_id, :act => act} %>
+ <% end %>
+ <% if @org_activities %>
+ <%= render :partial => 'organizations/org_activities',
+ :locals => {:org_activities => @org_activities,
+ :page=> @page,
+ :org => @organization,
+ :org_act_count=> @org_activities.count} %>
+ <% end %>
<% end %>
@@ -70,3 +75,4 @@
+