mirror of
https://github.com/correl/codereview.git
synced 2024-12-27 11:07:33 +00:00
Ensured comments are displayed only on the lines they were created for
This commit is contained in:
parent
247888aff0
commit
0c29fa19fe
1 changed files with 9 additions and 10 deletions
|
@ -19,17 +19,16 @@
|
||||||
<td class="text">{{ change.text }}</td>
|
<td class="text">{{ change.text }}</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
{# TODO: Load in annotations somehow #}
|
|
||||||
{% if review %}
|
{% if review %}
|
||||||
{% for comment in review.comment_set.all %}
|
{% for comment in review.comment_set.all %}
|
||||||
{% if change.type != '+' and change.line_a == comment.line_a or change_type != '-' and change.line_b == comment.line_b %}
|
{% if change.type == '+' and change.line_b == comment.line_b or change.type == '-' and change.line_a == comment.line_a or change.line_a == comment.line_a and change.line_b == comment.line_b %}
|
||||||
<tr class="annotation">
|
<tr class="annotation">
|
||||||
<td colspan="3">
|
<td colspan="3">
|
||||||
{% include "components/comment.html" %}
|
{% include "components/comment.html" %}
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
|
Loading…
Reference in a new issue