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

Render featured attachments directly #1709

Merged
merged 4 commits into from
Mar 27, 2020
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
21 changes: 0 additions & 21 deletions app/views/content_items/_publication_inline_body.html.erb

This file was deleted.

22 changes: 21 additions & 1 deletion app/views/content_items/publication.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,27 @@
<div class="govuk-grid-column-two-thirds responsive-bottom-margin">
<%= render 'components/important-metadata', items: @content_item.important_metadata %>
<div class="responsive-bottom-margin">
<%= render 'publication_inline_body' %>
<%= render 'govuk_publishing_components/components/heading',
text: t("publication.documents", count: 5), # This should always be pluralised.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe in another commit after the first commit, you could change this. The count: 5 feels weirdly arbitrary. Even 2 would be clearer!

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's tempting, but that means going through all 61 locale files and working out what to do with it. There's definitely a bigger problem with the use of I18n in this app, so I'd like to leave it for someone else to tackle.

id: "documents-title",
mobile_top_margin: true %>

<div aria-labelledby="documents-title">
<%= render 'govuk_publishing_components/components/govspeak',
content: @content_item.documents.html_safe,
direction: page_text_direction %>
</div>

<%= render 'govuk_publishing_components/components/heading',
text: t("publication.details"),
id: "details-title",
mobile_top_margin: true %>

<div aria-labelledby="details-title">
<%= render 'govuk_publishing_components/components/govspeak',
content: @content_item.details.html_safe,
direction: page_text_direction %>
</div>
</div>

<%= render 'components/published-dates', {
Expand Down