Merge the webui skipped line counts -- too important to leave in the branch.
author |
Steve Losh <steve@stevelosh.com> |
date |
Wed, 21 Oct 2009 19:58:13 -0400 |
parents |
26150fdd04b8
(current diff)
1cc8e18b1b43
(diff)
|
children |
b599ca22418d
|
branches/tags |
(none) |
files |
|
Changes
--- a/review/web_media/style.css Wed Oct 21 19:32:14 2009 -0400
+++ b/review/web_media/style.css Wed Oct 21 19:58:13 2009 -0400
@@ -99,6 +99,9 @@
table tr.rem {
background: #FBDBDA;
}
+table tr.skipped {
+ background: #ccc;
+}
div.diff .comment {
margin-bottom: 0em;
}
\ No newline at end of file
--- a/review/web_templates/review.html Wed Oct 21 19:32:14 2009 -0400
+++ b/review/web_templates/review.html Wed Oct 21 19:58:13 2009 -0400
@@ -60,7 +60,15 @@
$ max_line = diff['max']
$ content = diff['content']
$ line_level_comments = filter(lambda c: c.filename == filename and c.lines, rcset.comments)
+ $ previous_n = -1
$for n, line in content:
+ $if n - 1 > previous_n:
+ $ skipped_count = n - previous_n
+ $if previous_n == -1:
+ $ skipped_count -= 1
+ <tr class="skipped">
+ <td><code>… skipped ${ skipped_count } lines …</code></td>
+ </tr>
$ kind = 'rem' if line[0] == '-' else 'add' if line[0] == '+' else ''
<tr class="${ kind }">
<td class="diff-line"><code>${ line[1:] or ' ' }</code></td>
@@ -74,5 +82,11 @@
<div class="message">${ comment.message }</div>
</div>
</td></tr>
+ $ previous_n = n
+ $if previous_n < diff['max']:
+ $ skipped_count = diff['max'] - previous_n
+ <tr class="skipped">
+ <td><code>… skipped ${ skipped_count } lines …</code></td>
+ </tr>
</table>
</div>
\ No newline at end of file