diff --git a/pagure/templates/commit.html b/pagure/templates/commit.html index 37dbb05..24d6191 100644 --- a/pagure/templates/commit.html +++ b/pagure/templates/commit.html @@ -7,64 +7,75 @@ {% set splitted_message = commit.message.split('\n') %}
-

- {{ splitted_message[0] }} - (commit: {{ commitid|short }} - - tree) +

+ Commit {{ commitid|short }} + {{ splitted_message[0] }} +
+ raw + patch + tree + {% if commit.parents|length == 1 %} + parent + {% elif commit.parents|length > 1 %} +
+ + +
+ {% endif%} +
+

+
+ {% if commit.author| author2user == commit.committer| author2user %} + Authored and Committed by {{ commit.author | author2user |safe }} + {{commit.commit_time | humanize}} + {% else %} + Authored by {{ commit.author | author2user |safe }} + {{commit.commit_time | humanize}}, + Committed by {{ commit.committer | author2user |safe }} + {{commit.commit_time | humanize}}, + {% endif%} +
+
+ {% if splitted_message|length > 1 %} - +
         {% for message in splitted_message %}
-            {% if loop.index > 1 %}
-                {{ message }}
-            {% endif %}
+{{ message }}
         {% endfor %}
-    
+    
{% endif %} - - - - - - - - - - - - - - - -
Author - {{ commit.author | author2user |safe }} - - {{ commit.commit_time | format_ts}} -
Committer - {{ commit.committer | author2user |safe }} - - {{ commit.commit_time | format_ts }} -
Parent - {% for parent in commit.parents %} - - {{ parent.oid.hex }} -
- {% endfor %} -
Changes
{% for patch in diff %} -
-
- {% if patch | hasattr('new_file_path') %} -

{{ patch.new_file_path }}

- {% elif patch | hasattr('delta') %} -

{{ patch.delta.new_file.path }}

- {% endif %} -
    -
  • - {% if not patch.is_binary %} - {% if patch | hasattr('additions') %} - {% if (patch.additions + patch.deletions) %} - - {% if patch.additions > 0 %}+{{ patch.additions }}{% endif %} - {% if patch.deletions > 0 %}-{{ patch.deletions }}{% endif %} - - {% endif %} - {% else %} - {% if (patch.line_stats[1] + patch.line_stats[2]) %} - - {% if patch.line_stats[1] > 0 %}+{{ patch.line_stats[1] }}{% endif %} - {% if patch.line_stats[2] > 0 %}-{{ patch.line_stats[2] }}{% endif %} - - {% endif %} - {% endif %} - {% endif %} -
  • -
  • - View -
  • -
-
+
+
+ {% if patch | hasattr('new_file_path') %} + + {{ patch.new_file_path }} + + {% elif patch | hasattr('delta') %} + + {{ patch.delta.new_file.path }} + + {% endif %} + {% if not patch.is_binary %} + {% if patch | hasattr('additions') %} + {% if (patch.additions + patch.deletions) %} + + {% if patch.additions > 0 %}+{{ patch.additions }} {% endif %} + {% if patch.deletions > 0 %}-{{ patch.deletions }}{% endif %} + + {% endif %} + {% else %} + {% if (patch.line_stats[1] + patch.line_stats[2]) %} + + {% if patch.line_stats[1] > 0 %}+{{ patch.line_stats[1] }} {% endif %} + {% if patch.line_stats[2] > 0 %}-{{ patch.line_stats[2] }}{% endif %} + + {% endif %} + {% endif %} + {% endif %} +
{% if patch.is_binary %}

Binary diffs cannot be rendered.

@@ -135,7 +145,7 @@ {{ patch|patch_to_diff|html_diff}} {% endautoescape %} {% endif %} -
+ {% endfor %}