From cd0603f01bd4bbf94713c24feaa821694ed35695 Mon Sep 17 00:00:00 2001 From: huang Date: Fri, 6 May 2016 20:36:06 +0800 Subject: [PATCH] =?UTF-8?q?=E6=A8=A1=E5=BC=8F=E4=BA=8C=E9=87=8C=E9=9D=A2?= =?UTF-8?q?=E7=9A=84=E9=93=BE=E6=8E=A5=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/models/sub_document_comment.rb | 1 + app/views/sub_document_comments/_show_newstyle.html.erb | 6 +++--- .../_show_sub_document_newstyle.html.erb | 4 ++-- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/app/models/sub_document_comment.rb b/app/models/sub_document_comment.rb index 924c6e8ad..799fed7ce 100644 --- a/app/models/sub_document_comment.rb +++ b/app/models/sub_document_comment.rb @@ -10,6 +10,7 @@ class SubDocumentComment < ActiveRecord::Base has_many :org_acts, :class_name => 'OrgActivity',:as =>:org_act ,:dependent => :destroy after_create :document_save_as_sub_activity after_update :update_activity + validates_presence_of :content #动态的更新 private diff --git a/app/views/sub_document_comments/_show_newstyle.html.erb b/app/views/sub_document_comments/_show_newstyle.html.erb index 70f7778b3..8dd90a48d 100644 --- a/app/views/sub_document_comments/_show_newstyle.html.erb +++ b/app/views/sub_document_comments/_show_newstyle.html.erb @@ -1,9 +1,9 @@
您的位置:<%= link_to "首页", organization_path(@organization), :class => "sn-link-grey2" %> > - <%= @org_subfield.name %> > - <%= link_to @subdomain.name, org_subfield_sub_domain_path(@subdomain), :class => "sn-link-grey2" %> > - <%= link_to @document.title, org_subfield_sub_domain_sub_document_comment_path(@document), :class => "sn-link-grey2" %>
+ <%=link_to @org_subfield.name, organization_path(@organization, :org_subfield_id => @org_subfield.id), :class => "sn-link-grey2" %> > + <%= link_to @subdomain.name, org_subfield_sub_domain_sub_document_comments_path(:sub_domain_id => @subdomain.id, :org_subfield_id => @org_subfield.id), :class => "sn-link-grey2" %> > + <%= @document.title %>

<%= @document.title %>

diff --git a/app/views/sub_document_comments/_show_sub_document_newstyle.html.erb b/app/views/sub_document_comments/_show_sub_document_newstyle.html.erb index bfbf7067d..99c2f3639 100644 --- a/app/views/sub_document_comments/_show_sub_document_newstyle.html.erb +++ b/app/views/sub_document_comments/_show_sub_document_newstyle.html.erb @@ -3,8 +3,8 @@
您的位置:<%= link_to "首页", organization_path(@organization), :class => "sn-link-grey2" %> > - <%= @org_subfield.name %> > - <%= link_to @subdomain.name, org_subfield_sub_domain_path(@subdomain, :org_subfield_id => @org_subfield.id), :class => "sn-link-grey2" %> + <%=link_to @org_subfield.name, organization_path(@organization, :org_subfield_id => @org_subfield.id), :class => "sn-link-grey2" %> > + <%= link_to @subdomain.name, org_subfield_sub_domain_sub_document_comments_path(:sub_domain_id => @subdomain.id, :org_subfield_id => @org_subfield.id), :class => "sn-link-grey2" %>