diff --git a/management/context_processors.py b/management/context_processors.py
index 757a1cc..bed78d4 100644
--- a/management/context_processors.py
+++ b/management/context_processors.py
@@ -165,7 +165,7 @@ _TOP_SECTION = {
"event_list": "calendar",
"location_list": "calendar",
"opponent_list": "calendar",
- "sponsor_list": "settings",
+ "sponsor_list": "finance",
"product_list": "finance",
"order_list": "finance",
"discount_list": "finance",
@@ -176,7 +176,7 @@ _TOP_SECTION = {
"role_list": "settings",
"position_list": "settings",
"referee_level_list": "settings",
- "referee_management": "settings",
+ "referee_management": "calendar",
}
diff --git a/management/templates/management/_nav_items.html b/management/templates/management/_nav_items.html
index 4c35917..902596c 100644
--- a/management/templates/management/_nav_items.html
+++ b/management/templates/management/_nav_items.html
@@ -56,6 +56,11 @@
{% trans "Locations" %}
{% trans "Opponents" %}
{% endif %}
+ {% if is_club_admin or can_manage_members %}
+ {% trans "Referee management" %}
+ {% if games_missing_referees_count %}{{ games_missing_referees_count }}{% endif %}
+
+ {% endif %}
{% endif %}
@@ -68,6 +73,7 @@
{% if nav_section == 'finance' %}
{% trans "Dues & billing" %}
+
{% if shop_enabled %}
{% trans "Products" %}
{% trans "Orders" %}
@@ -94,11 +100,7 @@
{% trans "Positions" %}
{% endif %}
{% trans "Referee levels" %}
-
{% trans "Referee management" %}
- {% if games_missing_referees_count %}{{ games_missing_referees_count }}{% endif %}
-
{% if is_club_admin %}
-
{% if forms_enabled %}
{% trans "Forms" %}
{% endif %}
diff --git a/management/tests.py b/management/tests.py
index 920092b..340e962 100644
--- a/management/tests.py
+++ b/management/tests.py
@@ -219,15 +219,28 @@ class ActiveNavHighlightTests(ManagementTestBase):
self.assertContains(response, f'class="nav-item active" href="{reverse("management:home")}"')
self.assertNotContains(response, f'class="nav-item active" href="{reverse("management:member_list")}"')
- def test_roles_positions_and_referee_setup_pages_all_highlight_settings(self):
- # Roles/Positions/Referee levels/Referee management moved out of Members/Teams
- # and into Settings -- club-wide setup, not day-to-day people/roster work.
- for name in ("role_list", "position_list", "referee_level_list", "referee_management"):
+ def test_roles_positions_and_referee_levels_pages_all_highlight_settings(self):
+ # Roles/Positions/Referee levels moved out of Members/Teams and into Settings --
+ # club-wide setup, not day-to-day people/roster work.
+ for name in ("role_list", "position_list", "referee_level_list"):
with self.subTest(name=name):
response = self.club_get(name)
self.assertContains(response, f'class="nav-item active" href="{reverse("management:club_settings")}"')
+ def test_referee_management_page_highlights_calendar(self):
+ # Referee management is the operational "who's covering this game" page, so it
+ # lives under Calendar with Events/Locations/Opponents, not under Settings.
+ response = self.club_get("referee_management")
+
+ self.assertContains(response, f'class="nav-item active" href="{reverse("management:event_list")}"')
+
+ def test_sponsor_list_page_highlights_finance(self):
+ # Sponsors sit under Finance, underneath Dues & billing.
+ response = self.club_get("sponsor_list")
+
+ self.assertContains(response, f'class="nav-item active" href="{reverse("management:membership_list")}"')
+
class SidebarThemingTests(ManagementTestBase):
"""The sidebar's own background/foreground follow Club.primary_color (base.html
@@ -4447,12 +4460,12 @@ class SponsorManagementTests(ManagementTestBase):
self.assertTrue(Sponsor.objects.filter(pk=sponsor.pk).exists())
def test_nav_only_shows_sponsors_for_an_admin(self):
- # Sponsors lives under Settings' sub-nav now, which only expands on a
- # Settings-section page -- see ActiveNavHighlightTests's sibling comments.
- # Settings itself is admin-only, so a coach never reaches a page that would
+ # Sponsors lives under Finance's sub-nav now, which only expands on a
+ # Finance-section page -- see ActiveNavHighlightTests's sibling comments.
+ # Finance itself is admin-only, so a coach never reaches a page that would
# expand it in the first place -- club_get raises PermissionDenied for them.
self.client.force_login(self.admin_user)
- self.assertContains(self.club_get("club_settings"), "Sponsors")
+ self.assertContains(self.club_get("membership_list"), "Sponsors")
self.client.force_login(self.coach_manager)
self.assertNotContains(self.club_get("home"), "Sponsors")