diff --git a/rhodecode/templates/email_templates/base.mako b/rhodecode/templates/email_templates/base.mako --- a/rhodecode/templates/email_templates/base.mako +++ b/rhodecode/templates/email_templates/base.mako @@ -3,15 +3,100 @@ ## headers we additionally can set for email <%def name="headers()" filter="n,trim">%def> -## plain text version of the email. Empty by default +<%def name="plaintext_footer()"> +${_('This is a notification from RhodeCode. %(instance_url)s') % {'instance_url': instance_url}} +%def> + <%def name="body_plaintext()" filter="n,trim">%def> -${self.body()} + + +
+ + +
+
|
+
+ ${self.plaintext_footer()} +
+ + diff --git a/rhodecode/templates/email_templates/commit_comment.mako b/rhodecode/templates/email_templates/commit_comment.mako --- a/rhodecode/templates/email_templates/commit_comment.mako +++ b/rhodecode/templates/email_templates/commit_comment.mako @@ -2,7 +2,7 @@ <%inherit file="base.mako"/> <%def name="subject()" filter="n,trim"> - ${_('[mention]') if mention else ''} ${_('%(user)s commented on commit of %(repo_name)s') % { +${_('[mention]') if mention else ''} ${_('%(user)s commented on a commit of %(repo_name)s') % { 'user': h.person(user), 'repo_name': repo_name } } @@ -28,30 +28,21 @@ ${_('Commit status was changed to')}: *${status_change}* %endif +${self.plaintext_footer()} %def> - +
% if comment_file:
-
% else:
- | |
${_('Commit')} | ${h.show_id(commit)} |
${_('Description')} | ${h.urlify_commit_message(commit.message, repo_name)} |
${_('Status')} | ${_('The commit status was changed to')} ${status_change}. |
${_('Comment')} | ${h.render(comment_body, renderer=renderer_type, mentions=True)} |
${body} |
+Hello ${user.username}, +
+There was a request to reset your password using the email address ${email} on ${h.format_date(date)}
+
+If you did not request a password reset, please contact your RhodeCode administrator.
+
+${_('Generate new password here.') % {'url': password_reset_url} |n} +
\ No newline at end of file diff --git a/rhodecode/templates/email_templates/password_reset_confirmation.mako b/rhodecode/templates/email_templates/password_reset_confirmation.mako --- a/rhodecode/templates/email_templates/password_reset_confirmation.mako +++ b/rhodecode/templates/email_templates/password_reset_confirmation.mako @@ -9,14 +9,22 @@ Your new RhodeCode password <%def name="body_plaintext()" filter="n,trim"> Hi ${user.username}, -Below is your new access password for RhodeCode. +There was a request to reset your password using the email address ${email} on ${h.format_date(date)} + +*If you didn't do this, please contact your RhodeCode administrator.* -password: ${new_password} +You can continue, and generate new password by clicking following URL: +${password_reset_url} -*If you didn't request a new password, please contact your RhodeCode administrator immediately.* +${self.plaintext_footer()} %def> ## BODY GOES BELOW -+Hello ${user.username}, +
+Below is your new access password for RhodeCode.
+
+If you didn't request a new password, please contact your RhodeCode administrator.
+
password:
\ No newline at end of file diff --git a/rhodecode/templates/email_templates/pull_request_comment.mako b/rhodecode/templates/email_templates/pull_request_comment.mako --- a/rhodecode/templates/email_templates/pull_request_comment.mako +++ b/rhodecode/templates/email_templates/pull_request_comment.mako @@ -2,11 +2,11 @@ <%inherit file="base.mako"/> <%def name="subject()" filter="n,trim"> - ${_('[mention]') if mention else ''} ${_('%(user)s commented on pull request #%(pr_id)s: "%(pr_title)s"') % { - 'user': h.person(user), - 'pr_title': pull_request.title, - 'pr_id': pull_request.pull_request_id - } |n} +${_('[mention]') if mention else ''} ${_('%(user)s commented on pull request #%(pr_id)s: "%(pr_title)s"') % { + 'user': h.person(user), + 'pr_title': pull_request.title, + 'pr_id': pull_request.pull_request_id + } |n} %def> <%def name="body_plaintext()" filter="n,trim"> @@ -31,36 +31,30 @@ ${_('Pull request was closed with status')}: *${status_change}* %endif +${self.plaintext_footer()} %def> +${h.render(comment_body, renderer=renderer_type, mentions=True)}
-${_('Pull request status was changed to')}: ${status_change}
-%elif status_change and closing_pr: -${_('Pull request was closed with status')}: ${status_change}
-%endif diff --git a/rhodecode/templates/email_templates/pull_request_review.mako b/rhodecode/templates/email_templates/pull_request_review.mako --- a/rhodecode/templates/email_templates/pull_request_review.mako +++ b/rhodecode/templates/email_templates/pull_request_review.mako @@ -29,53 +29,33 @@ * ${_('Description')}: - ${pull_request.description} +${pull_request.description} * ${ungettext('Commit (%(num)s)', 'Commits (%(num)s)', len(pull_request_commits) ) % {'num': len(pull_request_commits)}}: % for commit_id, message in pull_request_commits: - ${h.short_id(commit_id)} + ${h.chop_at_smart(message, '\n', suffix_if_chopped='...')} - ${h.chop_at_smart(message, '\n', suffix_if_chopped='...')} % endfor +${self.plaintext_footer()} %def> - -${h.literal(_('Pull request from %(source_ref_type)s:%(source_ref_name)s of %(repo_url)s into %(target_ref_type)s:%(target_ref_name)s') % { - 'source_ref_type': pull_request.source_ref_parts.type, - 'source_ref_name': pull_request.source_ref_parts.name, - 'target_ref_type': pull_request.target_ref_parts.type, - 'target_ref_name': pull_request.target_ref_parts.name, - 'repo_url': h.link_to(pull_request_source_repo.repo_name, pull_request_source_repo_url) - })} -
- -${_('Link')}: ${h.link_to(pull_request_url, pull_request_url)}
- -${_('Title')}: ${pull_request.title}
-
- ${_('Description')}:
- ${pull_request.description}
-
- ${ungettext('Commit (%(num)s)', 'Commits (%(num)s)', len(pull_request_commits) ) % {'num': len(pull_request_commits)}}: -
${h.short_id(commit_id)}- ${h.chop_at_smart(message, '\n', suffix_if_chopped='...')} -
${_('%(user)s wants you to review pull request #%(pr_id)s: "%(pr_title)s".') % { 'user': h.person(user), 'pr_title': pull_request.title, 'pr_id': pull_request.pull_request_id } } | |
${_('Title')} | ${pull_request.title} |
${_('Source')} | ${h.literal(_('%(source_ref_name)s%(source_ref_type)s of %(source_repo_url)s') % {'source_ref_type': pull_request.source_ref_parts.type,'source_ref_name': pull_request.source_ref_parts.name,'source_repo_url': h.link_to(pull_request_source_repo.repo_name, pull_request_source_repo_url)})} |
${_('Target')} | ${h.literal(_('%(target_ref_name)s%(target_ref_type)s of %(target_repo_url)s') % {'target_ref_type': pull_request.target_ref_parts.type,'target_ref_name': pull_request.target_ref_parts.name,'target_repo_url': h.link_to(pull_request_target_repo.repo_name, pull_request_target_repo_url)})} |
${_('Description')} | ${pull_request.description} |
${ungettext('%(num)s Commit', '%(num)s Commits', len(pull_request_commits)) % {'num': len(pull_request_commits)}} | +
|
+
${_('New user %(user)s has registered on %(date)s') % {'user': user.username, 'date': h.format_date(date)}} | |
${_('Username')} | ${user.username} |
${_('Full Name')} | ${user.firstname} ${user.lastname} |
${_('Email')} | ${user.email} |
${_('Profile')} | ${h.url('user_profile', username=user.username, qualified=True)} |