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,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 %}