diff --git a/pagure/templates/_repo_renderdiff.html b/pagure/templates/_repo_renderdiff.html
new file mode 100644
index 0000000..5b9e13c
--- /dev/null
+++ b/pagure/templates/_repo_renderdiff.html
@@ -0,0 +1,203 @@
+{% macro repo_renderdiff(diff, diff_commits, pull_request, repo, username, namespace) -%}
+
+{% if diff %}
+ {% for patch in diff %}
+ {% if patch |hasattr('new_id') %}
+ {% set patch_new_id = patch.new_id %}
+ {% elif patch |hasattr('delta') %}
+ {% set patch_new_id = patch.delta.new_file.id %}
+ {% else %}
+ {% set patch_new_id = patch.new_oid %}
+ {% endif %}
+
+ {% if patch |hasattr('old_id') %}
+ {% set patch_old_id = patch.old_id %}
+ {% elif patch |hasattr('delta') %}
+ {% set patch_old_id = patch.delta.old_file.id %}
+ {% else %}
+ {% set patch_old_id = patch.old_oid %}
+ {% endif %}
+
+ {% if patch | hasattr('new_file_path') %}
+ {% set patch_new_file_path = patch.new_file_path -%}
+ {% if patch.new_file_path != patch.old_file_path %}
+ {% set patch_old_file_path = patch.old_file_path %}
+ {%- endif -%}
+ {%- elif patch | hasattr('delta') -%}
+ {% set patch_new_file_path = patch.delta.new_file.path -%}
+ {%- if patch.delta.new_file.path != patch.delta.old_file.path -%}
+ {% set patch_old_file_path = patch.delta.old_file.path %}
+ {%- endif -%}
+ {%- endif -%}
+
+
+
+
+ {% set linesadded = patch.line_stats[1] %}
+ {% set linesremoved = patch.line_stats[2] %}
+
+ {% macro lineschanged(added, removed) -%}
+ {%if added%}
+ +{{linesadded}}
+ {%endif%}
+ {%if removed%}
+ -{{linesremoved}}
+ {%endif%}
+ {%endmacro%}
+
+ {% macro viewfilelink(filepath, identifier=False)%}
+ {% if pull_request and not pull_request.remote %}
+ {% if not identifier %}
+ {% set identifier = pull_request.branch_from %}
+ {% endif %}
+ {{
+ filepath | unicode }}
+ {% elif not pull_request %}
+ {{
+ filepath | unicode }}
+ {% elif pull_request and pull_request.remote %}
+ {{ filepath | unicode }}
+
+ {{patch.old_file_path}}
+ {{viewfilelink(patch.new_file_path)}}
+ {{patch.delta.old_file.path}}
+ {{ viewfilelink(patch.delta.new_file.path) }}
+
No commits found
- {% endfor %} -Pull this pull-request locally v
- -No commits found
+ {% endfor %} +No commits found
+ {% endfor %} +No commits found
+ {% endfor %} +Pull this pull-request locally v
+ +