Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
gitlab-ce
Commits
6a0defc3
Commit
6a0defc3
authored
Dec 18, 2011
by
Valery Sizov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
notification for note for merge request
parent
a66d9b4c
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
33 additions
and
2 deletions
+33
-2
app/mailers/notify.rb
app/mailers/notify.rb
+8
-0
app/models/mailer_observer.rb
app/models/mailer_observer.rb
+2
-2
app/views/notify/note_merge_request_email.html.haml
app/views/notify/note_merge_request_email.html.haml
+23
-0
No files found.
app/mailers/notify.rb
View file @
6a0defc3
...
@@ -31,6 +31,14 @@ class Notify < ActionMailer::Base
...
@@ -31,6 +31,14 @@ class Notify < ActionMailer::Base
mail
(
:to
=>
@user
.
email
,
:subject
=>
"gitlab |
#{
@note
.
project
.
name
}
"
)
mail
(
:to
=>
@user
.
email
,
:subject
=>
"gitlab |
#{
@note
.
project
.
name
}
"
)
end
end
def
note_merge_request_email
(
user
,
note
)
@user
=
user
@note
=
note
@project
=
note
.
project
@merge_request
=
note
.
noteable
mail
(
:to
=>
@user
.
email
,
:subject
=>
"gitlab |
#{
@note
.
project
.
name
}
"
)
end
def
note_issue_email
(
user
,
note
)
def
note_issue_email
(
user
,
note
)
@user
=
user
@user
=
user
@note
=
note
@note
=
note
...
...
app/models/mailer_observer.rb
View file @
6a0defc3
...
@@ -34,8 +34,8 @@ class MailerObserver < ActiveRecord::Observer
...
@@ -34,8 +34,8 @@ class MailerObserver < ActiveRecord::Observer
Notify
.
note_commit_email
(
u
,
note
).
deliver
Notify
.
note_commit_email
(
u
,
note
).
deliver
when
"Issue"
then
when
"Issue"
then
Notify
.
note_issue_email
(
u
,
note
).
deliver
Notify
.
note_issue_email
(
u
,
note
).
deliver
when
"MergeRequest"
when
"MergeRequest"
then
true
# someone should write email notification
Notify
.
note_merge_request_email
(
u
,
note
).
deliver
when
"Snippet"
when
"Snippet"
true
true
else
else
...
...
app/views/notify/note_merge_request_email.html.haml
0 → 100644
View file @
6a0defc3
%td
.content
{
:align
=>
"left"
,
:style
=>
"font-family: Helvetica, Arial, sans-serif; padding: 20px 0 0;"
,
:valign
=>
"top"
,
:width
=>
"600"
}
%table
{
:border
=>
"0"
,
:cellpadding
=>
"0"
,
:cellspacing
=>
"0"
,
:style
=>
"color: #717171; font: normal 11px Helvetica, Arial, sans-serif; margin: 0; padding: 0;"
,
:width
=>
"600"
}
%tr
%td
{
:style
=>
"font-size: 1px; line-height: 1px;"
,
:width
=>
"21"
}
%td
{
:align
=>
"left"
,
:style
=>
"padding: 20px 0 0;"
}
%h2
{
:style
=>
"color:#646464; font-weight: bold; margin: 0; padding: 0; line-height: 26px; font-size: 18px; font-family: Helvetica, Arial, sans-serif; "
}
New comment for Merge Request
=
link_to
truncate
(
@merge_request
.
title
,
:length
=>
16
),
project_merge_request_url
(
@project
,
@merge_request
,
:anchor
=>
"note_
#{
@note
.
id
}
"
)
%td
{
:style
=>
"font-size: 1px; line-height: 1px;"
,
:width
=>
"21"
}
%tr
%td
{
:style
=>
"font-size: 1px; line-height: 1px;"
,
:width
=>
"21"
}
%td
{
:style
=>
"padding: 15px 0 15px;"
,
:valign
=>
"top"
}
%p
{
:style
=>
"color:#767676; font-weight: normal; margin: 0; padding: 0; line-height: 20px; font-size: 12px;font-family: Helvetica, Arial, sans-serif; "
}
%a
{
:href
=>
"#"
,
:style
=>
"color: #0eb6ce; text-decoration: none;"
}
#{
@note
.
author
.
name
}
left next message:
%br
%table
{
:border
=>
"0"
,
:cellpadding
=>
"0"
,
:cellspacing
=>
"0"
,
:width
=>
"558"
}
%tr
%td
{
:valign
=>
"top"
}
%cite
{
:style
=>
"color:#767676; font-weight: normal; margin: 0; padding: 0; line-height: 20px; font-size: 12px;font-family: Helvetica, Arial, sans-serif; "
}
=
@note
.
note
%td
{
:style
=>
"font-size: 1px; line-height: 1px;"
,
:width
=>
"21"
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment