From 1d5c0fea615e2089a9e912fe50a0a9fed672d8fa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sen=C3=A9n=20Rodero=20Rodr=C3=ADguez?= Date: Wed, 6 Mar 2024 13:47:31 +0100 Subject: [PATCH] Include the cookies consent components in custom views --- .../custom/layout/footer_component.html.erb | 19 +++++++++---- app/views/custom/layouts/application.html.erb | 3 +++ .../custom/layout/footer_component_spec.rb | 27 +++++++++++++++++++ .../layout/footer_component_spec.rb | 4 +-- 4 files changed, 46 insertions(+), 7 deletions(-) create mode 100644 spec/components/custom/layout/footer_component_spec.rb diff --git a/app/components/custom/layout/footer_component.html.erb b/app/components/custom/layout/footer_component.html.erb index 486ff58c4414..66cb72346b51 100644 --- a/app/components/custom/layout/footer_component.html.erb +++ b/app/components/custom/layout/footer_component.html.erb @@ -17,11 +17,20 @@ <% end %>
- <%= link_to page_path("cookies") do %> - + <% if cookies_setup_page_enabled? %> + + + + <% else %> + <%= link_to page_path("cookies") do %> + + <% end %> <% end %>
diff --git a/app/views/custom/layouts/application.html.erb b/app/views/custom/layouts/application.html.erb index 1a2aa0256757..40699c613fc9 100644 --- a/app/views/custom/layouts/application.html.erb +++ b/app/views/custom/layouts/application.html.erb @@ -11,6 +11,7 @@ <%= content_for :social_media_meta_tags %> <%= raw setting["html.per_page_code_head"] %> + <%= render Cookies::Vendors::ScriptsComponent.new %> <%= raw setting["html.per_page_code_body"] %> @@ -27,6 +28,8 @@ + <%= render Layout::CookiesConsent::BannerComponent.new %> + <%= render Layout::CookiesConsent::SetupComponent.new %>