From c3b81eca2f0333ae93018f87bb3fb6cb4115a7df Mon Sep 17 00:00:00 2001 From: Ryan Lerch Date: Jun 01 2016 07:58:54 +0000 Subject: Split out the commits page to a template of its own Previously, the commits page, and the overview page were mashed together in a single template. This was a holdover from the old UI where they shared a lot more in common. Now they do not share anything in common, so to be in line with all the other templates, this splits the commits into it's own template. --- diff --git a/pagure/templates/commits.html b/pagure/templates/commits.html new file mode 100644 index 0000000..0827f00 --- /dev/null +++ b/pagure/templates/commits.html @@ -0,0 +1,161 @@ +{% extends "repo_master.html" %} + +{% block title %}{{ select.capitalize() }} - {{ repo.name }}{% endblock %} +{% set tag = "home" %} + +{% block repo %} +
+ {% if repo_obj and repo_obj.is_empty %} +
+ +
+ {% else %} +

+ Commits {{number_of_commits}} +

+ +
+ Displaying {{number_of_commits}} commits in + + {% if repo.is_fork %} + + {% else %} + + {% endif %} + {{ repo.fullname }} + + + + {{branchname}} + +
+ + {% if diff_commits|count > 0 %} + + {% endif %} + + + + {% if total_page %} + + {% endif %} + {% endif %} +
+{% endblock %} + +{% block jscripts %} +{{ super() }} + +{% endblock %} diff --git a/pagure/templates/repo_info.html b/pagure/templates/repo_info.html index b545deb..2c3a72b 100644 --- a/pagure/templates/repo_info.html +++ b/pagure/templates/repo_info.html @@ -26,129 +26,7 @@ git push -u origin master {% endif %} - {% else %} - {% if origin == 'view_commits' %} -

Commits {{number_of_commits}}

-
- Displaying {{number_of_commits}} commits in - {% - if repo.is_fork %} {% - else %} {% - endif %}{{ repo.fullname }} - - - {{branchname}} - -
- - {% if diff_commits|count > 0 %} - - {% endif %} - -
- {% for commit in last_commits %} - - {% if diff_commits and commit.oid.hex in diff_commits %} -
- -
- {% endif %} -
- {{ commit.message.split('\n')[0] }} -
- - {{ commit.commit_time|humanize }} - -
-
- {{ commit.author | author2avatar(20) | safe }} {{ commit.author.name }} -
- {{ commit.hex|short }} -
-
- {% endfor %} -
{% endif %} - - {% if total_page %} - - {% endif %} - {% endif %} - - {% if origin == 'view_repo' or origin == 'view_repo_branch' %} -
{% if readme %}
@@ -368,7 +246,6 @@ git push -u origin master
{% endif %} - {% endif %} @@ -443,15 +320,4 @@ $(function() { {% endif %} }); - -{% if origin == 'view_commits' %} - -{% endif %} - {% endblock %} diff --git a/pagure/templates/repo_master.html b/pagure/templates/repo_master.html index a94237b..ba9ba5c 100644 --- a/pagure/templates/repo_master.html +++ b/pagure/templates/repo_master.html @@ -107,7 +107,7 @@