From f6c3e89454f1373d2690df59c4daa52cc6ad9aa5 Mon Sep 17 00:00:00 2001 From: huang Date: Fri, 29 Apr 2016 16:14:08 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BA=8C=E7=BA=A7=E7=9B=AE=E5=BD=95=E5=B8=96?= =?UTF-8?q?=E5=AD=90=E8=AF=A6=E7=BB=86=E9=A1=B5=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../sub_document_comments_controller.rb | 4 + app/views/layouts/base_sub_domain.html.erb | 172 +++++++++--------- .../_show_newstyle.html.erb | 22 +-- .../_show_sub_document_newstyle.html.erb | 4 +- app/views/sub_document_comments/show.html.erb | 2 +- app/views/sub_domains/show.html.erb | 4 +- 6 files changed, 103 insertions(+), 105 deletions(-) diff --git a/app/controllers/sub_document_comments_controller.rb b/app/controllers/sub_document_comments_controller.rb index b2c39b39e..3aeaaa2c7 100644 --- a/app/controllers/sub_document_comments_controller.rb +++ b/app/controllers/sub_document_comments_controller.rb @@ -53,6 +53,7 @@ class SubDocumentCommentsController < ApplicationController respond_to do |format| format.html {render :layout => @organization.switch_type ? 'base_sub_domain' : 'base_org'} end + else render_403 end @@ -185,6 +186,9 @@ class SubDocumentCommentsController < ApplicationController @subdomain = SubDomain.find(params[:sub_domain_id]) @org_subfield = OrgSubfield.find(params[:org_subfield_id]) @organization = @org_subfield.organization + rescue ActiveRecord::RecordNotFound + # source_subdomain_subfield not found + render_404 end def find_subfield_content diff --git a/app/views/layouts/base_sub_domain.html.erb b/app/views/layouts/base_sub_domain.html.erb index c6eec5c30..2df4f3523 100644 --- a/app/views/layouts/base_sub_domain.html.erb +++ b/app/views/layouts/base_sub_domain.html.erb @@ -79,98 +79,100 @@ -
-
- <%= render :partial => 'organizations/org_logined_header' %> -
-
+ <%# 更新访问数,刷新的时候更新访问次数 %> -<% update_visiti_count @organization %> + <% update_visiti_count @organization %> <%# over %> - + - -<%= render_flash_messages %> -<%= yield %> -<%= call_hook :view_layouts_base_content %> -
+ + <%= render_flash_messages %> + <%= yield %> + <%= call_hook :view_layouts_base_content %> +
- + +