Show More
@@ -61,8 +61,8 b' def _load_changelog_summary():' | |||
|
61 | 61 | items_per_page=size, |
|
62 | 62 | url=url_generator) |
|
63 | 63 | page_revisions = [x.raw_id for x in list(c.repo_changesets)] |
|
64 | c.comments = c.db_repo.get_comments(page_revisions) | |
|
65 | c.statuses = c.db_repo.statuses(page_revisions) | |
|
64 | c.cs_comments = c.db_repo.get_comments(page_revisions) | |
|
65 | c.cs_statuses = c.db_repo.statuses(page_revisions) | |
|
66 | 66 | |
|
67 | 67 | |
|
68 | 68 | class ChangelogController(BaseRepoController): |
@@ -150,8 +150,8 b' class ChangelogController(BaseRepoContro' | |||
|
150 | 150 | items_per_page=c.size, branch=branch_name,) |
|
151 | 151 | |
|
152 | 152 | page_revisions = [x.raw_id for x in c.pagination] |
|
153 | c.comments = c.db_repo.get_comments(page_revisions) | |
|
154 | c.statuses = c.db_repo.statuses(page_revisions) | |
|
153 | c.cs_comments = c.db_repo.get_comments(page_revisions) | |
|
154 | c.cs_statuses = c.db_repo.statuses(page_revisions) | |
|
155 | 155 | except EmptyRepositoryError as e: |
|
156 | 156 | h.flash(safe_str(e), category='warning') |
|
157 | 157 | raise HTTPFound(location=url('summary_home', repo_name=c.repo_name)) |
@@ -223,7 +223,7 b' class CompareController(BaseRepoControll' | |||
|
223 | 223 | c.cs_repo.scm_instance, c.cs_rev) |
|
224 | 224 | raw_ids = [x.raw_id for x in c.cs_ranges] |
|
225 | 225 | c.cs_comments = c.cs_repo.get_comments(raw_ids) |
|
226 | c.statuses = c.cs_repo.statuses(raw_ids) | |
|
226 | c.cs_statuses = c.cs_repo.statuses(raw_ids) | |
|
227 | 227 | |
|
228 | 228 | revs = [ctx.revision for ctx in reversed(c.cs_ranges)] |
|
229 | 229 | c.jsdata = graph_data(c.cs_repo.scm_instance, revs) |
@@ -578,7 +578,7 b' class PullrequestsController(BaseRepoCon' | |||
|
578 | 578 | |
|
579 | 579 | raw_ids = [x.raw_id for x in c.cs_ranges] |
|
580 | 580 | c.cs_comments = c.cs_repo.get_comments(raw_ids) |
|
581 | c.statuses = c.cs_repo.statuses(raw_ids) | |
|
581 | c.cs_statuses = c.cs_repo.statuses(raw_ids) | |
|
582 | 582 | |
|
583 | 583 | ignore_whitespace = request.GET.get('ignorews') == '1' |
|
584 | 584 | line_context = safe_int(request.GET.get('context'), 3) |
@@ -628,8 +628,7 b' class PullrequestsController(BaseRepoCon' | |||
|
628 | 628 | for comments in lines.values(): |
|
629 | 629 | c.inline_cnt += len(comments) |
|
630 | 630 | # comments |
|
631 | c.comments = cc_model.get_comments(c.db_repo.repo_id, | |
|
632 | pull_request=pull_request_id) | |
|
631 | c.comments = cc_model.get_comments(c.db_repo.repo_id, pull_request=pull_request_id) | |
|
633 | 632 | |
|
634 | 633 | # (badly named) pull-request status calculation based on reviewer votes |
|
635 | 634 | (c.pull_request_reviewers, |
@@ -81,15 +81,15 b'' | |||
|
81 | 81 | %endif |
|
82 | 82 | </td> |
|
83 | 83 | <td class="status"> |
|
84 | %if c.statuses.get(cs.raw_id): | |
|
85 | %if c.statuses.get(cs.raw_id)[2]: | |
|
86 | <a data-toggle="tooltip" title="${_('Changeset status: %s by %s\nClick to open associated pull request %s') % (c.statuses.get(cs.raw_id)[1], c.statuses.get(cs.raw_id)[5].username, c.statuses.get(cs.raw_id)[4])}" href="${h.url('pullrequest_show',repo_name=c.statuses.get(cs.raw_id)[3],pull_request_id=c.statuses.get(cs.raw_id)[2])}"> | |
|
87 | <i class="icon-circle changeset-status-${c.statuses.get(cs.raw_id)[0]}"></i> | |
|
84 | %if c.cs_statuses.get(cs.raw_id): | |
|
85 | %if c.cs_statuses.get(cs.raw_id)[2]: | |
|
86 | <a data-toggle="tooltip" title="${_('Changeset status: %s by %s\nClick to open associated pull request %s') % (c.cs_statuses.get(cs.raw_id)[1], c.cs_statuses.get(cs.raw_id)[5].username, c.cs_statuses.get(cs.raw_id)[4])}" href="${h.url('pullrequest_show',repo_name=c.cs_statuses.get(cs.raw_id)[3],pull_request_id=c.cs_statuses.get(cs.raw_id)[2])}"> | |
|
87 | <i class="icon-circle changeset-status-${c.cs_statuses.get(cs.raw_id)[0]}"></i> | |
|
88 | 88 | </a> |
|
89 | 89 | %else: |
|
90 | <a data-toggle="tooltip" title="${_('Changeset status: %s by %s') % (c.statuses.get(cs.raw_id)[1], c.statuses.get(cs.raw_id)[5].username)}" | |
|
91 | href="${c.comments[cs.raw_id][0].url()}"> | |
|
92 | <i class="icon-circle changeset-status-${c.statuses.get(cs.raw_id)[0]}"></i> | |
|
90 | <a data-toggle="tooltip" title="${_('Changeset status: %s by %s') % (c.cs_statuses.get(cs.raw_id)[1], c.cs_statuses.get(cs.raw_id)[5].username)}" | |
|
91 | href="${c.cs_comments[cs.raw_id][0].url()}"> | |
|
92 | <i class="icon-circle changeset-status-${c.cs_statuses.get(cs.raw_id)[0]}"></i> | |
|
93 | 93 | </a> |
|
94 | 94 | %endif |
|
95 | 95 | %endif |
@@ -121,9 +121,9 b'' | |||
|
121 | 121 | %endif |
|
122 | 122 | </div> |
|
123 | 123 | <div class="extra-container"> |
|
124 | %if c.comments.get(cs.raw_id): | |
|
125 | <a class="comments-container comments-cnt" href="${c.comments[cs.raw_id][0].url()}" data-toggle="tooltip" title="${_('%s comments') % len(c.comments[cs.raw_id])}"> | |
|
126 | ${len(c.comments[cs.raw_id])} | |
|
124 | %if c.cs_comments.get(cs.raw_id): | |
|
125 | <a class="comments-container comments-cnt" href="${c.cs_comments[cs.raw_id][0].url()}" data-toggle="tooltip" title="${_('%s comments') % len(c.cs_comments[cs.raw_id])}"> | |
|
126 | ${len(c.cs_comments[cs.raw_id])} | |
|
127 | 127 | <i class="icon-comment-discussion"></i> |
|
128 | 128 | </a> |
|
129 | 129 | %endif |
@@ -13,25 +13,25 b'' | |||
|
13 | 13 | %for cnt,cs in enumerate(c.repo_changesets): |
|
14 | 14 | <tr class="parity${cnt%2} ${'mergerow' if len(cs.parents) > 1 else ''}"> |
|
15 | 15 | <td class="compact"> |
|
16 | %if c.statuses.get(cs.raw_id): | |
|
17 | %if c.statuses.get(cs.raw_id)[2]: | |
|
18 | <a data-toggle="tooltip" title="${_('Changeset status: %s by %s\nClick to open associated pull request %s') % (c.statuses.get(cs.raw_id)[1], c.statuses.get(cs.raw_id)[5].username, c.statuses.get(cs.raw_id)[4])}" href="${h.url('pullrequest_show',repo_name=c.statuses.get(cs.raw_id)[3],pull_request_id=c.statuses.get(cs.raw_id)[2])}"> | |
|
19 | <i class="icon-circle changeset-status-${c.statuses.get(cs.raw_id)[0]}"></i> | |
|
16 | %if c.cs_statuses.get(cs.raw_id): | |
|
17 | %if c.cs_statuses.get(cs.raw_id)[2]: | |
|
18 | <a data-toggle="tooltip" title="${_('Changeset status: %s by %s\nClick to open associated pull request %s') % (c.cs_statuses.get(cs.raw_id)[1], c.cs_statuses.get(cs.raw_id)[5].username, c.cs_statuses.get(cs.raw_id)[4])}" href="${h.url('pullrequest_show',repo_name=c.cs_statuses.get(cs.raw_id)[3],pull_request_id=c.cs_statuses.get(cs.raw_id)[2])}"> | |
|
19 | <i class="icon-circle changeset-status-${c.cs_statuses.get(cs.raw_id)[0]}"></i> | |
|
20 | 20 | </a> |
|
21 | 21 | %else: |
|
22 | <a data-toggle="tooltip" title="${_('Changeset status: %s by %s') % (c.statuses.get(cs.raw_id)[1], c.statuses.get(cs.raw_id)[5].username)}" | |
|
23 | href="${c.comments[cs.raw_id][0].url()}"> | |
|
24 | <i class="icon-circle changeset-status-${c.statuses.get(cs.raw_id)[0]}"></i> | |
|
22 | <a data-toggle="tooltip" title="${_('Changeset status: %s by %s') % (c.cs_statuses.get(cs.raw_id)[1], c.cs_statuses.get(cs.raw_id)[5].username)}" | |
|
23 | href="${c.cs_comments[cs.raw_id][0].url()}"> | |
|
24 | <i class="icon-circle changeset-status-${c.cs_statuses.get(cs.raw_id)[0]}"></i> | |
|
25 | 25 | </a> |
|
26 | 26 | %endif |
|
27 | 27 | %endif |
|
28 | 28 | </td> |
|
29 | 29 | <td class="compact"> |
|
30 | %if c.comments.get(cs.raw_id,[]): | |
|
30 | %if c.cs_comments.get(cs.raw_id,[]): | |
|
31 | 31 | <div class="comments-container"> |
|
32 | 32 | <div title="${('comments')}"> |
|
33 | <a href="${c.comments[cs.raw_id][0].url()}"> | |
|
34 | <i class="icon-comment"></i>${len(c.comments[cs.raw_id])} | |
|
33 | <a href="${c.cs_comments[cs.raw_id][0].url()}"> | |
|
34 | <i class="icon-comment"></i>${len(c.cs_comments[cs.raw_id])} | |
|
35 | 35 | </a> |
|
36 | 36 | </div> |
|
37 | 37 | </div> |
@@ -33,8 +33,8 b'' | |||
|
33 | 33 | %for cnt, cs in enumerate(reversed(c.cs_ranges)): |
|
34 | 34 | <tr id="chg_${cnt+1}" class="${'mergerow' if len(cs.parents) > 1 else ''}"> |
|
35 | 35 | <td> |
|
36 | %if cs.raw_id in c.statuses: | |
|
37 | <i class="icon-circle changeset-status-${c.statuses[cs.raw_id][0]}" title="${_('Changeset status: %s') % c.statuses[cs.raw_id][1]}"></i> | |
|
36 | %if cs.raw_id in c.cs_statuses: | |
|
37 | <i class="icon-circle changeset-status-${c.cs_statuses[cs.raw_id][0]}" title="${_('Changeset status: %s') % c.cs_statuses[cs.raw_id][1]}"></i> | |
|
38 | 38 | %endif |
|
39 | 39 | %if c.cs_comments.get(cs.raw_id): |
|
40 | 40 | <div class="comments-container"> |
General Comments 0
You need to be logged in to leave comments.
Login now