Skip to content

Commit

Permalink
Design changes
Browse files Browse the repository at this point in the history
- Edit:
  - Increase depth of body field
  - Add rule above change note section
- Metatags:
  - remove headings from label/legend
  • Loading branch information
davidtrussler committed Nov 12, 2024
1 parent b78361c commit 2f67f6e
Show file tree
Hide file tree
Showing 3 changed files with 44 additions and 37 deletions.
5 changes: 5 additions & 0 deletions app/assets/stylesheets/editions.scss
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,8 @@
display: inline;
}
}

.edit_edition__change_note {
@include govuk-responsive-padding(4, "top");
border-top: 1px solid $govuk-border-colour;
}
73 changes: 38 additions & 35 deletions app/views/editions/secondary_nav_tabs/_edit.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -58,45 +58,48 @@
},
name: "edition[body]",
value: @resource.body,
rows: 14,
hint: ("Refer to #{link_to("Refer to the Govspeak guidance (opens in new tab)", "https://govspeak-preview.publishing.service.gov.uk/guide", target: "_blank", rel: "noopener", class: "govuk-link")}").html_safe,
} %>

<% if @resource.published_edition %>
<%= render "govuk_publishing_components/components/details", {
title: "Add a public change note",
} do %>
<%= render "govuk_publishing_components/components/radio", {
heading: "Add a public change note",
heading_level: 3,
heading_size: "m",
name: "edition[major_change]",
hint: "Telling users when published information has changed is important for transparency.",
items: [
{
hint_text: "A change note will be published on the page and emailed to users subscribed to email alerts. The ‘last updated’ date will change.",
text: "Yes - information has been added, updated or removed.",
checked: @resource.major_change,
bold: true,
value: true,
conditional: render("govuk_publishing_components/components/textarea", {
label: {
text: "Describe the change for users",
bold: true,
},
name: "edition[change_note]",
value: @resource.change_note,
hint: ("<p class=\"govuk-!-margin-0\">Tell users what has changed, where and why. Write in full sentences, leading with the most important words. For example, \"College A has been removed from the registered sponsors list because its licence has been suspended.\"</p><a href=\"https://www.gov.uk/guidance/content-design/writing-for-gov-uk#change-notes\" target=\"_blank\">Guidance on change notes (opens in a new tab)</a>").html_safe,
}),
},
{
value: false,
text: "No",
bold: true,
checked: !@resource.major_change,
},
],
} %>
<% end %>
<div class="edit_edition__change_note">
<%= render "govuk_publishing_components/components/details", {
title: "Add a public change note",
} do %>
<%= render "govuk_publishing_components/components/radio", {
heading: "Add a public change note",
heading_level: 3,
heading_size: "m",
name: "edition[major_change]",
hint: "Telling users when published information has changed is important for transparency.",
items: [
{
hint_text: "A change note will be published on the page and emailed to users subscribed to email alerts. The ‘last updated’ date will change.",
text: "Yes - information has been added, updated or removed.",
checked: @resource.major_change,
bold: true,
value: true,
conditional: render("govuk_publishing_components/components/textarea", {
label: {
text: "Describe the change for users",
bold: true,
},
name: "edition[change_note]",
value: @resource.change_note,
hint: ("<p class=\"govuk-!-margin-0\">Tell users what has changed, where and why. Write in full sentences, leading with the most important words. For example, \"College A has been removed from the registered sponsors list because its licence has been suspended.\"</p><a href=\"https://www.gov.uk/guidance/content-design/writing-for-gov-uk#change-notes\" target=\"_blank\">Guidance on change notes (opens in a new tab)</a>").html_safe,
}),
},
{
value: false,
text: "No",
bold: true,
checked: !@resource.major_change,
},
],
} %>
<% end %>
</div>
<% end %>
</div>

Expand Down
3 changes: 1 addition & 2 deletions app/views/editions/secondary_nav_tabs/_metadata.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,13 @@
hint: "If you change the slug of a published page, the old slug will automatically redirect to the new one.",
name: "artefact[slug]",
value: publication.slug,
heading_level: 3,
heading_size: "m",
} %>

<%= render "govuk_publishing_components/components/radio", {
heading: "Language",
name: "artefact[language]",
heading_level: 3,
heading_level: 0,
heading_size: "m",
inline: true,
items: [
Expand Down

0 comments on commit 2f67f6e

Please sign in to comment.