修正问题
This commit is contained in:
parent
f829c6ff23
commit
6b847e27d9
|
@ -210,8 +210,8 @@ class JournalsForMessage < ActiveRecord::Base
|
||||||
else # 留言回复
|
else # 留言回复
|
||||||
# 添加留言回复人
|
# 添加留言回复人
|
||||||
reply_to = User.find(self.reply_id)
|
reply_to = User.find(self.reply_id)
|
||||||
if self.user_id != self.parent.user_id # 如果回帖人不是用户自己
|
if self.user_id != self.parent.user_id && self.user_id != self.parent.jour_id # 如果回帖人不是用户自己
|
||||||
receivers << self.parent.jour
|
receivers << self.parent.user
|
||||||
if self.reply_id != self.parent.user_id
|
if self.reply_id != self.parent.user_id
|
||||||
receivers << reply_to
|
receivers << reply_to
|
||||||
end
|
end
|
||||||
|
|
|
@ -51,8 +51,8 @@
|
||||||
<% end %>
|
<% end %>
|
||||||
<% end %>
|
<% end %>
|
||||||
<%# 用户留言 %>
|
<%# 用户留言 %>
|
||||||
<% unless @user_forge_messages.nil? %>
|
<% unless @user_feedback_messages.nil? %>
|
||||||
<% unless @user_forge_messages_count > 0 %>
|
<% if @user_feedback_messages_count > 0 %>
|
||||||
<li><a href="javascript:void(0);" class="resourcesGrey"><%= link_to "用户留言",{:controller=> 'users', :action => 'user_messages', id: User.current.id, host: Setting.host_user, :type => 'user_feedback'} %></a></li>
|
<li><a href="javascript:void(0);" class="resourcesGrey"><%= link_to "用户留言",{:controller=> 'users', :action => 'user_messages', id: User.current.id, host: Setting.host_user, :type => 'user_feedback'} %></a></li>
|
||||||
<% end %>
|
<% end %>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
@ -224,20 +224,28 @@
|
||||||
<% end %>
|
<% end %>
|
||||||
<%# 用户留言消息 %>
|
<%# 用户留言消息 %>
|
||||||
<% unless @user_feedback_messages.nil? %>
|
<% unless @user_feedback_messages.nil? %>
|
||||||
<% @user_forge_messages.each do |urm| %>
|
<% @user_feedback_messages.each do |ufm| %>
|
||||||
<% if urm.memo_type == "Memo" %>
|
<% if ufm.journals_for_message_type == "Principal" %>
|
||||||
<ul class="homepageNewsList fl">
|
<ul class="homepageNewsList fl">
|
||||||
<li class="homepageNewsPortrait fl">
|
<li class="homepageNewsPortrait fl">
|
||||||
<a href="javascript:void(0);"><%= image_tag(url_to_avatar(urm.memo.author), :width => "30", :height => "30") %></a>
|
<a href="javascript:void(0);"><%= image_tag(url_to_avatar(ufm.journals_for_message.user), :width => "30", :height => "30") %></a>
|
||||||
</li>
|
</li>
|
||||||
<li class="homepageNewsPublisher fl">
|
<li class="homepageNewsPublisher fl">
|
||||||
<a href="javascript:void(0);" class="<%= urm.viewed == 0 ? "newsBlack" : "newsBlue" %>"><%= urm.memo.author %></a>
|
<a href="javascript:void(0);" class="<%= ufm.viewed == 0 ? "newsBlack" : "newsBlue" %>"><%= ufm.journals_for_message.user %></a>
|
||||||
</li>
|
</li>
|
||||||
<li class="<%= urm.viewed == 0 ? "homepageNewsTypeNotRead fl" : "homepageNewsType fl" %>">回复了贴吧帖子</li>
|
<% if ufm.journals_for_message.reply_id == 0 %>
|
||||||
|
|
||||||
|
<li class="<%= ufm.viewed == 0 ? "homepageNewsTypeNotRead fl" : "homepageNewsType fl" %>">给你留言了</li>
|
||||||
<li class="homepageNewsContent fl"><a href="javascript:void(0);" class="newsGrey">
|
<li class="homepageNewsContent fl"><a href="javascript:void(0);" class="newsGrey">
|
||||||
<%= link_to urm.memo.subject, forum_memo_path(urm.memo.forum_id, urm.memo.parent_id ? urm.memo.parent_id: urm.memo.id),:class => "#{urm.viewed == 0 ? "newsBlack" : "newsGrey"}" %></a>
|
<%= link_to ufm.journals_for_message.notes, feedback_path(ufm.journals_for_message.jour_id),:class => "#{ufm.viewed == 0 ? "newsBlack" : "newsGrey"}" %></a>
|
||||||
</li>
|
</li>
|
||||||
<li class="homepageNewsTime fl"><%= time_tag(urm.memo.created_at).html_safe %> </li>
|
<% else %>
|
||||||
|
<li class="<%= ufm.viewed == 0 ? "homepageNewsTypeNotRead fl" : "homepageNewsType fl" %>">回复了你的留言</li>
|
||||||
|
<li class="homepageNewsContent fl"><a href="javascript:void(0);" class="newsGrey">
|
||||||
|
<%= link_to ufm.journals_for_message.notes, feedback_path(ufm.journals_for_message.parent.user_id),:class => "#{ufm.viewed == 0 ? "newsBlack" : "newsGrey"}" %></a>
|
||||||
|
</li>
|
||||||
|
<% end %>
|
||||||
|
<li class="homepageNewsTime fl"><%= time_tag(ufm.journals_for_message.created_on).html_safe %> </li>
|
||||||
</ul>
|
</ul>
|
||||||
<% end %>
|
<% end %>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
Loading…
Reference in New Issue