{% for change in diff.changes %} {% if change.type == '@' %} {% else %} {% if review %} {% for comment in review.comment_set.all %} {% 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 %} {% endif %} {% endfor %} {% endif %} {% endif %} {% endfor %}
{% if diff.a %}{{ diff.a.path }}{% else %}(New File){% endif %} {% if diff.a.path != diff.b.path %} => {% if diff.b %}{{ diff.b.path }}{% else %}(Deleted){% endif %} {% endif %}
{{ change.text }}
{% if change.type != '+' %}{{ change.line_a }}{% endif %} {% if change.type != '-' %}{{ change.line_b }}{% endif %} {{ change.text }}
{% include "components/comment.html" %}