diff --git a/app/views/user_mailer/new_comment_notification.en.haml b/app/views/user_mailer/new_comment_notification.en.haml new file mode 100644 index 000000000..e7e70e53e --- /dev/null +++ b/app/views/user_mailer/new_comment_notification.en.haml @@ -0,0 +1,14 @@ +%p== Hello, #{@user.name}. + +- if @comment.commentable.class == Issue + - link = link_to @comment.commentable.title, [@comment.commentable.project, @comment.commentable] + - object = 'issue' +- elsif @comment.commentable.class == Grit::Commit + - link = link_to @comment.commentable.message, commit_path(@comment.project, @comment.commentable_id) + - object = 'commit' +%p User #{ link_to @comment.user.uname, user_path(@comment.user)} added new comment to #{object} #{link}. + +%p "#{ @comment.body }" + + +%p== Support Team «ROSA Build System» diff --git a/app/views/user_mailer/new_comment_notification.haml b/app/views/user_mailer/new_comment_notification.haml deleted file mode 100644 index 15b4e6a6f..000000000 --- a/app/views/user_mailer/new_comment_notification.haml +++ /dev/null @@ -1,7 +0,0 @@ -%p== Здравствуйте, #{@user.name}. - -%p К коммиту был добавлен новый комментарий. -%p "#{ @comment.body }" - - -%p== Команда поддержки «ROSA Build System» diff --git a/app/views/user_mailer/new_comment_notification.ru.haml b/app/views/user_mailer/new_comment_notification.ru.haml new file mode 100644 index 000000000..c0f4e27e3 --- /dev/null +++ b/app/views/user_mailer/new_comment_notification.ru.haml @@ -0,0 +1,14 @@ +%p== Hello, #{@user.name}. + +- if @comment.commentable.class == Issue + - link = link_to @comment.commentable.title, [@comment.commentable.project, @comment.commentable] + - object = 'issue' +- elsif @comment.commentable.class == Grit::Commit + - link = link_to @comment.commentable.message, commit_path(@comment.project, @comment.commentable_id]) + - object = 'commit' +%p User #{ link_to @comment.user.uname, user_path(@comment.user)} added new comment to #{object} #{link}. + +%p "#{ @comment.body }" + + +%p== Support Team «ROSA Build System» diff --git a/app/views/user_mailer/new_commit_comment_notification.haml b/app/views/user_mailer/new_commit_comment_notification.haml deleted file mode 100644 index 48885d8c9..000000000 --- a/app/views/user_mailer/new_commit_comment_notification.haml +++ /dev/null @@ -1,9 +0,0 @@ -%p== Здравствуйте, #{@user.name}. - - -%p На Ваш комментарий в коммите #{ link_to @comment.commentable.message, commit_path(@comment.project, @comment.commentable_id]) } был дан ответ. - -%p "#{ @comment.body }" - - -%p== Команда поддержки «ROSA Build System»