Skip to content

Commit

Permalink
Use full layout for failures
Browse files Browse the repository at this point in the history
  • Loading branch information
tonyheadford committed Oct 8, 2024
1 parent 1332ecd commit 307e9c7
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion app/controllers/migration/failures_controller.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
class Migration::FailuresController < ::AdminController
layout "migration"
layout "full"

def index
@migration_failures = MigrationFailure.where(data_migration_id: DataMigration.where(model: params[:model]).select(:id))
Expand Down
6 changes: 3 additions & 3 deletions app/helpers/application_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,14 @@ def page_data(title:, header: nil, header_size: "l", error: false, backlink_href

return { page_title: } if header == false

backlink = govuk_back_link(href: backlink_href) unless backlink_href.nil?
backlink_or_breadcrumb = govuk_back_link(href: backlink_href) unless backlink_href.nil?

content_for(:backlink) { backlink }
content_for(:backlink_or_breadcrumb) { backlink_or_breadcrumb }

page_header = tag.h1(header || title, class: "govuk-heading-#{header_size}")

content_for(:page_header) { page_header }

{ page_title:, backlink:, page_header: }
{ page_title:, backlink_or_breadcrumb:, page_header: }
end
end
1 change: 1 addition & 0 deletions app/views/layouts/application.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@

<div class="govuk-width-container">
<%= environment_specific_phase_banner %>
<%= yield(:backlink_or_breadcrumb) %>

<main class="govuk-main-wrapper" id="main-content" role="main">
<div class="govuk-grid-row">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,17 +13,16 @@

<div class="govuk-width-container">
<%= environment_specific_phase_banner %>
<%= yield(:backlink_or_breadcrumb) %>

<main class="govuk-main-wrapper" id="main-content" role="main">
<div class="govuk-grid-row">
<div class="govuk-grid-column-full">
<%= yield(:backlink) %>
<div class="govuk-grid-column-two-thirds">
<%= yield(:page_header) %>
<%= yield %>
</div>
</div>

<%= yield %>
</main>
</div>

Expand Down

0 comments on commit 307e9c7

Please sign in to comment.