Skip to content

Commit

Permalink
Combine the reports/reporting nav items (#4240)
Browse files Browse the repository at this point in the history
Building off of the conversation had in #4051, this adds the navigation
to the reporting table to be under the submitted reports view rather
than being in the main nav bar

This makes things a little simpler and explicit for the user but I think
this is a temp fix, with #4239 being a permanent solution
  • Loading branch information
wes-otf authored Dec 6, 2024
1 parent 761bbdc commit 35f1a43
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,10 @@

{% adminbar %}
{% slot header %}{% trans "Submitted Reports" %} ({{ table.rows|length }}){% endslot %}
{% slot sub_heading %}{% trans "View and filter all Submitted Reports" %}{% endslot %}
{% slot sub_heading %}
{% trans "View and filter all Submitted Reports" %} •
<a href="{% url 'apply:projects:reports:all' %}" class="text-blue-300 hover:underline">View all reports</a>
{% endslot %}
{% endadminbar %}

<div class="wrapper wrapper--large wrapper--inner-space-medium">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,10 @@

{% adminbar %}
{% slot header %}{% trans "Reporting" %} ({{ table.rows|length }}){% endslot %}
{% slot sub_heading %}{% trans "View, Search and filter reporting statuses" %}{% endslot %}
{% slot sub_heading %}
{% trans "View, Search and filter reporting statuses" %} •
<a href="{% url 'apply:projects:reports:submitted' %}" class="text-blue-300 hover:underline">View submitted reports</a>
{% endslot %}
{% endadminbar %}

<div class="wrapper wrapper--large wrapper--inner-space-medium">
Expand Down
4 changes: 2 additions & 2 deletions hypha/apply/projects/urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,8 @@
include(
(
[
path("", ReportListView.as_view(), name="all"),
path("", ReportListView.as_view(), name="submitted"),
path("all/", ReportingView.as_view(), name="all"),
path(
"<int:pk>/",
include(
Expand All @@ -280,5 +281,4 @@
)
),
),
path("reporting/", ReportingView.as_view(), name="reporting"),
]
7 changes: 1 addition & 6 deletions hypha/core/navigation.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,12 +91,7 @@ def get_primary_navigation_items(user):
},
{
"title": _("Reports"),
"url": reverse_lazy("apply:projects:reports:all"),
"permission_method": "hypha.apply.users.decorators.is_apply_staff_or_finance",
},
{
"title": _("Reporting"),
"url": reverse_lazy("apply:projects:reporting"),
"url": reverse_lazy("apply:projects:reports:submitted"),
"permission_method": "hypha.apply.users.decorators.is_apply_staff_or_finance",
},
],
Expand Down

0 comments on commit 35f1a43

Please sign in to comment.