# HG changeset patch # User Daniel Dourvaris # Date 2019-11-13 00:44:55 # Node ID fcea43e6f9150316a5099605aa0660fa5cd1ddc9 # Parent 8cc1e58415587f85c47ec59066536b0b62c46fc2 notifications/emails: improve notification display and rendered emails structure diff --git a/rhodecode/public/css/main.less b/rhodecode/public/css/main.less --- a/rhodecode/public/css/main.less +++ b/rhodecode/public/css/main.less @@ -852,7 +852,6 @@ label { .notification-list { div { - display: inline-block; vertical-align: middle; } @@ -1947,10 +1946,6 @@ BIN_FILENODE = 7 text-align: left; } - .desc{ - width: 1163px; - } - .delete-notifications, .read-notifications{ width: 35px; min-width: 35px; //fixes when only one button is displayed diff --git a/rhodecode/templates/admin/notifications/notifications_data.mako b/rhodecode/templates/admin/notifications/notifications_data.mako --- a/rhodecode/templates/admin/notifications/notifications_data.mako +++ b/rhodecode/templates/admin/notifications/notifications_data.mako @@ -13,10 +13,10 @@
diff --git a/rhodecode/templates/admin/notifications/notifications_show.mako b/rhodecode/templates/admin/notifications/notifications_show.mako --- a/rhodecode/templates/admin/notifications/notifications_show.mako +++ b/rhodecode/templates/admin/notifications/notifications_show.mako @@ -27,8 +27,10 @@
+
${self.gravatar(c.notification.created_by_user.email, 30)} -
+
+
${h.notification_description(c.notification, request)}
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 @@ -47,7 +47,7 @@ data = { } %> -* ${('Inline' if comment_file else 'General')} ${_('Comment link')}: ${commit_comment_url} +* ${_('Comment link')}: ${commit_comment_url} %if status_change: * ${_('Commit status')}: ${_('Status was changed to')}: *${status_change}* @@ -62,9 +62,9 @@ data = { %endif % if comment_type == 'todo': -${_('`TODO` comment')}: +${('Inline' if comment_file else 'General')} ${_('`TODO` number')} ${comment_id}: % else: -${_('`Note` comment')}: +${('Inline' if comment_file else 'General')} ${_('`Note` number')} ${comment_id}: % endif ${comment_body |n, trim} 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 @@ -57,12 +57,12 @@ data = { } %> -${h.literal(_('Pull request !{pr_id}: `{pr_title}`').format(**data))} +* ${_('Comment link')}: ${pr_comment_url} + +* ${_('Pull Request')}: !${pull_request.pull_request_id} * ${h.literal(_('Commit flow: {source_ref_type}:{source_ref_name} of {source_repo_url} into {target_ref_type}:{target_ref_name} of {target_repo_url}').format(**data))} -* ${('Inline' if comment_file else 'General')} ${_('Comment link')}: ${pr_comment_url} - %if status_change and not closing_pr: * ${_('{user} submitted pull request !{pr_id} status: *{status}*').format(**data)} @@ -75,9 +75,9 @@ data = { %endif % if comment_type == 'todo': -${_('`TODO` comment')}: +${('Inline' if comment_file else 'General')} ${_('`TODO` number')} ${comment_id}: % else: -${_('`Note` comment')}: +${('Inline' if comment_file else 'General')} ${_('`Note` number')} ${comment_id}: % endif ${comment_body |n, trim} @@ -155,6 +155,14 @@ data = { % endif + + ${_('Pull request')}: + + + !${pull_request.pull_request_id} + + + ${_('Commit Flow')}: @@ -164,14 +172,7 @@ data = { ${base.tag_button('{}:{}'.format(data['target_ref_type'], pull_request.target_ref_parts.name))} ${_('of')} ${data['target_repo_url']} - - ${_('Pull request')}: - - - !${pull_request.pull_request_id} - - - + % if comment_file: ${_('File')}: 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 @@ -34,12 +34,10 @@ data = { } %> -${h.literal(_('Pull request !{pr_id}: `{pr_title}`').format(**data))} +* ${_('Pull Request link')}: ${pull_request_url} * ${h.literal(_('Commit flow: {source_ref_type}:{source_ref_name} of {source_repo_url} into {target_ref_type}:{target_ref_name} of {target_repo_url}').format(**data))} -* ${_('Pull Request link')}: ${pull_request_url} - * ${_('Title')}: ${pull_request.title} * ${_('Description')}: @@ -104,6 +102,15 @@ data = { + ${_('Pull request')}: + + + !${pull_request.pull_request_id} + + + + + ${_('Commit Flow')}: ${base.tag_button('{}:{}'.format(data['source_ref_type'], pull_request.source_ref_parts.name))} ${_('of')} ${data['source_repo_url']} @@ -113,14 +120,6 @@ data = { - ${_('Pull request')}: - - - !${pull_request.pull_request_id} - - - - ${_('Description')}: ${pull_request.description | trim}