From 37f913aba905253a5003b035cff8d61e33bc3f4c Mon Sep 17 00:00:00 2001 From: Fredrik Jonsson <frjo@xdeb.org> Date: Thu, 20 Feb 2025 18:58:49 +0100 Subject: [PATCH 1/2] Correcting view all urls on staff and reviewer dashboard. Some styleing updates as well. --- .../dashboard/includes/submissions-waiting-for-review.html | 4 ++-- .../dashboard/templates/dashboard/reviewer_dashboard.html | 4 ++-- .../dashboard/templates/dashboard/staff_dashboard.html | 7 +++---- 3 files changed, 7 insertions(+), 8 deletions(-) diff --git a/hypha/apply/dashboard/templates/dashboard/includes/submissions-waiting-for-review.html b/hypha/apply/dashboard/templates/dashboard/includes/submissions-waiting-for-review.html index 36898a0d24..b093b985ea 100644 --- a/hypha/apply/dashboard/templates/dashboard/includes/submissions-waiting-for-review.html +++ b/hypha/apply/dashboard/templates/dashboard/includes/submissions-waiting-for-review.html @@ -2,7 +2,7 @@ {% load i18n %} <h2 class="mb-2 text-xl"> - {% trans "Submissions waiting for your review" %} <span class="py-0.5 px-2.5 text-sm font-medium text-blue-800 bg-blue-100 rounded me-2">{{ in_review_count }}</span> + <a href="{% url "apply:submissions:list" %}?query=reviewer:@me">{% trans "Submissions waiting for your review" %} <span class="py-0.5 px-2.5 text-sm font-medium text-blue-800 bg-blue-100 rounded me-2">{{ in_review_count }}</span></a> </h2> {% if my_review.data %} @@ -12,7 +12,7 @@ <h2 class="mb-2 text-xl"> {% if display_more %} <div class="all-submissions-table__more"> - <a href="{{ awaiting_reviews.url }}?query=reviewer:@me">{% trans "Show all" %}</a> + <a href="{% url "apply:submissions:list" %}?query=reviewer:@me">{% trans "Show all" %}</a> </div> {% endif %} diff --git a/hypha/apply/dashboard/templates/dashboard/reviewer_dashboard.html b/hypha/apply/dashboard/templates/dashboard/reviewer_dashboard.html index 33388fab72..ba0a399ffe 100644 --- a/hypha/apply/dashboard/templates/dashboard/reviewer_dashboard.html +++ b/hypha/apply/dashboard/templates/dashboard/reviewer_dashboard.html @@ -19,7 +19,7 @@ {% if my_flagged.submissions %} <div id="submissions-flagged" class="wrapper wrapper--bottom-space"> <h3 class="mb-2 text-xl"> - <a href="{% url "apply:submissions:list" %}?query=flagged:@me">Your flagged submissions <span class="text-sm">({{ my_flagged.count }})</span></a> + <a href="{% url "apply:submissions:list" %}?query=flagged:@me">Your flagged submissions <span class="py-0.5 px-2.5 text-sm font-medium text-blue-800 bg-blue-100 rounded me-2">({{ my_flagged.count }})</span></a> </h3> {% include "submissions/partials/submissions-inline.html" with submissions=my_flagged.submissions row_layout="table" %} @@ -40,7 +40,7 @@ <h3 class="mb-2 text-xl">Your previous reviews</h3> {% if my_reviewed.display_more %} <div class="flex justify-center items-center py-3 font-semibold border-b border-x"> - <a href="{{ my_reviewed.url }}?query=reviewed-by:@me">{% trans "Show all" %}</a> + <a href="{% url "apply:submissions:list" %}?query=reviewed-by:@me">{% trans "Show all" %}</a> </div> {% endif %} </div> diff --git a/hypha/apply/dashboard/templates/dashboard/staff_dashboard.html b/hypha/apply/dashboard/templates/dashboard/staff_dashboard.html index 0f7e86e254..fdf182e457 100644 --- a/hypha/apply/dashboard/templates/dashboard/staff_dashboard.html +++ b/hypha/apply/dashboard/templates/dashboard/staff_dashboard.html @@ -70,7 +70,7 @@ {% if my_flagged.submissions %} <div id="submissions-flagged" class="wrapper wrapper--bottom-space"> <h3 class="mb-2 text-xl"> - <a href="{% url "apply:submissions:list" %}?query=flagged:@me">Your flagged submissions <span class="text-sm">({{ my_flagged.count }})</span></a> + <a href="{% url "apply:submissions:list" %}?query=flagged:@me">Your flagged submissions <span class="py-0.5 px-2.5 text-sm font-medium text-blue-800 bg-blue-100 rounded me-2">{{ my_flagged.count }}</span></a> </h3> {% include "submissions/partials/submissions-inline.html" with submissions=my_flagged.submissions row_layout="table" %} @@ -117,13 +117,12 @@ <h4 class="heading heading--normal">{% trans "Active Invoices" %}</h4> {% if my_reviewed.table.data %} <div class="wrapper wrapper--bottom-space"> - {% trans "Your previous reviews" as review_heading %} - <h2 class="heading heading--normal">{{ review_heading }}</h2> + <h2 class="heading heading--normal">{% trans "Your previous reviews" %}</h2> {% render_table my_reviewed.table %} {% if my_reviewed.display_more %} <div class="all-submissions-table__more"> - <a href="{{ my_reviewed.url }}?reviewers={{ request.user.pk }}">{% trans "Show all" %}</a> + <a href="{% url "apply:submissions:list" %}?reviewers={{ request.user.pk }}">{% trans "Show all" %}</a> </div> {% endif %} </div> From c89b3961dc2ce6855ecca9b77f9182cd9d35aff2 Mon Sep 17 00:00:00 2001 From: Fredrik Jonsson <frjo@xdeb.org> Date: Sat, 22 Feb 2025 10:11:21 +0100 Subject: [PATCH 2/2] Remove unused url attributes from dashboard views. --- hypha/apply/dashboard/views.py | 3 --- 1 file changed, 3 deletions(-) diff --git a/hypha/apply/dashboard/views.py b/hypha/apply/dashboard/views.py index 526889988c..bc6731eaea 100644 --- a/hypha/apply/dashboard/views.py +++ b/hypha/apply/dashboard/views.py @@ -183,7 +183,6 @@ def my_reviewed(self, submissions): submissions[:limit], prefix="my-review-" ), "display_more": submissions.count() > limit, - "url": reverse("funds:submissions:list"), } def rounds(self): @@ -324,7 +323,6 @@ def awaiting_reviews(self, submissions): "count": count, "display_more": count > limit, "table": ReviewerSubmissionsTable(submissions[:limit], prefix="my-review-"), - "url": reverse("funds:submissions:list"), } def my_reviewed(self, submissions): @@ -342,7 +340,6 @@ def my_reviewed(self, submissions): ), "table": ReviewerSubmissionsTable(submissions[:limit], prefix="my-review-"), "display_more": submissions.count() > limit, - "url": reverse("funds:submissions:list"), }