From a36e06937f72470a88a7680f91b1eff4d7421904 Mon Sep 17 00:00:00 2001 From: Keith Lawrence Date: Thu, 5 Dec 2024 09:44:02 +0000 Subject: [PATCH] WIP --- app/helpers/admin/sidebar_helper.rb | 1 + .../editions/_landing_page_help.html.erb | 27 +++++++++++++++++++ app/views/admin/editions/new.html.erb | 2 +- 3 files changed, 29 insertions(+), 1 deletion(-) create mode 100644 app/views/admin/editions/_landing_page_help.html.erb diff --git a/app/helpers/admin/sidebar_helper.rb b/app/helpers/admin/sidebar_helper.rb index 351599c8f26..6950e3cfdac 100644 --- a/app/helpers/admin/sidebar_helper.rb +++ b/app/helpers/admin/sidebar_helper.rb @@ -2,6 +2,7 @@ module Admin::SidebarHelper def simple_formatting_sidebar(options = {}) sidebar_content = [] sidebar_content << render("admin/editions/govspeak_help", options) + sidebar_content << render("admin/editions/landing_page_help", options) if options[:show_landing_page_help] sidebar_content << render("admin/editions/style_guidance", options) raw sidebar_content.join("\n") end diff --git a/app/views/admin/editions/_landing_page_help.html.erb b/app/views/admin/editions/_landing_page_help.html.erb new file mode 100644 index 00000000000..d7cbeb3a0f4 --- /dev/null +++ b/app/views/admin/editions/_landing_page_help.html.erb @@ -0,0 +1,27 @@ + +
+

Blocks

+ + <%= render "govuk_publishing_components/components/details", { + title: "Action Link", + } do %> +

A wrapper around the action link component.

+
+      - type: action_link
+        text: "Learn more about our goals"
+        href: "/landing-page/goals"
+    
+ <% end %> + + <%= render "govuk_publishing_components/components/details", { + title: "Big Number", + } do %> +

A wrapper around the Big number component> +

+      - type: big_number
+        number: £75m
+        label: amount of money that looks big
+ + <% end %> + +
diff --git a/app/views/admin/editions/new.html.erb b/app/views/admin/editions/new.html.erb index b3447804887..df1ff5495ce 100644 --- a/app/views/admin/editions/new.html.erb +++ b/app/views/admin/editions/new.html.erb @@ -21,6 +21,6 @@
- <%= simple_formatting_sidebar hide_inline_attachments_help: !@edition.allows_inline_attachments?, show_attachments_tab_help: true %> + <%= simple_formatting_sidebar hide_inline_attachments_help: !@edition.allows_inline_attachments?, show_attachments_tab_help: true, show_landing_page_help: @edition.document.document.document_type == "LandingPage" %>