tiding add project package

dev_aliyun
p31729568 5 years ago
parent 7c02fbab01
commit f1a7631255

@ -255,8 +255,14 @@ class UsersController < ApplicationController
type_list = ["System"] type_list = ["System"]
when "interactive" when "interactive"
type_list = ["Comment", "Mentioned", "Praise", "Fan"] type_list = ["Comment", "Mentioned", "Praise", "Fan"]
when 'project_package'
type_list = ['Created', 'Destroyed', 'Bidding', 'BiddingEnd', 'BiddingWon', 'BiddingLost']
end end
@tids = @tids.where(:tiding_type => type_list) @tids = @tids.where(:tiding_type => type_list)
if params[:type] == 'project_package'
@tids = @tids.where(container_type: 'ProjectPackage')
end
else else
@new_tids_count = @tids.where("created_at > '#{@onclick_time}'").count @new_tids_count = @tids.where("created_at > '#{@onclick_time}'").count
@new_mess_count = @user.private_messages.where("status = 0").group(:target_id).length @new_mess_count = @user.private_messages.where("status = 0").group(:target_id).length

@ -150,9 +150,9 @@ class Tiding < ActiveRecord::Base
else else
if container.parent.present? if container.parent.present?
if container.parent_id == container.root_id if container.parent_id == container.root_id
"评论了你的帖子:" + message_content(container.content) "评论了你的帖子:" + message_content(container.subject)
else else
"评论了你的回复:" + message_content(container.content) "评论了你的回复:" + message_content(container.subject)
end end
else else
"发布了帖子:" + container.subject "发布了帖子:" + container.subject

@ -15,6 +15,9 @@
<li> <li>
<a href="<%= user_tidings_user_path(@user, :type => 'project') %>" id="tiding_type_project" data-remote="true">项目提醒</a> <a href="<%= user_tidings_user_path(@user, :type => 'project') %>" id="tiding_type_project" data-remote="true">项目提醒</a>
</li> </li>
<li>
<a href="<%= user_tidings_user_path(@user, :type => 'project_package') %>" id="tiding_type_project_package" data-remote="true">众包</a>
</li>
<li> <li>
<a href="<%= user_tidings_user_path(@user, :type => 'apply') %>" id="tiding_type_apply" data-remote="true">审核</a> <a href="<%= user_tidings_user_path(@user, :type => 'apply') %>" id="tiding_type_apply" data-remote="true">审核</a>
</li> </li>

Loading…
Cancel
Save