From 821b060b84d95ad157b4820f4976bc3c26415cbc Mon Sep 17 00:00:00 2001 From: Pierre-Yves Chibon Date: Dec 09 2020 10:46:17 +0000 Subject: Fix showing the number of PR involved Since we used to have all the PRs showing on the page, we were simply counting with JS the number of rows/PRs shown. Now that we paginate we can no longer do this and instead we need to rely on the information we retrieve from the database. Signed-off-by: Pierre-Yves Chibon --- diff --git a/pagure/templates/userprofile_pullrequests.html b/pagure/templates/userprofile_pullrequests.html index 52709a3..0e09ed7 100644 --- a/pagure/templates/userprofile_pullrequests.html +++ b/pagure/templates/userprofile_pullrequests.html @@ -42,7 +42,7 @@
Pull Requests {{username}} can act on
{% endif %} - PRs + {{ requests_length }} PRs @@ -64,7 +64,4 @@ {{ super() }} - {% endblock %} diff --git a/pagure/ui/app.py b/pagure/ui/app.py index 4cfbb9d..cb5495e 100644 --- a/pagure/ui/app.py +++ b/pagure/ui/app.py @@ -959,6 +959,7 @@ def view_user_requests(username): username=username, user=user, requests=requests, + requests_length=requests_length, select="requests", pr_type=pr_type, pr_status=pr_status,