##// END OF EJS Templates
notifications/emails: improve notification display and rendered emails structure
dan -
r4060:fcea43e6 default
parent child Browse files
Show More
@@ -852,7 +852,6 b' label {'
852 .notification-list {
852 .notification-list {
853
853
854 div {
854 div {
855 display: inline-block;
856 vertical-align: middle;
855 vertical-align: middle;
857 }
856 }
858
857
@@ -1947,10 +1946,6 b' BIN_FILENODE = 7'
1947 text-align: left;
1946 text-align: left;
1948 }
1947 }
1949
1948
1950 .desc{
1951 width: 1163px;
1952 }
1953
1954 .delete-notifications, .read-notifications{
1949 .delete-notifications, .read-notifications{
1955 width: 35px;
1950 width: 35px;
1956 min-width: 35px; //fixes when only one button is displayed
1951 min-width: 35px; //fixes when only one button is displayed
@@ -13,10 +13,10 b''
13 <div id="notification_${notification.notification.notification_id}" class="container ${'unread' if not notification.read else '' }">
13 <div id="notification_${notification.notification.notification_id}" class="container ${'unread' if not notification.read else '' }">
14 <div class="notification-header">
14 <div class="notification-header">
15 <div class="desc ${'unread' if not notification.read else '' }">
15 <div class="desc ${'unread' if not notification.read else '' }">
16 <a href="${h.route_path('notifications_show', notification_id=notification.notification.notification_id)}">
17 ${base.gravatar(notification.notification.created_by_user.email, 16)}
16 ${base.gravatar(notification.notification.created_by_user.email, 16)}
18 ${h.notification_description(notification.notification, request)}
17 <a href="${h.route_path('notifications_show', notification_id=notification.notification.notification_id)}">
19 </a>
18 ${h.notification_description(notification.notification, request)}
19 </a>
20 </div>
20 </div>
21 <div class="delete-notifications">
21 <div class="delete-notifications">
22 <span onclick="deleteNotification(${notification.notification.notification_id})" class="delete-notification tooltip" title="${_('Delete')}"><i class="icon-delete"></i></span>
22 <span onclick="deleteNotification(${notification.notification.notification_id})" class="delete-notification tooltip" title="${_('Delete')}"><i class="icon-delete"></i></span>
@@ -27,8 +27,10 b''
27 <div class="table">
27 <div class="table">
28 <div id="notification_${c.notification.notification_id}" class="main-content-full">
28 <div id="notification_${c.notification.notification_id}" class="main-content-full">
29 <div class="notification-header">
29 <div class="notification-header">
30 <div class="pull-left">
30 ${self.gravatar(c.notification.created_by_user.email, 30)}
31 ${self.gravatar(c.notification.created_by_user.email, 30)}
31 <div class="desc">
32 </div>
33 <div class="desc pull-left">
32 ${h.notification_description(c.notification, request)}
34 ${h.notification_description(c.notification, request)}
33 </div>
35 </div>
34 <div class="delete-notifications">
36 <div class="delete-notifications">
@@ -47,7 +47,7 b' data = {'
47 }
47 }
48 %>
48 %>
49
49
50 * ${('Inline' if comment_file else 'General')} ${_('Comment link')}: ${commit_comment_url}
50 * ${_('Comment link')}: ${commit_comment_url}
51
51
52 %if status_change:
52 %if status_change:
53 * ${_('Commit status')}: ${_('Status was changed to')}: *${status_change}*
53 * ${_('Commit status')}: ${_('Status was changed to')}: *${status_change}*
@@ -62,9 +62,9 b' data = {'
62
62
63 %endif
63 %endif
64 % if comment_type == 'todo':
64 % if comment_type == 'todo':
65 ${_('`TODO` comment')}:
65 ${('Inline' if comment_file else 'General')} ${_('`TODO` number')} ${comment_id}:
66 % else:
66 % else:
67 ${_('`Note` comment')}:
67 ${('Inline' if comment_file else 'General')} ${_('`Note` number')} ${comment_id}:
68 % endif
68 % endif
69
69
70 ${comment_body |n, trim}
70 ${comment_body |n, trim}
@@ -57,12 +57,12 b' data = {'
57 }
57 }
58 %>
58 %>
59
59
60 ${h.literal(_('Pull request !{pr_id}: `{pr_title}`').format(**data))}
60 * ${_('Comment link')}: ${pr_comment_url}
61
62 * ${_('Pull Request')}: !${pull_request.pull_request_id}
61
63
62 * ${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))}
64 * ${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))}
63
65
64 * ${('Inline' if comment_file else 'General')} ${_('Comment link')}: ${pr_comment_url}
65
66 %if status_change and not closing_pr:
66 %if status_change and not closing_pr:
67 * ${_('{user} submitted pull request !{pr_id} status: *{status}*').format(**data)}
67 * ${_('{user} submitted pull request !{pr_id} status: *{status}*').format(**data)}
68
68
@@ -75,9 +75,9 b' data = {'
75
75
76 %endif
76 %endif
77 % if comment_type == 'todo':
77 % if comment_type == 'todo':
78 ${_('`TODO` comment')}:
78 ${('Inline' if comment_file else 'General')} ${_('`TODO` number')} ${comment_id}:
79 % else:
79 % else:
80 ${_('`Note` comment')}:
80 ${('Inline' if comment_file else 'General')} ${_('`Note` number')} ${comment_id}:
81 % endif
81 % endif
82
82
83 ${comment_body |n, trim}
83 ${comment_body |n, trim}
@@ -155,6 +155,14 b' data = {'
155 </td>
155 </td>
156 </tr>
156 </tr>
157 % endif
157 % endif
158 <tr>
159 <td style="padding-right:20px;">${_('Pull request')}:</td>
160 <td>
161 <a href="${pull_request_url}" style="${base.link_css()}">
162 !${pull_request.pull_request_id}
163 </a>
164 </td>
165 </tr>
158
166
159 <tr>
167 <tr>
160 <td style="padding-right:20px;line-height:20px;">${_('Commit Flow')}:</td>
168 <td style="padding-right:20px;line-height:20px;">${_('Commit Flow')}:</td>
@@ -164,14 +172,7 b' data = {'
164 ${base.tag_button('{}:{}'.format(data['target_ref_type'], pull_request.target_ref_parts.name))} ${_('of')} ${data['target_repo_url']}
172 ${base.tag_button('{}:{}'.format(data['target_ref_type'], pull_request.target_ref_parts.name))} ${_('of')} ${data['target_repo_url']}
165 </td>
173 </td>
166 </tr>
174 </tr>
167 <tr>
175
168 <td style="padding-right:20px;">${_('Pull request')}:</td>
169 <td>
170 <a href="${pull_request_url}" style="${base.link_css()}">
171 !${pull_request.pull_request_id}
172 </a>
173 </td>
174 </tr>
175 % if comment_file:
176 % if comment_file:
176 <tr>
177 <tr>
177 <td style="padding-right:20px;">${_('File')}:</td>
178 <td style="padding-right:20px;">${_('File')}:</td>
@@ -34,12 +34,10 b' data = {'
34 }
34 }
35 %>
35 %>
36
36
37 ${h.literal(_('Pull request !{pr_id}: `{pr_title}`').format(**data))}
37 * ${_('Pull Request link')}: ${pull_request_url}
38
38
39 * ${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))}
39 * ${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))}
40
40
41 * ${_('Pull Request link')}: ${pull_request_url}
42
43 * ${_('Title')}: ${pull_request.title}
41 * ${_('Title')}: ${pull_request.title}
44
42
45 * ${_('Description')}:
43 * ${_('Description')}:
@@ -104,6 +102,15 b' data = {'
104 </tr>
102 </tr>
105
103
106 <tr>
104 <tr>
105 <td style="padding-right:20px;">${_('Pull request')}:</td>
106 <td>
107 <a href="${pull_request_url}" style="${base.link_css()}">
108 !${pull_request.pull_request_id}
109 </a>
110 </td>
111 </tr>
112
113 <tr>
107 <td style="padding-right:20px;line-height:20px;">${_('Commit Flow')}:</td>
114 <td style="padding-right:20px;line-height:20px;">${_('Commit Flow')}:</td>
108 <td style="line-height:20px;">
115 <td style="line-height:20px;">
109 ${base.tag_button('{}:{}'.format(data['source_ref_type'], pull_request.source_ref_parts.name))} ${_('of')} ${data['source_repo_url']}
116 ${base.tag_button('{}:{}'.format(data['source_ref_type'], pull_request.source_ref_parts.name))} ${_('of')} ${data['source_repo_url']}
@@ -113,14 +120,6 b' data = {'
113 </tr>
120 </tr>
114
121
115 <tr>
122 <tr>
116 <td style="padding-right:20px;">${_('Pull request')}:</td>
117 <td>
118 <a href="${pull_request_url}" style="${base.link_css()}">
119 !${pull_request.pull_request_id}
120 </a>
121 </td>
122 </tr>
123 <tr>
124 <td style="padding-right:20px;">${_('Description')}:</td>
123 <td style="padding-right:20px;">${_('Description')}:</td>
125 <td style="white-space:pre-wrap"><code>${pull_request.description | trim}</code></td>
124 <td style="white-space:pre-wrap"><code>${pull_request.description | trim}</code></td>
126 </tr>
125 </tr>
General Comments 0
You need to be logged in to leave comments. Login now