#575: added build_list_notification

This commit is contained in:
Vokhmin Alexey V 2012-09-16 21:29:45 +04:00
parent 01576702a0
commit ef923d06c7
4 changed files with 46 additions and 1 deletions

View File

@ -36,6 +36,20 @@ class UserMailer < ActionMailer::Base
end
end
def build_list_notification(build_list, user)
I18n.locale = user.language if user.language
@user = user
@build_list = build_list
subject = "[#{build_list.bs_id.present? ? build_list.bs_id : t("layout.build_lists.bs_id_not_set")}] "
subject << "«#{build_list.project ? build_list.project.name_with_owner : t("layout.projects.unexisted_project")}», "
subject << user.name
subject << " - #{build_list.human_status}"
mail(:to => user.email, :subject =>subject) do |format|
format.html
end
end
def invite_approve_notification(register_request)
I18n.locale = register_request.language if register_request.language
@register_request = register_request

View File

@ -0,0 +1,16 @@
%p
Build task
- if @build_list.project
= link_to "«#{@build_list.project.name_with_owner}»", @build_list.project
- else
= "«#{t("layout.projects.unexisted_project")}»"
,
= @user.name
finished with status
= "«#{@build_list.human_status}»."
%p
More detailed information You can get by link:
= link_to "task [№ #{(@build_list.bs_id ? @build_list.bs_id : t("layout.build_lists.bs_id_not_set"))}]", @build_list
%p== Support team «ROSA Build System»

View File

@ -0,0 +1,16 @@
%p
Сборка проекта
- if @build_list.project
= link_to "«#{@build_list.project.name_with_owner}»", @build_list.project
- else
= "«#{t("layout.projects.unexisted_project")}»"
,
= @user.name
завершена со статусом
= "«#{@build_list.human_status}»."
%p
Более подробную информацию можно получить по ссылке:
= link_to "задание [№ #{(@build_list.bs_id ? @build_list.bs_id : t("layout.build_lists.bs_id_not_set"))}]", @build_list
%p== Команда поддержки «ROSA Build System»

View File

@ -18,7 +18,6 @@ ru:
new_user_notification: Регистрация на проекте «%{ project_name }»
issue_assign_notification: Вам назначили задачу
invite_approve_notification: Приглашение в ABF
build_task: Сборочное задание
bodies:
new_comment_notification: