##// END OF EJS Templates
sidebar: expose status indicator for general comments which changed review status.
marcink -
r4490:6bf75c53 default
parent child Browse files
Show More
@@ -145,7 +145,7 b' class PullRequestCommentEvent(PullReques'
145
145
146 status = None
146 status = None
147 if self.comment.status_change:
147 if self.comment.status_change:
148 status = self.comment.status_change[0].status
148 status = self.comment.review_status
149
149
150 data.update({
150 data.update({
151 'comment': {
151 'comment': {
@@ -184,7 +184,7 b' class PullRequestCommentEditEvent(PullRe'
184
184
185 status = None
185 status = None
186 if self.comment.status_change:
186 if self.comment.status_change:
187 status = self.comment.status_change[0].status
187 status = self.comment.review_status
188
188
189 data.update({
189 data.update({
190 'comment': {
190 'comment': {
@@ -3881,6 +3881,16 b' class ChangesetComment(Base, BaseModel):'
3881 return self.get_index_from_version(
3881 return self.get_index_from_version(
3882 self.pull_request_version_id, versions)
3882 self.pull_request_version_id, versions)
3883
3883
3884 @property
3885 def review_status(self):
3886 if self.status_change:
3887 return self.status_change[0].status
3888
3889 @property
3890 def review_status_lbl(self):
3891 if self.status_change:
3892 return self.status_change[0].status_lbl
3893
3884 def __repr__(self):
3894 def __repr__(self):
3885 if self.comment_id:
3895 if self.comment_id:
3886 return '<DB:Comment #%s>' % self.comment_id
3896 return '<DB:Comment #%s>' % self.comment_id
@@ -89,6 +89,7 b''
89 if is_pr:
89 if is_pr:
90 version_info = (' made in older version (v{})'.format(comment_ver_index) if is_from_old_ver == 'true' else ' made in this version')
90 version_info = (' made in older version (v{})'.format(comment_ver_index) if is_from_old_ver == 'true' else ' made in this version')
91 %>
91 %>
92
92 <script type="text/javascript">
93 <script type="text/javascript">
93 // closure function helper
94 // closure function helper
94 var sidebarComment${comment_obj.comment_id} = function() {
95 var sidebarComment${comment_obj.comment_id} = function() {
@@ -101,6 +102,7 b''
101 is_todo: ${h.json.dumps(comment_obj.is_todo)},
102 is_todo: ${h.json.dumps(comment_obj.is_todo)},
102 created_on: "${h.format_date(comment_obj.created_on)}",
103 created_on: "${h.format_date(comment_obj.created_on)}",
103 datetime: "${comment_obj.created_on}${h.get_timezone(comment_obj.created_on, time_is_local=True)}",
104 datetime: "${comment_obj.created_on}${h.get_timezone(comment_obj.created_on, time_is_local=True)}",
105 review_status: "${(comment_obj.review_status or '')}"
104 })
106 })
105 }
107 }
106 </script>
108 </script>
@@ -76,9 +76,9 b''
76 status_change_title = 'Status of review for commit {}'.format(h.short_id(comment.commit_id))
76 status_change_title = 'Status of review for commit {}'.format(h.short_id(comment.commit_id))
77 %>
77 %>
78
78
79 <i class="icon-circle review-status-${comment.status_change[0].status}"></i>
79 <i class="icon-circle review-status-${comment.review_status}"></i>
80 <div class="changeset-status-lbl tooltip" title="${status_change_title}">
80 <div class="changeset-status-lbl tooltip" title="${status_change_title}">
81 ${comment.status_change[0].status_lbl}
81 ${comment.review_status_lbl}
82 </div>
82 </div>
83 % else:
83 % else:
84 <div>
84 <div>
@@ -196,6 +196,9 b' if (show_disabled) {'
196 <br/>
196 <br/>
197 File: <code><%- file_name -%></code>
197 File: <code><%- file_name -%></code>
198 <% } else { %>
198 <% } else { %>
199 <% if (review_status) { %>
200 <i class="icon-circle review-status-<%= review_status %>"></i>
201 <% } %>
199 <strong>General</strong> TODO
202 <strong>General</strong> TODO
200 <% if (version_info) { %>
203 <% if (version_info) { %>
201 <%= version_info %>
204 <%= version_info %>
@@ -210,6 +213,9 b' if (show_disabled) {'
210 <br/>
213 <br/>
211 File: <code><%- file_name -%></code>
214 File: <code><%- file_name -%></code>
212 <% } else { %>
215 <% } else { %>
216 <% if (review_status) { %>
217 <i class="icon-circle review-status-<%= review_status %>"></i>
218 <% } %>
213 <strong>General</strong> comment
219 <strong>General</strong> comment
214 <% if (version_info) { %>
220 <% if (version_info) { %>
215 <%= version_info %>
221 <%= version_info %>
General Comments 0
You need to be logged in to leave comments. Login now