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
3e346321
Commit
3e346321
authored
Mar 22, 2016
by
Robert Speicher
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
New confirmation email
🔥
parent
66ae3897
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
188 additions
and
2 deletions
+188
-2
app/assets/images/mailers/gitlab_header_logo.png
app/assets/images/mailers/gitlab_header_logo.png
+0
-0
app/assets/images/mailers/gitlab_tanuki_2x.png
app/assets/images/mailers/gitlab_tanuki_2x.png
+0
-0
app/assets/stylesheets/mailers/devise.scss
app/assets/stylesheets/mailers/devise.scss
+134
-0
app/mailers/devise_mailer.rb
app/mailers/devise_mailer.rb
+2
-0
app/views/devise/mailer/confirmation_instructions.html.haml
app/views/devise/mailer/confirmation_instructions.html.haml
+16
-0
app/views/layouts/devise_mailer.html.haml
app/views/layouts/devise_mailer.html.haml
+34
-0
config/application.rb
config/application.rb
+1
-1
spec/mailers/previews/devise_mailer_preview.rb
spec/mailers/previews/devise_mailer_preview.rb
+1
-1
No files found.
app/assets/images/mailers/gitlab_header_logo.png
0 → 100644
View file @
3e346321
6.93 KB
app/assets/images/mailers/gitlab_tanuki_2x.png
0 → 100644
View file @
3e346321
2.49 KB
app/assets/stylesheets/mailers/devise.scss
0 → 100644
View file @
3e346321
// NOTE: This stylesheet is for the exclusive use of the `devise_mailer` layout
// used for Devise email templates, and _should not_ be included in any
// application stylesheets.
//
// Styles defined here are embedded directly into the resulting email HTML via
// the `premailer` gem.
$body-background-color
:
#363636
;
$message-background-color
:
#fafafa
;
$header-color
:
#6b4fbb
;
$body-color
:
#444
;
$cta-color
:
#e14329
;
$footer-link-color
:
#7e7e7e
;
$font-family
:
Helvetica
,
Arial
,
sans-serif
;
body
{
background-color
:
$body-background-color
;
font-family
:
$font-family
;
margin
:
0
;
padding
:
0
;
}
table
{
-premailer-cellpadding
:
0
;
-premailer-cellspacing
:
0
;
border
:
0
;
border-collapse
:
separate
;
&
#wrapper
{
background-color
:
$body-background-color
;
width
:
100%
;
}
&
#header
{
margin
:
0
auto
;
text-align
:
left
;
width
:
600px
;
}
&
#body
{
background-color
:
$message-background-color
;
border
:
1px
solid
#000
;
border-radius
:
4px
;
margin
:
0
auto
;
width
:
600px
;
}
&
#footer
{
color
:
$footer-link-color
;
font-size
:
14px
;
text-align
:
center
;
width
:
100%
;
}
td
{
&
#body-container
{
padding
:
20px
40px
;
}
}
}
.center
{
text-align
:
center
;
}
#logo
{
border
:
none
;
outline
:
none
;
min-height
:
88px
;
width
:
134px
;
}
#content
{
h2
{
color
:
$header-color
;
font-size
:
30px
;
font-weight
:
400
;
line-height
:
34px
;
margin-top
:
0
;
}
p
{
color
:
$body-color
;
font-size
:
17px
;
line-height
:
24px
;
margin-bottom
:
0
;
}
}
#cta
{
border
:
1px
solid
$cta-color
;
border-radius
:
3px
;
display
:
inline-block
;
margin
:
20px
0
;
padding
:
12px
24px
;
a
{
background-color
:
$message-background-color
;
color
:
$cta-color
;
display
:
inline-block
;
text-decoration
:
none
;
}
}
#tanuki
{
padding
:
40px
0
0
;
img
{
border
:
none
;
outline
:
none
;
width
:
37px
;
min-height
:
36px
;
}
}
#tagline
{
font-size
:
22px
;
font-weight
:
100
;
padding
:
4px
0
40px
;
}
#social
{
padding
:
0
10px
20px
;
width
:
600px
;
word-spacing
:
20px
;
a
{
color
:
$footer-link-color
;
text-decoration
:
none
;
}
}
app/mailers/devise_mailer.rb
View file @
3e346321
class
DeviseMailer
<
Devise
::
Mailer
default
from:
"
#{
Gitlab
.
config
.
gitlab
.
email_display_name
}
<
#{
Gitlab
.
config
.
gitlab
.
email_from
}
>"
default
reply_to:
Gitlab
.
config
.
gitlab
.
email_reply_to
layout
'devise_mailer'
end
app/views/devise/mailer/confirmation_instructions.html.haml
0 → 100644
View file @
3e346321
.center
-
if
@resource
.
unconfirmed_email
.
present?
#content
%h2
=
@resource
.
unconfirmed_email
%p
Click the link below to confirm your email address.
#cta
=
link_to
'Confirm your email address'
,
confirmation_url
(
@resource
,
confirmation_token:
@token
)
-
else
#content
-
if
Gitlab
.
com?
%h2
Thanks for signing up to GitLab!
-
else
%h2
Welcome,
#{
@resource
.
name
}
!
%p
To get started, click the link below to confirm your account.
#cta
=
link_to
'Confirm your account'
,
confirmation_url
(
@resource
,
confirmation_token:
@token
)
app/views/layouts/devise_mailer.html.haml
0 → 100644
View file @
3e346321
!!! 5
%html
%head
%meta
(
content=
'text/html; charset=UTF-8'
http-equiv=
'Content-Type'
)
=
stylesheet_link_tag
'mailers/devise'
%body
%table
#wrapper
%tr
%td
%table
#header
%td
{
valign:
"top"
}
=
image_tag
(
'mailers/gitlab_header_logo.png'
,
id:
'logo'
,
alt:
'GitLab Wordmark'
)
%table
#body
%tr
%td
#body-container
=
yield
-
if
Gitlab
.
com?
%table
#footer
%tr
%td
#tanuki
=
image_tag
(
'mailers/gitlab_tanuki_2x.png'
,
alt:
'GitLab Logo'
)
%tr
%td
#tagline
Everyone can contribute
%tr
%td
#social
=
link_to
'Blog'
,
'https://about.gitlab.com/blog/'
=
link_to
'Twitter'
,
'https://twitter.com/gitlab'
=
link_to
'Facebook'
,
'https://www.facebook.com/gitlab/'
=
link_to
'YouTube'
,
'https://www.youtube.com/channel/UCnMGQ8QHMAnVIsI3xJrihhg'
=
link_to
'LinkedIn'
,
'https://www.linkedin.com/company/gitlab-com'
config/application.rb
View file @
3e346321
...
...
@@ -80,7 +80,7 @@ module Gitlab
config
.
assets
.
precompile
<<
"*.png"
config
.
assets
.
precompile
<<
"print.css"
config
.
assets
.
precompile
<<
"notify.css"
config
.
assets
.
precompile
<<
"mailers/
repository_push_email
.css"
config
.
assets
.
precompile
<<
"mailers/
*
.css"
# Version of your assets, change this if you want to expire all your assets
config
.
assets
.
version
=
'1.0'
...
...
spec/mailers/previews/devise_mailer_preview.rb
View file @
3e346321
class
DeviseMailerPreview
<
ActionMailer
::
Preview
def
confirmation_instructions_for_signup
user
=
User
.
new
(
email:
'signup@example.com'
)
user
=
User
.
new
(
name:
'Jane Doe'
,
email:
'signup@example.com'
)
DeviseMailer
.
confirmation_instructions
(
user
,
'faketoken'
,
{})
end
...
...
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