Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Block help in whitehall #9707

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions app/helpers/admin/sidebar_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
27 changes: 27 additions & 0 deletions app/views/admin/editions/_landing_page_help.html.erb
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@

<div class="govspeak-help">
<h2 class="govuk-heading-l">Blocks</h2>

<%= render "govuk_publishing_components/components/details", {
title: "Action Link",
} do %>
<p class='govuk-body'>A wrapper around the action link component.</p>
<pre>
- type: action_link
text: "Learn more about our goals"
href: "/landing-page/goals"
</pre>
<% end %>

<%= render "govuk_publishing_components/components/details", {
title: "Big Number",
} do %>
<p class='govuk-body'>A wrapper around the Big number component</p<>>
<pre>
- type: big_number
number: £75m
label: amount of money that looks big</pre>
</pre>
<% end %>

</div>
2 changes: 1 addition & 1 deletion app/views/admin/editions/new.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,6 @@
</div>

<div class="govuk-grid-column-one-third">
<%= simple_formatting_sidebar hide_inline_attachments_help: [email protected]_inline_attachments?, show_attachments_tab_help: true %>
<%= simple_formatting_sidebar hide_inline_attachments_help: [email protected]_inline_attachments?, show_attachments_tab_help: true, show_landing_page_help: @edition.document.document.document_type == "LandingPage" %>
</div>
</div>
Loading