#53: update Activity Feed

This commit is contained in:
Vokhmin Alexey V 2013-03-28 17:33:08 +04:00
parent 54fcda0780
commit 857c27c5be
2 changed files with 19 additions and 3 deletions

View File

@ -148,9 +148,19 @@ class ActivityFeedObserver < ActiveRecord::Observer
ActivityFeed.create(
:user => recipient,
:kind => 'build_list_notification',
:data => {:task_num => record.bs_id, :build_list_id => record.id, :status => record.status, :updated_at => record.updated_at,
:project_id => record.project_id, :project_name => record.project.name, :project_owner => record.project.owner.uname,
:user_name => record.user.name, :user_email => record.user.email, :user_id => record.user_id}
:data => {
:task_num => record.bs_id,
:build_list_id => record.id,
:status => record.status,
:updated_at => record.updated_at,
:project_id => record.project_id,
:project_name => record.project.name,
:project_owner => record.project.owner.uname,
:user_name => record.user.name,
:user_email => record.user.email,
:user_id => record.user_id,
:publisher_fullname => record.publisher.try(:fullname)
}
)
end
end

View File

@ -14,6 +14,12 @@
- ['success', nil]
- else ['failed', t("layout.build_lists.statuses.#{BuildList::HUMAN_STATUSES[status]}")]
= raw t("notifications.bodies.build_status.#{message}", :error => error)
- publisher_fullname ||= nil
- if status == BuildList::BUILD_PUBLISHED && publisher_fullname
.both
%span
= t('activerecord.attributes.build_list.publisher')
= publisher_fullname
.both
%span.date= updated_at
.both