From d3204e3c8afca6d9be9a066fa58da4a2d0fb044a Mon Sep 17 00:00:00 2001 From: Keith Lawrence Date: Tue, 24 Sep 2024 14:32:48 +0100 Subject: [PATCH] Add handling of for_static parameter - original behaviour was to always include wrapper class unless show_account_layout or custom_layout was present (custom layout is as of yet not used). Alter behaviour so that default is not to have the wrapper, and it's only included if for_static is true. --- .../components/_layout_for_public.html.erb | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/app/views/govuk_publishing_components/components/_layout_for_public.html.erb b/app/views/govuk_publishing_components/components/_layout_for_public.html.erb index 2c226f5caa..ed0969f24b 100644 --- a/app/views/govuk_publishing_components/components/_layout_for_public.html.erb +++ b/app/views/govuk_publishing_components/components/_layout_for_public.html.erb @@ -1,6 +1,7 @@ <% add_gem_component_stylesheet("layout-for-public") + for_static ||= false emergency_banner ||= nil full_width ||= false blue_bar ||= local_assigns.include?(:blue_bar) ? local_assigns[:blue_bar] : !full_width @@ -160,13 +161,15 @@ <% end %> <% elsif custom_layout %> <%= yield %> - <% else %> + <% elsif for_static %>
"> <%= yield :before_content %>
<%= yield %>
+ <% else %> + <%= yield %> <% end %> <% unless omit_feedback_form %>