Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
李少辉-开发者
gitlab-foss
提交
ffe064a2
G
gitlab-foss
项目概览
李少辉-开发者
/
gitlab-foss
通知
15
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
G
gitlab-foss
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
提交
ffe064a2
编写于
12月 31, 2012
作者:
D
Dmitriy Zaporozhets
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Bit of cleanup and improving mailer
上级
cf3f22cc
变更
7
隐藏空白更改
内联
并排
Showing
7 changed file
with
16 addition
and
13 deletion
+16
-13
app/mailers/notify.rb
app/mailers/notify.rb
+5
-2
app/views/layouts/notify.html.haml
app/views/layouts/notify.html.haml
+2
-2
app/views/notify/issue_status_changed_email.html.haml
app/views/notify/issue_status_changed_email.html.haml
+2
-2
app/views/notify/new_issue_email.html.haml
app/views/notify/new_issue_email.html.haml
+4
-4
app/views/notify/note_merge_request_email.html.haml
app/views/notify/note_merge_request_email.html.haml
+1
-1
app/views/notify/reassigned_issue_email.html.haml
app/views/notify/reassigned_issue_email.html.haml
+1
-1
spec/mailers/notify_spec.rb
spec/mailers/notify_spec.rb
+1
-1
未找到文件。
app/mailers/notify.rb
浏览文件 @
ffe064a2
...
...
@@ -148,12 +148,15 @@ class Notify < ActionMailer::Base
# >> @project = Project.last
# => #<Project id: 1, name: "Ruby on Rails", path: "ruby_on_rails", ...>
# >> subject('Lorem ipsum')
# => "GitLab |
Lorem ipsum | Ruby on Rails
"
# => "GitLab |
Ruby on Rails | Lorem ipsum
"
#
# # Accepts multiple arguments
# >> subject('Lorem ipsum', 'Dolor sit amet')
# => "GitLab | Lorem ipsum | Dolor sit amet"
def
subject
(
*
extra
)
"GitLab | "
<<
extra
.
join
(
' | '
)
<<
(
@project
?
" |
#{
@project
.
name_with_namespace
}
"
:
""
)
subject
=
"GitLab"
subject
<<
(
@project
?
" |
#{
@project
.
name_with_namespace
}
"
:
""
)
subject
<<
" | "
+
extra
.
join
(
' | '
)
if
extra
.
present?
subject
end
end
app/views/layouts/notify.html.haml
浏览文件 @
ffe064a2
...
...
@@ -13,10 +13,10 @@
%td
{
style:
"font-size: 0px;"
,
width:
"20"
}
\
%td
{
align:
"left"
,
style:
"padding: 10px 0"
,
width:
"580"
}
%h1
{
style:
"
font-size: 24px; color: #BBBBBB; font: normal 22
px Helvetica, Arial, sans-serif; margin: 0; padding: 0; line-height: 32px;"
}
%h1
{
style:
"
color: #BBBBBB; font: normal 20
px Helvetica, Arial, sans-serif; margin: 0; padding: 0; line-height: 32px;"
}
GITLAB
-
if
@project
→
#{
@project
.
name_with_namespace
}
\/
#{
@project
.
name_with_namespace
}
%table
{
align:
"center"
,
bgcolor:
"#fff"
,
border:
"0"
,
cellpadding:
"0"
,
cellspacing:
"0"
,
style:
"font-family: Helvetica, Arial, sans-serif; background: #fff;"
,
width:
"600"
}
%tr
=
yield
%tr
...
...
app/views/notify/issue_status_changed_email.html.haml
浏览文件 @
ffe064a2
%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;"
}
%td
{
width:
"21"
}
%td
%h2
{
style:
"color:#646464; font-weight: bold; margin: 0; padding: 0; line-height: 26px; font-size: 18px; font-family: Helvetica, Arial, sans-serif; "
}
=
"Issue was
#{
@issue_status
}
by
#{
@updated_by
.
name
}
"
%td
{
style:
"font-size: 1px; line-height: 1px;"
,
width:
"21"
}
...
...
app/views/notify/new_issue_email.html.haml
浏览文件 @
ffe064a2
%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;"
}
%td
{
width:
"21"
}
%td
%h2
{
style:
"color:#646464; font-weight: bold; margin: 0; padding: 0; line-height: 26px; font-size: 18px; font-family: Helvetica, Arial, sans-serif; "
}
New Issue was created and assigned to you.
%td
{
style:
"font-size: 1px; line-height: 1px;"
,
width:
"21"
}
%td
{
width:
"21"
}
%tr
%td
{
style:
"font-size: 1px; line-height: 1px;"
,
width:
"21"
}
%td
{
width:
"21"
}
%td
{
align:
"left"
,
style:
"padding: 20px 0 0;"
}
%p
{
style:
"color:#646464 !important; line-height: 26px; font-size: 16px; font-family: Helvetica, Arial, sans-serif; "
}
=
"Issue #
#{
@issue
.
id
}
"
...
...
app/views/notify/note_merge_request_email.html.haml
浏览文件 @
ffe064a2
...
...
@@ -2,7 +2,7 @@
%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
{
width:
"21"
}
%td
{
align:
"left"
,
style:
"padding: 20px 0 0;"
}
%td
%h2
{
style:
"color:#646464; font-weight: normal;"
}
-
if
@note
.
for_diff_line?
=
link_to
"New comment on diff"
,
diffs_project_merge_request_url
(
@merge_request
.
project
,
@merge_request
,
anchor:
"note_
#{
@note
.
id
}
"
)
...
...
app/views/notify/reassigned_issue_email.html.haml
浏览文件 @
ffe064a2
...
...
@@ -2,7 +2,7 @@
%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;"
}
%td
%h2
{
style:
"color:#646464; font-weight: bold; margin: 0; padding: 0; line-height: 26px; font-size: 18px; font-family: Helvetica, Arial, sans-serif; "
}
=
"Reassigned Issue #
#{
@issue
.
id
}
"
=
link_to_gfm
truncate
(
@issue
.
title
,
length:
30
),
project_issue_url
(
@issue
.
project
,
@issue
)
...
...
spec/mailers/notify_spec.rb
浏览文件 @
ffe064a2
...
...
@@ -60,7 +60,7 @@ describe Notify do
it_behaves_like
'an assignee email'
it
'has the correct subject'
do
should
have_subject
/
new issue #
#{
issue
.
id
}
\|
#{
issue
.
title
}
\|
#{
project
.
nam
e
}
/
should
have_subject
/
#{
project
.
name
}
\| new issue #
#{
issue
.
id
}
\|
#{
issue
.
titl
e
}
/
end
it
'contains a link to the new issue'
do
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录