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
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Tatuya Kamada
gitlab-ce
Commits
08eac512
Commit
08eac512
authored
Mar 31, 2015
by
Douwe Maan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Move EmailsOnPush highlight CSS inline instead of being in every notification email.
parent
33a8f53f
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
3 additions
and
9 deletions
+3
-9
app/helpers/emails_helper.rb
app/helpers/emails_helper.rb
+1
-5
app/views/layouts/notify.html.haml
app/views/layouts/notify.html.haml
+1
-2
app/views/notify/repository_push_email.html.haml
app/views/notify/repository_push_email.html.haml
+1
-2
No files found.
app/helpers/emails_helper.rb
View file @
08eac512
...
...
@@ -33,12 +33,8 @@ module EmailsHelper
end
end
def
add_email_highlight_css
Rugments
::
Themes
::
Github
.
render
(
scope:
'.highlight'
)
end
def
color_email_diff
(
diffcontent
)
formatter
=
Rugments
::
Formatters
::
HTML
.
new
(
cssclass:
'highlight'
)
formatter
=
Rugments
::
Formatters
::
HTML
.
new
(
cssclass:
"highlight"
,
inline_theme: :github
)
lexer
=
Rugments
::
Lexers
::
Diff
.
new
raw
formatter
.
format
(
lexer
.
lex
(
diffcontent
))
end
...
...
app/views/layouts/notify.html.haml
View file @
08eac512
...
...
@@ -27,8 +27,7 @@
}
.file-stats
.deleted-file
{
color
:
#B00
;
}
#{
add_email_highlight_css
}
}
}
%body
%div
.content
=
yield
...
...
app/views/notify/repository_push_email.html.haml
View file @
08eac512
...
...
@@ -59,8 +59,7 @@
%strong
=
diff
.
new_path
%hr
%pre
=
color_email_diff
(
diff
.
diff
)
=
color_email_diff
(
diff
.
diff
)
%br
-
if
@compare
.
timeout
...
...
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