diff --git a/pagure/templates/pull_request.html b/pagure/templates/pull_request.html index 32d504e..89c5bdb 100644 --- a/pagure/templates/pull_request.html +++ b/pagure/templates/pull_request.html @@ -592,7 +592,7 @@ {% macro changeschangedfile(filepath, added, removed, diffanchor) -%}
+{{added}} -{{removed}}
-
file changed
+
file changed
{{filepath}} @@ -641,10 +641,15 @@ {% set linesadded = patch.line_stats[1] %} {% set linesremoved = patch.line_stats[2] %} {% endif %} - {% if patch | hasattr('new_file_path') %} {%- if patch.new_file_path == patch.old_file_path -%} - {{ changeschangedfile(patch.new_file_path, linesadded, linesremoved, count) }} + {%- if patch.status == 'D' -%} + {{ changesdeletedfile(patch.new_file_path, linesadded, linesremoved, count) }} + {%-elif patch.status == 'A' -%} + {{ changesaddedfile(patch.new_file_path, linesadded, linesremoved, count) }} + {%-elif patch.status == 'M' -%} + {{ changeschangedfile(patch.new_file_path, linesadded, linesremoved, count) }} + {%-endif-%} {%- else -%} {{changesrenamedfile(patch.old_file_path, patch.new_file_path, linesadded, linesremoved, count)}} {%- endif -%}