diff --git a/app/controllers/org_document_comments_controller.rb b/app/controllers/org_document_comments_controller.rb index 1b9280749..264c1fc9f 100644 --- a/app/controllers/org_document_comments_controller.rb +++ b/app/controllers/org_document_comments_controller.rb @@ -41,7 +41,7 @@ class OrgDocumentCommentsController < ApplicationController @org_subfield = OrgSubfield.where(:id => @document.org_subfield_id).first @subfield_content = @organization.org_subfields.order("priority") respond_to do |format| - format.html {render :layout => @organization.switch_type ? 'base_org_custom' : 'base_org'} + format.html {render :layout => (@organization.switch_type && @document && !@document.org_subfield_id.blank?) ? 'base_org_custom' : 'base_org'} end end diff --git a/app/views/org_document_comments/show.html.erb b/app/views/org_document_comments/show.html.erb index dbeabfa72..bcb1a61ef 100644 --- a/app/views/org_document_comments/show.html.erb +++ b/app/views/org_document_comments/show.html.erb @@ -1,4 +1,4 @@ -<% if @organization.switch_type %> +<% if @organization.switch_type && @document && !@document.org_subfield_id.blank? %> <%= render :partial => 'show_custom_org_document_comment' %> <% else %> <%= javascript_include_tag "/assets/kindeditor/kindeditor",'/assets/kindeditor/pasteimg',"create_kindeditor",'blog' %>