##// 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 146 status = None
147 147 if self.comment.status_change:
148 status = self.comment.status_change[0].status
148 status = self.comment.review_status
149 149
150 150 data.update({
151 151 'comment': {
@@ -184,7 +184,7 b' class PullRequestCommentEditEvent(PullRe'
184 184
185 185 status = None
186 186 if self.comment.status_change:
187 status = self.comment.status_change[0].status
187 status = self.comment.review_status
188 188
189 189 data.update({
190 190 'comment': {
@@ -3881,6 +3881,16 b' class ChangesetComment(Base, BaseModel):'
3881 3881 return self.get_index_from_version(
3882 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 3894 def __repr__(self):
3885 3895 if self.comment_id:
3886 3896 return '<DB:Comment #%s>' % self.comment_id
@@ -89,6 +89,7 b''
89 89 if is_pr:
90 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 93 <script type="text/javascript">
93 94 // closure function helper
94 95 var sidebarComment${comment_obj.comment_id} = function() {
@@ -101,6 +102,7 b''
101 102 is_todo: ${h.json.dumps(comment_obj.is_todo)},
102 103 created_on: "${h.format_date(comment_obj.created_on)}",
103 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 108 </script>
@@ -76,9 +76,9 b''
76 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 80 <div class="changeset-status-lbl tooltip" title="${status_change_title}">
81 ${comment.status_change[0].status_lbl}
81 ${comment.review_status_lbl}
82 82 </div>
83 83 % else:
84 84 <div>
@@ -196,6 +196,9 b' if (show_disabled) {'
196 196 <br/>
197 197 File: <code><%- file_name -%></code>
198 198 <% } else { %>
199 <% if (review_status) { %>
200 <i class="icon-circle review-status-<%= review_status %>"></i>
201 <% } %>
199 202 <strong>General</strong> TODO
200 203 <% if (version_info) { %>
201 204 <%= version_info %>
@@ -210,6 +213,9 b' if (show_disabled) {'
210 213 <br/>
211 214 File: <code><%- file_name -%></code>
212 215 <% } else { %>
216 <% if (review_status) { %>
217 <i class="icon-circle review-status-<%= review_status %>"></i>
218 <% } %>
213 219 <strong>General</strong> comment
214 220 <% if (version_info) { %>
215 221 <%= version_info %>
General Comments 0
You need to be logged in to leave comments. Login now