diff --git a/app/models/journals_for_message.rb b/app/models/journals_for_message.rb
index 7f2d7647..75433526 100644
--- a/app/models/journals_for_message.rb
+++ b/app/models/journals_for_message.rb
@@ -5,6 +5,8 @@ class JournalsForMessage < ActiveRecord::Base
belongs_to :jour, :polymorphic => true
belongs_to :user
+ has_many :acts, :class_name => 'Activity', :as => :act, :dependent => :destroy
+ after_create :act_as_activity #huang
def self.delete_message(message_id)
self.delete_all "id = #{message_id}"
@@ -20,4 +22,9 @@ class JournalsForMessage < ActiveRecord::Base
message
end
+ def act_as_activity
+ if self.jour_type == 'Principal'
+ self.acts << Activity.new(:user_id => self.user_id)
+ end
+ end
end
diff --git a/app/views/users/show.html.erb b/app/views/users/show.html.erb
index 681135e8..366fb8f2 100644
--- a/app/views/users/show.html.erb
+++ b/app/views/users/show.html.erb
@@ -27,6 +27,27 @@
<% case e.act_type %>
+ <% when 'JournalsForMessage' %>
+ <% if User.current.login == @user.login %>
+ <% if e.user_id == act.jour.id %>
+ <%= link_to("#{e.user.show_name}", user_path(e.user_id)) %> 给你留言了 |
+ <% else %>
+ <%= link_to("#{e.user.show_name}", user_path(e.user_id)) %> 给 <%= link_to("#{act.jour.show_name}", user_path(act.jour.id)) %> 留言了 |
+
+ <% end %>
+ <% else %>
+ <%= link_to("#{@user.show_name}", user_path(e.user_id)) %> 有了新的动态 |
+ <% end %>
+
+
+
+
+ <%=link_to act.notes, user_path(e.user_id) %>
+ |
+
+
+
+
<% when 'Bid' %>
|
<% if act.reward_type ==3 %>
diff --git a/config/locales/zh.yml b/config/locales/zh.yml
index b8ec5302..e7dc7393 100644
--- a/config/locales/zh.yml
+++ b/config/locales/zh.yml
@@ -1407,6 +1407,7 @@ zh:
label_me: 我
label_my: 我
label_i: 我
+ label_you: 你
label_join_bidding: 参与了应标
label_jion_bidding_homework: 已提交!
label_bidding_user: 应标人:
diff --git a/public/images/avatars/User/4246 b/public/images/avatars/User/4246
index 78704a09..757c2a62 100644
Binary files a/public/images/avatars/User/4246 and b/public/images/avatars/User/4246 differ
diff --git a/public/stylesheets/application.css b/public/stylesheets/application.css
index 176430c5..6e343930 100644
--- a/public/stylesheets/application.css
+++ b/public/stylesheets/application.css
@@ -122,8 +122,29 @@ div.sidebar-s p.location{
div.sidebar-t{
+}
+/*end*/
+
+/*main-conten*/
+div.main-content{
+ float: left;
+ width: 660px;
+ border-bottom: 1px dashed rgb(204, 204, 204);
+ margin-bottom: 10px;
+ font-size:14px;
+}
+
+div.main-content-f{
+ float:left;
+ width: 80px;
+}
+
+div.main-content-s{
+ float: left;
+ width: 580px;
}
/**/
+
/*forums-index*/
div.forums-index{
padding-left: 10px;
|