Ensured comments are displayed only on the lines they were created for

This commit is contained in:
Correl Roush 2010-12-17 13:29:27 -05:00
parent 247888aff0
commit 0c29fa19fe

View file

@ -19,10 +19,9 @@
<td class="text">{{ change.text }}</td>
</tr>
{# TODO: Load in annotations somehow #}
{% if review %}
{% 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">
<td colspan="3">
{% include "components/comment.html" %}