diff --git a/pagure/templates/repo_info.html b/pagure/templates/repo_info.html index 203d14f..1358c0d 100644 --- a/pagure/templates/repo_info.html +++ b/pagure/templates/repo_info.html @@ -33,29 +33,81 @@ git push -u origin master {% 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 and authenticated and repo.settings.get('pull_requests', True) %} - - + This branch contains {{ + diff_commits|count }} commits not in {% + if repo.is_fork %}the upstream project + + + {{ repo.name }} + {% + else %}the main branch{% + endif %} + + + {{head}} + + + {% if diff_commits and authenticated and (repo.is_fork or repo.settings.get('pull_requests', True)) %} +
+ {% if repo_admin %}Request pull{% else %}Compare{% endif %} - - {% elif authenticated and repo.settings.get('pull_requests', True) %} +
+ {#{% elif authenticated and repo.settings.get('pull_requests', True) %} Open a remote pull-request - +
#} {% endif %} + + + + {%endif%} -
+
{% for commit in last_commits %} - + {% if diff_commits and commit.oid.hex in diff_commits %} -
+
{% endif %} @@ -255,6 +307,8 @@ git push -u origin master $(document).ready(function() { $(".extra_gits").hide(); }); + + $(function() { $( "#more_gits" ).click( function() { @@ -271,4 +325,15 @@ $(function() { ); }); + +{% if origin == 'view_commits' %} + +{% endif %} + {% endblock %} diff --git a/pagure/ui/repo.py b/pagure/ui/repo.py index bd5b290..576e84c 100644 --- a/pagure/ui/repo.py +++ b/pagure/ui/repo.py @@ -306,6 +306,7 @@ def view_commits(repo, branchname=None, username=None): total_page = int(ceil(n_commits / float(limit))) diff_commits = [] + diff_commits_full = [] if repo.is_fork: parentname = os.path.join( APP.config['GIT_FOLDER'], repo.parent.path) @@ -343,6 +344,7 @@ def view_commits(repo, branchname=None, username=None): if commit.oid.hex in compare_commits: break diff_commits.append(commit.oid.hex) + diff_commits_full.append(commit) return flask.render_template( 'repo_info.html', @@ -356,6 +358,8 @@ def view_commits(repo, branchname=None, username=None): branchname=branchname, last_commits=last_commits, diff_commits=diff_commits, + diff_commits_full=diff_commits_full, + number_of_commits=n_commits, page=page, total_page=total_page, repo_admin=is_repo_admin(repo),