Skip to content

Commit

Permalink
Add active_when to the admin nav settings
Browse files Browse the repository at this point in the history
This sets active to true for nav nodes when the beginning of the
current_path matches the active when path.
  • Loading branch information
peteryates committed Jan 28, 2025
1 parent 10f5f07 commit b6e5b21
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/components/navigation/primary_navigation_component.rb
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ def navigation_items
{
appropriate_body_user: [],
dfe_staff_user: [
{ text: "Teachers", href: admin_teachers_path },
{ text: "Organisations", href: admin_organisations_path },
{ text: "Teachers", href: admin_teachers_path, active_when: '/admin/teachers' },
{ text: "Organisations", href: admin_organisations_path, active_when: '/admin/organisations' },
],
school_user: [
{ text: "Your ECTs", href: schools_ects_home_path },
Expand Down

0 comments on commit b6e5b21

Please sign in to comment.