##// END OF EJS Templates
comments: cleanup of PR versions/author tags.
marcink -
r4409:58906467 default
parent child Browse files
Show More
@@ -253,12 +253,10 b' tr.inline-comments div {'
253 }
253 }
254
254
255 .pr-version {
255 .pr-version {
256 float: left;
256 display: inline-block;
257 margin: 0px 4px;
258 }
257 }
259 .pr-version-inline {
258 .pr-version-inline {
260 float: left;
259 display: inline-block;
261 margin: 0px 4px;
262 }
260 }
263 .pr-version-num {
261 .pr-version-num {
264 font-size: 10px;
262 font-size: 10px;
@@ -37,6 +37,10 b''
37 &:hover {
37 &:hover {
38 border-color: @grey4;
38 border-color: @grey4;
39 }
39 }
40
41 &.authortag {
42 padding: 2px;
43 }
40 }
44 }
41
45
42 .tag0 { .border ( @border-thickness-tags, @grey4 ); color:@grey4; }
46 .tag0 { .border ( @border-thickness-tags, @grey4 ); color:@grey4; }
@@ -62,6 +62,13 b''
62
62
63 <div class="author ${'author-inline' if inline else 'author-general'}">
63 <div class="author ${'author-inline' if inline else 'author-general'}">
64 ${base.gravatar_with_user(comment.author.email, 16, tooltip=True)}
64 ${base.gravatar_with_user(comment.author.email, 16, tooltip=True)}
65
66 % if comment.pull_request and comment.pull_request.author.user_id == comment.author.user_id:
67 <span class="tag authortag tooltip" title="${_('Pull request author')}">
68 ${_('author')}
69 </span>
70 % endif
71
65 </div>
72 </div>
66 <div class="date">
73 <div class="date">
67 ${h.age_component(comment.modified_at, time_is_local=True)}
74 ${h.age_component(comment.modified_at, time_is_local=True)}
@@ -139,15 +146,9 b''
139 <a class="permalink" href="#comment-${comment.comment_id}"> &para;</a>
146 <a class="permalink" href="#comment-${comment.comment_id}"> &para;</a>
140
147
141 <div class="comment-links-block">
148 <div class="comment-links-block">
142 % if comment.pull_request and comment.pull_request.author.user_id == comment.author.user_id:
149
143 <span class="tag authortag tooltip" title="${_('Pull request author')}">
144 ${_('author')}
145 </span>
146 |
147 % endif
148 % if inline:
150 % if inline:
149 <div class="pr-version-inline">
151 <a class="pr-version-inline" href="${request.current_route_path(_query=dict(version=comment.pull_request_version_id), _anchor='comment-{}'.format(comment.comment_id))}">
150 <a href="${request.current_route_path(_query=dict(version=comment.pull_request_version_id), _anchor='comment-{}'.format(comment.comment_id))}">
151 % if outdated_at_ver:
152 % if outdated_at_ver:
152 <code class="pr-version-num" title="${_('Outdated comment from pull request version v{0}, latest v{1}').format(pr_index_ver, latest_ver)}">
153 <code class="pr-version-num" title="${_('Outdated comment from pull request version v{0}, latest v{1}').format(pr_index_ver, latest_ver)}">
153 outdated ${'v{}'.format(pr_index_ver)} |
154 outdated ${'v{}'.format(pr_index_ver)} |
@@ -158,25 +159,26 b''
158 </code>
159 </code>
159 % endif
160 % endif
160 </a>
161 </a>
161 </div>
162 % else:
162 % else:
163 % if comment.pull_request_version_id and pr_index_ver:
163 % if comment.pull_request_version_id and pr_index_ver:
164 |
164
165 <div class="pr-version">
166 % if comment.outdated:
165 % if comment.outdated:
167 <a href="?version=${comment.pull_request_version_id}#comment-${comment.comment_id}">
166 <a class="pr-version"
167 href="?version=${comment.pull_request_version_id}#comment-${comment.comment_id}"
168 >
168 ${_('Outdated comment from pull request version v{0}, latest v{1}').format(pr_index_ver, latest_ver)}
169 ${_('Outdated comment from pull request version v{0}, latest v{1}').format(pr_index_ver, latest_ver)}
169 </a>
170 </a> |
170 % else:
171 % else:
171 <div title="${_('Comment from pull request version v{0}, latest v{1}').format(pr_index_ver, latest_ver)}">
172 <a class="pr-version"
172 <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)}">
173 title="${_('Comment from pull request version v{0}, latest v{1}').format(pr_index_ver, latest_ver)}"
173 <code class="pr-version-num">
174 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)}"
174 ${'v{}'.format(pr_index_ver)}
175 >
175 </code>
176 <code class="pr-version-num">
176 </a>
177 ${'v{}'.format(pr_index_ver)}
177 </div>
178 </code>
179 </a> |
178 % endif
180 % endif
179 </div>
181
180 % endif
182 % endif
181 % endif
183 % endif
182
184
General Comments 0
You need to be logged in to leave comments. Login now