修改了之前留言回复双重显示的问
This commit is contained in:
parent
85351ee7e3
commit
f99e5dcc64
|
@ -23,8 +23,10 @@ class JournalsForMessage < ActiveRecord::Base
|
|||
end
|
||||
|
||||
def act_as_activity
|
||||
if self.jour_type == 'Principal'
|
||||
self.acts << Activity.new(:user_id => self.user_id)
|
||||
if self.jour_type == 'Principal'
|
||||
unless self.user_id == self.jour.id && self.user_id != self.reply_id
|
||||
self.acts << Activity.new(:user_id => self.user_id)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -20,6 +20,7 @@
|
|||
<% @activity.each do |e| %>
|
||||
<% act = e.act %>
|
||||
<% unless act.nil? %>
|
||||
|
||||
<table width="660" border="0" align="left" style="border-bottom: 1px dashed rgb(204, 204, 204); margin-bottom: 10px;font-size:14px;">
|
||||
<tr>
|
||||
<!-- fq -->
|
||||
|
@ -28,26 +29,26 @@
|
|||
<table width="580" border="0" class "info-break">
|
||||
<% case e.act_type %>
|
||||
<% when 'JournalsForMessage' %>
|
||||
<% if User.current.login == @user.login %>
|
||||
<% if User.current.login == @user.login %>
|
||||
<% if e.user_id == act.jour.id %>
|
||||
<tr><td colspan="2" valign="top"><strong><%= link_to("#{e.user.show_name}", user_path(e.user_id)) %></strong> <span class="font_lighter">给你留言了</td></tr>
|
||||
<tr><td colspan="2" valign="top"><strong><%= link_to("#{e.user.show_name}", user_path(e.user_id)) %></strong> <span class="font_lighter">有了留言</td></tr>
|
||||
<% else %>
|
||||
<tr><td colspan="2" valign="top" class="font_lighter"><strong><%= link_to("#{e.user.show_name}", user_path(e.user_id)) %> 给 <%= link_to("#{act.jour.show_name}", user_path(act.jour.id)) %> 留言了</strong> <span class="font_lighter"></td></tr>
|
||||
|
||||
<% end %>
|
||||
<tr><td colspan="2" valign="top" class="font_lighter"><strong><%= link_to("#{e.user.show_name}", user_path(e.user_id)) %> 给 <%= link_to("#{act.jour.show_name}", user_path(act.jour.id)) %> 留言了</strong> </td></tr>
|
||||
<% end %>
|
||||
<% else %>
|
||||
<tr><td colspan="2" valign="top"><strong><%= link_to("#{@user.show_name}", user_path(e.user_id)) %></strong> <span class="font_lighter">有了新的动态</td></tr>
|
||||
<% end %>
|
||||
<!-- end -->
|
||||
<tr>
|
||||
<td colspan="2" width="580" >
|
||||
<p class="font_description">
|
||||
<%=link_to act.notes, user_path(e.user_id) %>
|
||||
<p class="font_description">
|
||||
<%=textilizable act.notes %>
|
||||
</p></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<div style="display: inline-block; float: right; margin-top: 0px"></div>
|
||||
<div style="display: inline-block; float: right; margin-top: 0px"></div>
|
||||
|
||||
<% when 'Bid' %>
|
||||
<tr>
|
||||
<% if act.reward_type ==3 %>
|
||||
|
|
Loading…
Reference in New Issue