Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Correcting view all urls on staff and reviewer dashboard. #4409

Merged
merged 2 commits into from
Feb 24, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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 %}
Expand All @@ -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 %}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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" %}
Expand All @@ -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>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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" %}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Update at these places as well?

Remove

"url": reverse("funds:submissions:list"),

"url": reverse("funds:submissions:list"),

Expand Down Expand Up @@ -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>
Expand Down
3 changes: 0 additions & 3 deletions hypha/apply/dashboard/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down Expand Up @@ -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):
Expand All @@ -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"),
}


Expand Down
Loading