From 3ca3102fe1d20f8bbc2dcb00843286def8f08689 Mon Sep 17 00:00:00 2001 From: Pierre-Yves Chibon Date: Feb 16 2015 09:57:01 +0000 Subject: Change layout so that we should changes on a per file basis --- diff --git a/progit/templates/pull_request.html b/progit/templates/pull_request.html index 604d043..97b9ec1 100644 --- a/progit/templates/pull_request.html +++ b/progit/templates/pull_request.html @@ -105,33 +105,23 @@
-
- - - - - {% if diff %} +{% for patch in diff %} + + {% if (patch.additions + patch.deletions) %} + + {% if patch.additions > 0 %}+{{ patch.additions }}{% endif %} + {% if patch.deletions > 0 %}-{{ patch.deletions }}{% endif %} + + {% endif %} + + {{ patch.new_file_path }} {% autoescape false %} - {{ diff.patch|html_diff|format_loc(prequest=pull_request)}} + {{ patch | patch_to_diff | html_diff | format_loc( + filename=patch.new_file_path, prequest=pull_request)}} {% endautoescape %} +{% endfor %} {% endif %}
Changes -
    - {% for patch in diff %} -
  • - - {% if (patch.additions + patch.deletions) %} - - {% if patch.additions > 0 %}+{{ patch.additions }}{% endif %} - {% if patch.deletions > 0 %}-{{ patch.deletions }}{% endif %} - - {% endif %} - - {{ patch.new_file_path }} -
  • - {% endfor %} -
-