Merge branch 'develop' of 10.0.47.245:/home/trustie2 into develop

This commit is contained in:
yanxd 2013-12-09 18:31:52 +08:00
commit e5010d118b
2 changed files with 13 additions and 10 deletions

View File

@ -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.reply_id !=0
self.acts << Activity.new(:user_id => self.user_id)
end
end
end
end

View File

@ -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>&nbsp;<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>&nbsp;<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>&nbsp;<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>&nbsp;</td></tr>
<% end %>
<% else %>
<tr><td colspan="2" valign="top"><strong><%= link_to("#{@user.show_name}", user_path(e.user_id)) %></strong>&nbsp;<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 %>