Skip to content

Commit

Permalink
Fix ErbLint errors
Browse files Browse the repository at this point in the history
  • Loading branch information
davidtrussler committed Oct 25, 2024
1 parent 014b00e commit 6f9ee4d
Showing 1 changed file with 20 additions and 25 deletions.
45 changes: 20 additions & 25 deletions app/views/editions/secondary_nav_tabs/_edit.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -13,23 +13,23 @@
<div class="govuk-grid-column-two-thirds">
<%= render "govuk_publishing_components/components/input", {
label: {
text: "Title"
text: "Title",
},
id: "title",
name: "edition[title]",
value: @resource.title,
heading_size: "m",
error_items: errors_for(@edition.errors, "title".to_sym, use_full_message: false)
error_items: errors_for(@edition.errors, "title".to_sym, use_full_message: false),
} %>
<%= render "govuk_publishing_components/components/textarea", {
label: {
heading_size: "m",
text: "Meta tag description"
text: "Meta tag description",
},
name: "edition[overview]",
hint: "Some search engines will display this if they cannot find what they need in the main text",
value: @resource.overview
value: @resource.overview,
} %>
<%= render "govuk_publishing_components/components/radio", {
Expand All @@ -41,34 +41,29 @@
{
value: 1,
text: "Yes",
checked: @resource.in_beta
checked: @resource.in_beta,
},
{
value: 0,
text: "No",
checked: !@resource.in_beta
}
]
checked: !@resource.in_beta,
},
],
} %>
<%= render "govuk_publishing_components/components/textarea", {
label: {
heading_size: "m",
text: "Body"
text: "Body",
},
name: "edition[body]",
<<<<<<< HEAD
hint: sanitize("Refer to the <a href=\"#\" class=\"govuk-link\">Govspeak guidance (opens in new tab)</a>"),
value: @resource.body
=======
hint: ("Refer to #{link_to("Govspeak guidance (opens in new tab)", "https://govspeak-preview.publishing.service.gov.uk/guide", target: "_blank", class: "govuk-link")}").html_safe,
value: @resource.body,
>>>>>>> 30f3b787 (Add URLs to partial)
} %>
<% if @resource.published_edition %>
<%= render "govuk_publishing_components/components/details", {
title: "Add a public change note"
title: "Add a public change note",
} do %>
<%= render "govuk_publishing_components/components/radio", {
heading: "Add a public change note",
Expand All @@ -86,7 +81,7 @@
conditional: render("govuk_publishing_components/components/textarea", {
label: {
text: "Describe the change for users",
bold: true
bold: true,
},
name: "edition[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,
Expand All @@ -96,9 +91,9 @@
value: false,
text: "No",
bold: true,
checked: !resource.major_change
}
]
checked: !resource.major_change,
},
],
} %>
<% end %>
<% end %>
Expand All @@ -118,12 +113,12 @@
<%= render "govuk_publishing_components/components/list", {
items: [
(render "govuk_publishing_components/components/button", {
text: "Save",
margin_bottom: 3
} if current_user.has_editor_permissions?(@resource) && !@resource.retired_format?),
link_to("Preview (opens in new tab)", preview_edition_path(@resource), target: "_blank", class: "govuk-link")
]
(render "govuk_publishing_components/components/button", {
text: "Save",
margin_bottom: 3,
} if current_user.has_editor_permissions?(@resource) && !@resource.retired_format?),
link_to("Preview (opens in new tab)", preview_edition_path(@resource), target: "_blank", rel: "noopener", class: "govuk-link"),
],
} %>
</div>
<% end %>
Expand Down

0 comments on commit 6f9ee4d

Please sign in to comment.