Browse Source

CLDC-2692: Remove final current page breadcrumbs

pull/2287/head
Rachael Booth 2 years ago
parent
commit
ab9b2423da
  1. 3
      app/helpers/review_helper.rb
  2. 3
      app/views/form/check_answers.html.erb
  3. 1
      app/views/locations/index.html.erb
  4. 3
      app/views/logs/edit.html.erb
  5. 1
      app/views/schemes/show.html.erb
  6. 1
      app/views/users/show.html.erb

3
app/helpers/review_helper.rb

@ -11,17 +11,14 @@ module ReviewHelper
end
def review_breadcrumbs(log)
class_name = log.class.model_name.human.downcase
if log.collection_closed_for_editing?
content_for :breadcrumbs, govuk_breadcrumbs(breadcrumbs: {
breadcrumb_logs_title(log, current_user) => breadcrumb_logs_link(log, current_user),
"Log #{log.id}" => "",
})
else
content_for :breadcrumbs, govuk_breadcrumbs(breadcrumbs: {
breadcrumb_logs_title(log, current_user) => breadcrumb_logs_link(log, current_user),
"Log #{log.id}" => url_for(log),
"Review #{class_name}" => "",
})
end
end

3
app/views/form/check_answers.html.erb

@ -1,8 +1,7 @@
<% content_for :title, "#{subsection.id.humanize} - Check your answers" %>
<% content_for :breadcrumbs, govuk_breadcrumbs(breadcrumbs: {
breadcrumb_logs_title(@log, current_user) => breadcrumb_logs_link(@log, current_user),
"Log #{@log.id}" => url_for(@log),
subsection.label => "",
"Log #{@log.id}" => url_for(@log)
}) %>
<div class="govuk-grid-row">

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

@ -6,7 +6,6 @@
<% 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 %>

3
app/views/logs/edit.html.erb

@ -1,7 +1,6 @@
<% content_for :title, "Log #{@log.id}" %>
<% content_for :breadcrumbs, govuk_breadcrumbs(breadcrumbs: {
breadcrumb_logs_title(@log, current_user) => breadcrumb_logs_link(@log, current_user),
content_for(:title) => "",
breadcrumb_logs_title(@log, current_user) => breadcrumb_logs_link(@log, current_user)
}) %>
<div class="govuk-grid-row">

1
app/views/schemes/show.html.erb

@ -4,7 +4,6 @@
<% if current_user.support? %>
<% content_for :breadcrumbs, govuk_breadcrumbs(breadcrumbs: {
"Schemes (#{@scheme.owning_organisation.name})" => schemes_organisation_path(@scheme.owning_organisation),
content_for(:title) => "",
}) %>
<% else %>
<% content_for :before_content do %>

1
app/views/users/show.html.erb

@ -3,7 +3,6 @@
<% if current_user.support? %>
<% content_for :breadcrumbs, govuk_breadcrumbs(breadcrumbs: {
"Users (#{@user.organisation.name})" => users_organisation_path(@user.organisation),
content_for(:title) => "",
}) %>
<% else %>
<% content_for :before_content do %>

Loading…
Cancel
Save