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
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
44969774
Commit
44969774
authored
Mar 07, 2017
by
James Edwards-Jones
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
CSV export uses new mailer layout
parent
cced33db
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
76 deletions
+12
-76
app/mailers/emails/issues.rb
app/mailers/emails/issues.rb
+4
-1
app/views/notify/issues_csv_email.html.haml
app/views/notify/issues_csv_email.html.haml
+8
-75
No files found.
app/mailers/emails/issues.rb
View file @
44969774
...
...
@@ -56,7 +56,10 @@ module Emails
filename
=
"
#{
project
.
full_path
.
parameterize
}
_issues_
#{
Date
.
today
.
iso8601
}
.csv"
attachments
[
filename
]
=
{
content:
csv_data
,
mime_type:
'text/csv'
}
mail
(
to:
user
.
notification_email
,
subject:
subject
(
"Exported issues"
))
mail
(
to:
user
.
notification_email
,
subject:
subject
(
"Exported issues"
),
skip_premailer:
true
)
do
|
format
|
format
.
html
{
render
layout:
'mailer'
}
format
.
text
{
render
layout:
'mailer'
}
end
end
private
...
...
app/views/notify/issues_csv_email.html.haml
View file @
44969774
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional //EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
%html
{
lang:
"en"
}
%head
%meta
{
content:
"text/html; charset=UTF-8"
,
"http-equiv"
=>
"Content-Type"
}
/
%meta
{
content:
"width=device-width, initial-scale=1"
,
name:
"viewport"
}
/
%meta
{
content:
"IE=edge"
,
"http-equiv"
=>
"X-UA-Compatible"
}
/
%title
=
message
.
subject
:css
/* CLIENT-SPECIFIC STYLES */
body
,
table
,
td
,
a
{
-webkit-text-size-adjust
:
100%
;
-ms-text-size-adjust
:
100%
;
}
table
,
td
{
mso-table-lspace
:
0pt
;
mso-table-rspace
:
0pt
;
}
img
{
-ms-interpolation-mode
:
bicubic
;
}
/* iOS BLUE LINKS */
a
[
x-apple-data-detectors
]
{
color
:
inherit
!important
;
text-decoration
:
none
!important
;
font-size
:
inherit
!important
;
font-family
:
inherit
!important
;
font-weight
:
inherit
!important
;
line-height
:
inherit
!important
;
}
/* ANDROID MARGIN HACK */
body
{
margin
:
0
!important
;
}
div
[
style
*=
"margin: 16px 0"
]
{
margin
:
0
!important
;
}
@media
only
screen
and
(
max-width
:
639px
)
{
body
,
#body
{
min-width
:
320px
!important
;
}
table
.wrapper
{
width
:
100%
!important
;
min-width
:
320px
!important
;
}
table
.wrapper
>
tbody
>
tr
>
td
{
border-left
:
0
!important
;
border-right
:
0
!important
;
border-radius
:
0
!important
;
padding-left
:
10px
!important
;
padding-right
:
10px
!important
;
}
}
%body
{
style:
"background-color:#fafafa;margin:0;padding:0;text-align:center;min-width:640px;width:100%;height:100%;font-family:'Helvetica Neue',Helvetica,Arial,sans-serif;"
}
%table
#body
{
border:
"0"
,
cellpadding:
"0"
,
cellspacing:
"0"
,
style:
"background-color:#fafafa;margin:0;padding:0;text-align:center;min-width:640px;width:100%;"
}
%tbody
%tr
.line
%td
{
style:
"font-family:'Helvetica Neue',Helvetica,Arial,sans-serif;background-color:#6b4fbb;height:4px;font-size:4px;line-height:4px;"
}
%tr
.header
%td
{
style:
"font-family:'Helvetica Neue',Helvetica,Arial,sans-serif;padding:25px 0;font-size:13px;line-height:1.6;color:#5c5c5c;"
}
%img
{
alt:
"GitLab"
,
height:
"50"
,
src:
image_url
(
'mailers/ci_pipeline_notif_v1/gitlab-logo.gif'
),
width:
"55"
}
/
%tr
%td
{
style:
"font-family:'Helvetica Neue',Helvetica,Arial,sans-serif;"
}
%table
.wrapper
{
border:
"0"
,
cellpadding:
"0"
,
cellspacing:
"0"
,
style:
"width:640px;margin:0 auto;border-collapse:separate;border-spacing:0;"
}
%tbody
%tr
%td
{
style:
"font-family:'Helvetica Neue',Helvetica,Arial,sans-serif;background-color:#ffffff;text-align:left;padding:18px 25px;border:1px solid #ededed;border-radius:3px;overflow:hidden;font-size:18px;"
}
Your CSV export of
#{
@issues_count
}
issues from project
%a
{
href:
project_url
(
@project
),
style:
"color:#3777b0;text-decoration:none;"
}
=
@project
.
full_name
has been added to this email as an attachment.
-
if
@truncated
%p
This attachment has been truncated due to exceeding the maximum attachment size. Consider re-exporting with a narrower selection of issues.
%tr
.footer
%td
{
style:
"font-family:'Helvetica Neue',Helvetica,Arial,sans-serif;padding:25px 0;font-size:13px;line-height:1.6;color:#5c5c5c;"
}
%img
{
alt:
"GitLab"
,
height:
"33"
,
src:
image_url
(
'mailers/ci_pipeline_notif_v1/gitlab-logo-full-horizontal.gif'
),
style:
"display:block;margin:0 auto 1em;"
,
width:
"90"
}
/
%div
%a
{
href:
profile_notifications_url
,
style:
"color:#3777b0;text-decoration:none;"
}
Manage all notifications
·
%a
{
href:
help_url
,
style:
"color:#3777b0;text-decoration:none;"
}
Help
%div
You're receiving this email because of your account on
=
succeed
"."
do
%a
{
href:
root_url
,
style:
"color:#3777b0;text-decoration:none;"
}=
Gitlab
.
config
.
gitlab
.
host
%span
{
style:
'font-size:18px;'
}
Your CSV export of
#{
@issues_count
}
issues from project
%a
{
href:
project_url
(
@project
),
style:
"color:#3777b0;text-decoration:none;"
}
=
@project
.
full_name
has been added to this email as an attachment.
-
if
@truncated
%p
This attachment has been truncated due to exceeding the maximum attachment size. Consider re-exporting with a narrower selection of issues.
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