##// END OF EJS Templates
pull-requests: show more info about version of comment vs latest version.
marcink -
r2809:f9dcd621 default
parent child Browse files
Show More
@@ -7,6 +7,7 b''
7
7
8 <%def name="comment_block(comment, inline=False)">
8 <%def name="comment_block(comment, inline=False)">
9 <% pr_index_ver = comment.get_index_version(getattr(c, 'versions', [])) %>
9 <% pr_index_ver = comment.get_index_version(getattr(c, 'versions', [])) %>
10 <% latest_ver = len(getattr(c, 'versions', [])) %>
10 % if inline:
11 % if inline:
11 <% outdated_at_ver = comment.outdated_at_version(getattr(c, 'at_version_num', None)) %>
12 <% outdated_at_ver = comment.outdated_at_version(getattr(c, 'at_version_num', None)) %>
12 % else:
13 % else:
@@ -103,11 +104,11 b''
103 <div class="pr-version-inline">
104 <div class="pr-version-inline">
104 <a href="${request.current_route_path(_query=dict(version=comment.pull_request_version_id), _anchor='comment-{}'.format(comment.comment_id))}">
105 <a href="${request.current_route_path(_query=dict(version=comment.pull_request_version_id), _anchor='comment-{}'.format(comment.comment_id))}">
105 % if outdated_at_ver:
106 % if outdated_at_ver:
106 <code class="pr-version-num" title="${_('Outdated comment from pull request version {0}').format(pr_index_ver)}">
107 <code class="pr-version-num" title="${_('Outdated comment from pull request version v{0}, latest v{1}').format(pr_index_ver, latest_ver)}">
107 outdated ${'v{}'.format(pr_index_ver)} |
108 outdated ${'v{}'.format(pr_index_ver)} |
108 </code>
109 </code>
109 % elif pr_index_ver:
110 % elif pr_index_ver:
110 <code class="pr-version-num" title="${_('Comment from pull request version {0}').format(pr_index_ver)}">
111 <code class="pr-version-num" title="${_('Comment from pull request version v{0}, latest v{1}').format(pr_index_ver, latest_ver)}">
111 ${'v{}'.format(pr_index_ver)} |
112 ${'v{}'.format(pr_index_ver)} |
112 </code>
113 </code>
113 % endif
114 % endif
@@ -119,10 +120,10 b''
119 <div class="pr-version">
120 <div class="pr-version">
120 % if comment.outdated:
121 % if comment.outdated:
121 <a href="?version=${comment.pull_request_version_id}#comment-${comment.comment_id}">
122 <a href="?version=${comment.pull_request_version_id}#comment-${comment.comment_id}">
122 ${_('Outdated comment from pull request version {}').format(pr_index_ver)}
123 ${_('Outdated comment from pull request version v{0}, latest v{1}').format(pr_index_ver, latest_ver)}
123 </a>
124 </a>
124 % else:
125 % else:
125 <div title="${_('Comment from pull request version {0}').format(pr_index_ver)}">
126 <div title="${_('Comment from pull request version v{0}, latest v{1}').format(pr_index_ver, latest_ver)}">
126 <a href="${h.route_path('pullrequest_show',repo_name=comment.pull_request.target_repo.repo_name,pull_request_id=comment.pull_request.pull_request_id, version=comment.pull_request_version_id)}">
127 <a href="${h.route_path('pullrequest_show',repo_name=comment.pull_request.target_repo.repo_name,pull_request_id=comment.pull_request.pull_request_id, version=comment.pull_request_version_id)}">
127 <code class="pr-version-num">
128 <code class="pr-version-num">
128 ${'v{}'.format(pr_index_ver)}
129 ${'v{}'.format(pr_index_ver)}
@@ -221,7 +221,7 b''
221 <td>
221 <td>
222 % if c.at_version_num != ver_pr:
222 % if c.at_version_num != ver_pr:
223 <i class="icon-comment"></i>
223 <i class="icon-comment"></i>
224 <code class="tooltip" title="${_('Comment from pull request version {0}, general:{1} inline:{2}').format(ver_pos, len(c.comment_versions[ver_pr]['at']), len(c.inline_versions[ver_pr]['at']))}">
224 <code class="tooltip" title="${_('Comment from pull request version v{0}, general:{1} inline:{2}').format(ver_pos, len(c.comment_versions[ver_pr]['at']), len(c.inline_versions[ver_pr]['at']))}">
225 G:${len(c.comment_versions[ver_pr]['at'])} / I:${len(c.inline_versions[ver_pr]['at'])}
225 G:${len(c.comment_versions[ver_pr]['at'])} / I:${len(c.inline_versions[ver_pr]['at'])}
226 </code>
226 </code>
227 % endif
227 % endif
General Comments 0
You need to be logged in to leave comments. Login now