diff --git a/kallithea/model/notification.py b/kallithea/model/notification.py --- a/kallithea/model/notification.py +++ b/kallithea/model/notification.py @@ -326,5 +326,21 @@ class EmailNotificationModel(BaseModel): 'h': h, 'c': c} _kwargs.update(kwargs) + if content_type == 'html': + _kwargs.update({ + "color_text": "#202020", + "color_emph": "#395fa0", + "color_link": "#395fa0", + "color_border": "#ddd", + "color_background_grey": "#f9f9f9", + "color_button": "#395fa0", + "monospace_style": "font-family:Lucida Console,Consolas,Monaco,Inconsolata,Liberation Mono,monospace", + "sans_style": "font-family:Helvetica,Arial,sans-serif", + }) + _kwargs.update({ + "default_style": "%(sans_style)s;font-weight:200;font-size:14px;line-height:17px;color:%(color_text)s" % _kwargs, + "comment_style": "%(monospace_style)s;white-space:pre-wrap" % _kwargs, + }) + log.debug('rendering tmpl %s with kwargs %s', base, _kwargs) return email_template.render(**_kwargs) diff --git a/kallithea/templates/email_templates/button.html b/kallithea/templates/email_templates/button.html --- a/kallithea/templates/email_templates/button.html +++ b/kallithea/templates/email_templates/button.html @@ -1,8 +1,26 @@ <%page args="url,title='',padding_top=True,padding_bottom=True" />\ ## -
| + |
|
+
+ |
+
| + |
|
<%include file="comment.html" args="text=body,author=cs_comment_user,status=status_change"/>\
- + |
+
| + |
|
+
${_('Changeset on')}
- ${cs_target_repo}
+ ${cs_target_repo}
${_('branch')}
- ${branch}:
-
+ - "${h.shorter(message, 60, firstline=True)}" + ${branch}: +
+ "${h.shorter(message, 60, firstline=True)}"
${_('by')}
- ${cs_author.full_name_and_username}.
-
+ ${cs_author.full_name_and_username}.
+
+ |
+
| <%include file="button.html" args="url=cs_comment_url,title=_('View Comment'),padding_bottom=False"/>\ + | +
| + | ||
| + | %if link is not None: - ${title} %else: - ${title} + ${title} %endif - + | ++ |
| + | ||
| + |
+
|
+ + | |||||||||||||||