From c4cea93a4451003c53ca9f0c4f9edac37d398c1a Mon Sep 17 00:00:00 2001 From: cxt Date: Tue, 21 Jun 2016 13:58:17 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B6=88=E6=81=AF=E5=88=97=E8=A1=A8=E7=9A=84?= =?UTF-8?q?=E2=80=9C=E5=B1=95=E5=BC=80=E6=9B=B4=E5=A4=9A=E2=80=9D=E6=8C=87?= =?UTF-8?q?=E9=92=88=E6=89=8B=E5=8A=BF=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/models/user.rb | 10 +++++----- app/views/layouts/_show_messages_list.html.erb | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/app/models/user.rb b/app/models/user.rb index 2db66dc31..3d491c8ab 100644 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -1147,18 +1147,18 @@ class User < Principal #为新注册用户发送留言 def add_new_jour - # if Message.where("id=19278").any? and Message.where("id=19291").any? and Message.where("id=19292").any? - # lead_message1 = Message.find(19278) - # notes1 = lead_message1.content + if Message.where("id=19278").any? and Message.where("id=19291").any? and Message.where("id=19292").any? + lead_message1 = Message.find(19278) + notes1 = lead_message1.content # lead_message2 = Message.find(19292) # notes2 = lead_message2.content # lead_message3 = Message.find(19291) # notes3 = lead_message3.content # # user_id 默认为课程使者创建 - # self.journals_for_messages << JournalsForMessage.new(:user_id => 1, :notes => notes1, :reply_id => 0, :status => true, :is_readed => false, :private => 0) + self.journals_for_messages << JournalsForMessage.new(:user_id => 1, :notes => notes1, :reply_id => 0, :status => true, :is_readed => false, :private => 0) # self.journals_for_messages << JournalsForMessage.new(:user_id => 1, :notes => notes2, :reply_id => 0, :status => true, :is_readed => false, :private => 0) # self.journals_for_messages << JournalsForMessage.new(:user_id => 1, :notes => notes3, :reply_id => 0, :status => true, :is_readed => false, :private => 0) - # end + end end # 更新邮箱的同事,更新invite_lists表中的邮箱信息 diff --git a/app/views/layouts/_show_messages_list.html.erb b/app/views/layouts/_show_messages_list.html.erb index 762109bf5..f67250e46 100644 --- a/app/views/layouts/_show_messages_list.html.erb +++ b/app/views/layouts/_show_messages_list.html.erb @@ -136,7 +136,7 @@ <% end %> <% end %> - + <%= link_to '查看全部', user_message_path(User.current),:id =>'show_all_messages', :class => "shadowbox_news_all", :style => "display:none", :target =>"_Blank" %>