Browse Source

feat: update locations tab breadcrumbs to show owning scheme

pull/2031/head
natdeanlewissoftwire 2 years ago
parent
commit
9111fa7536
  1. 12
      app/views/locations/index.html.erb

12
app/views/locations/index.html.erb

@ -2,10 +2,16 @@
<% title = format_title(@searched, @scheme.service_name, current_user, item_label, @pagy.count, nil) %>
<% content_for :title, title %>
<% if current_user.support? %>
<% content_for :breadcrumbs, govuk_breadcrumbs(breadcrumbs: {
"Schemes (#{@scheme.owning_organisation.name})" => schemes_organisation_path(@scheme.owning_organisation),
content_for(:title) => scheme_path(@scheme),
"Locations" => "",
}) %>
<% else %>
<% content_for :before_content do %>
<%= govuk_back_link(
href: "/schemes/#{@scheme.id}",
) %>
<%= govuk_back_link(href: "/schemes/#{@scheme.id}") %>
<% end %>
<% end %>
<%= render partial: "organisations/headings", locals: { main: @scheme.service_name, sub: nil } %>

Loading…
Cancel
Save