|
|
@ -17,7 +17,7 @@ module NavigationItemsHelper |
|
|
|
NavigationItem.new("Schemes", "/schemes", subnav_supported_housing_schemes_path?(path)), |
|
|
|
NavigationItem.new("Schemes", "/schemes", subnav_supported_housing_schemes_path?(path)), |
|
|
|
NavigationItem.new("Users", users_organisation_path(current_user.organisation), subnav_users_path?(path)), |
|
|
|
NavigationItem.new("Users", users_organisation_path(current_user.organisation), subnav_users_path?(path)), |
|
|
|
NavigationItem.new("About your organisation", "/organisations/#{current_user.organisation.id}", subnav_details_path?(path)), |
|
|
|
NavigationItem.new("About your organisation", "/organisations/#{current_user.organisation.id}", subnav_details_path?(path)), |
|
|
|
NavigationItem.new("Housing providers", housing_providers_organisation_path(current_user.organisation), subnav_housing_providers_path?(path)), |
|
|
|
NavigationItem.new("Housing providers", housing_providers_organisation_path(current_user.organisation), housing_providers_path?(path)), |
|
|
|
].compact |
|
|
|
].compact |
|
|
|
else |
|
|
|
else |
|
|
|
[ |
|
|
|
[ |
|
|
@ -25,7 +25,7 @@ module NavigationItemsHelper |
|
|
|
FeatureToggle.sales_log_enabled? ? NavigationItem.new("Sales logs", sales_logs_path, sales_logs_current?(path)) : nil, |
|
|
|
FeatureToggle.sales_log_enabled? ? NavigationItem.new("Sales logs", sales_logs_path, sales_logs_current?(path)) : nil, |
|
|
|
NavigationItem.new("Users", users_organisation_path(current_user.organisation), subnav_users_path?(path)), |
|
|
|
NavigationItem.new("Users", users_organisation_path(current_user.organisation), subnav_users_path?(path)), |
|
|
|
NavigationItem.new("About your organisation", "/organisations/#{current_user.organisation.id}", subnav_details_path?(path)), |
|
|
|
NavigationItem.new("About your organisation", "/organisations/#{current_user.organisation.id}", subnav_details_path?(path)), |
|
|
|
NavigationItem.new("Housing providers", housing_providers_organisation_path(current_user.organisation), subnav_housing_providers_path?(path)), |
|
|
|
NavigationItem.new("Housing providers", housing_providers_organisation_path(current_user.organisation), housing_providers_path?(path)), |
|
|
|
].compact |
|
|
|
].compact |
|
|
|
end |
|
|
|
end |
|
|
|
|
|
|
|
|
|
|
@ -41,6 +41,7 @@ module NavigationItemsHelper |
|
|
|
NavigationItem.new("Schemes", "/organisations/#{current_organisation_id}/schemes", subnav_supported_housing_schemes_path?(path)), |
|
|
|
NavigationItem.new("Schemes", "/organisations/#{current_organisation_id}/schemes", subnav_supported_housing_schemes_path?(path)), |
|
|
|
NavigationItem.new("Users", "/organisations/#{current_organisation_id}/users", subnav_users_path?(path)), |
|
|
|
NavigationItem.new("Users", "/organisations/#{current_organisation_id}/users", subnav_users_path?(path)), |
|
|
|
NavigationItem.new("About this organisation", "/organisations/#{current_organisation_id}", subnav_details_path?(path)), |
|
|
|
NavigationItem.new("About this organisation", "/organisations/#{current_organisation_id}", subnav_details_path?(path)), |
|
|
|
|
|
|
|
NavigationItem.new("Housing providers", housing_providers_organisation_path, housing_providers_path?(path)), |
|
|
|
].compact |
|
|
|
].compact |
|
|
|
else |
|
|
|
else |
|
|
|
[ |
|
|
|
[ |
|
|
@ -48,7 +49,7 @@ module NavigationItemsHelper |
|
|
|
FeatureToggle.sales_log_enabled? ? NavigationItem.new("Sales logs", "/organisations/#{current_organisation_id}/sales-logs", sales_logs_current?(path)) : nil, |
|
|
|
FeatureToggle.sales_log_enabled? ? NavigationItem.new("Sales logs", "/organisations/#{current_organisation_id}/sales-logs", sales_logs_current?(path)) : nil, |
|
|
|
NavigationItem.new("Users", "/organisations/#{current_organisation_id}/users", subnav_users_path?(path)), |
|
|
|
NavigationItem.new("Users", "/organisations/#{current_organisation_id}/users", subnav_users_path?(path)), |
|
|
|
NavigationItem.new("About this organisation", "/organisations/#{current_organisation_id}", subnav_details_path?(path)), |
|
|
|
NavigationItem.new("About this organisation", "/organisations/#{current_organisation_id}", subnav_details_path?(path)), |
|
|
|
NavigationItem.new("Housing providers", housing_providers_organisation_path, subnav_housing_providers_path?(path)), |
|
|
|
NavigationItem.new("Housing providers", housing_providers_organisation_path, housing_providers_path?(path)), |
|
|
|
].compact |
|
|
|
].compact |
|
|
|
end |
|
|
|
end |
|
|
|
end |
|
|
|
end |
|
|
@ -82,10 +83,6 @@ private |
|
|
|
path == "/organisations" || path.include?("/organisations/") |
|
|
|
path == "/organisations" || path.include?("/organisations/") |
|
|
|
end |
|
|
|
end |
|
|
|
|
|
|
|
|
|
|
|
def subnav_housing_providers_path?(path) |
|
|
|
|
|
|
|
path.include?("/organisations") && path.include?("/housing-providers") |
|
|
|
|
|
|
|
end |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def subnav_supported_housing_schemes_path?(path) |
|
|
|
def subnav_supported_housing_schemes_path?(path) |
|
|
|
path.include?("/organisations") && path.include?("/schemes") || path.include?("/schemes/") |
|
|
|
path.include?("/organisations") && path.include?("/schemes") || path.include?("/schemes/") |
|
|
|
end |
|
|
|
end |
|
|
@ -106,6 +103,10 @@ private |
|
|
|
path.include?("/organisations") && path.include?("/details") |
|
|
|
path.include?("/organisations") && path.include?("/details") |
|
|
|
end |
|
|
|
end |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def housing_providers_path?(path) |
|
|
|
|
|
|
|
path.include?("/housing-providers") |
|
|
|
|
|
|
|
end |
|
|
|
|
|
|
|
|
|
|
|
def managing_agents_path?(path) |
|
|
|
def managing_agents_path?(path) |
|
|
|
path.include?("/managing-agents") |
|
|
|
path.include?("/managing-agents") |
|
|
|
end |
|
|
|
end |
|
|
|