notifications/emails: improve notification display and rendered emails structure
This commit is contained in:
parent
9c9406e94c
commit
45de0aae6c
6 changed files with 33 additions and 36 deletions
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -13,10 +13,10 @@
|
|||
<div id="notification_${notification.notification.notification_id}" class="container ${'unread' if not notification.read else '' }">
|
||||
<div class="notification-header">
|
||||
<div class="desc ${'unread' if not notification.read else '' }">
|
||||
<a href="${h.route_path('notifications_show', notification_id=notification.notification.notification_id)}">
|
||||
${base.gravatar(notification.notification.created_by_user.email, 16)}
|
||||
${h.notification_description(notification.notification, request)}
|
||||
</a>
|
||||
<a href="${h.route_path('notifications_show', notification_id=notification.notification.notification_id)}">
|
||||
${h.notification_description(notification.notification, request)}
|
||||
</a>
|
||||
</div>
|
||||
<div class="delete-notifications">
|
||||
<span onclick="deleteNotification(${notification.notification.notification_id})" class="delete-notification tooltip" title="${_('Delete')}"><i class="icon-delete"></i></span>
|
||||
|
|
|
|||
|
|
@ -27,8 +27,10 @@
|
|||
<div class="table">
|
||||
<div id="notification_${c.notification.notification_id}" class="main-content-full">
|
||||
<div class="notification-header">
|
||||
<div class="pull-left">
|
||||
${self.gravatar(c.notification.created_by_user.email, 30)}
|
||||
<div class="desc">
|
||||
</div>
|
||||
<div class="desc pull-left">
|
||||
${h.notification_description(c.notification, request)}
|
||||
</div>
|
||||
<div class="delete-notifications">
|
||||
|
|
|
|||
|
|
@ -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}
|
||||
|
|
|
|||
|
|
@ -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 @@ ${h.literal(_('Pull request !{pr_id}: `{pr_title}`').format(**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 = {
|
|||
</td>
|
||||
</tr>
|
||||
% endif
|
||||
<tr>
|
||||
<td style="padding-right:20px;">${_('Pull request')}:</td>
|
||||
<td>
|
||||
<a href="${pull_request_url}" style="${base.link_css()}">
|
||||
!${pull_request.pull_request_id}
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td style="padding-right:20px;line-height:20px;">${_('Commit Flow')}:</td>
|
||||
|
|
@ -164,14 +172,7 @@ data = {
|
|||
${base.tag_button('{}:{}'.format(data['target_ref_type'], pull_request.target_ref_parts.name))} ${_('of')} ${data['target_repo_url']}
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="padding-right:20px;">${_('Pull request')}:</td>
|
||||
<td>
|
||||
<a href="${pull_request_url}" style="${base.link_css()}">
|
||||
!${pull_request.pull_request_id}
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
% if comment_file:
|
||||
<tr>
|
||||
<td style="padding-right:20px;">${_('File')}:</td>
|
||||
|
|
|
|||
|
|
@ -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')}:
|
||||
|
|
@ -103,6 +101,15 @@ data = {
|
|||
<td></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td style="padding-right:20px;">${_('Pull request')}:</td>
|
||||
<td>
|
||||
<a href="${pull_request_url}" style="${base.link_css()}">
|
||||
!${pull_request.pull_request_id}
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td style="padding-right:20px;line-height:20px;">${_('Commit Flow')}:</td>
|
||||
<td style="line-height:20px;">
|
||||
|
|
@ -112,14 +119,6 @@ data = {
|
|||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td style="padding-right:20px;">${_('Pull request')}:</td>
|
||||
<td>
|
||||
<a href="${pull_request_url}" style="${base.link_css()}">
|
||||
!${pull_request.pull_request_id}
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="padding-right:20px;">${_('Description')}:</td>
|
||||
<td style="white-space:pre-wrap"><code>${pull_request.description | trim}</code></td>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue