Skip to content

Commit b2784ec

Browse files
committed
Replace published dates with metadata
- the published dates component is being retired, as it duplicates functionality of the metadata component - replace all published dates components with metadata components, and update options (names of options differ between the two components)
1 parent 215ef62 commit b2784ec

10 files changed

Lines changed: 39 additions & 40 deletions

File tree

app/views/case_study/show.html.erb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,10 +43,10 @@
4343
<% end %>
4444
</div>
4545

46-
<%= render "govuk_publishing_components/components/published_dates", {
47-
published: display_date(content_item.first_public_at),
46+
<%= render "govuk_publishing_components/components/metadata", {
47+
first_published: display_date(content_item.first_public_at),
4848
last_updated: display_date(content_item.updated),
49-
history: formatted_history(content_item.history),
49+
page_history: formatted_history(content_item.history),
5050
} %>
5151
</div>
5252
</div>

app/views/document_collection/show.html.erb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -75,10 +75,10 @@
7575
</div>
7676

7777
<div class="responsive-bottom-margin">
78-
<%= render "govuk_publishing_components/components/published_dates", {
79-
published: display_date(content_item.initial_publication_date),
78+
<%= render "govuk_publishing_components/components/metadata", {
79+
first_published: display_date(content_item.initial_publication_date),
8080
last_updated: display_date(content_item.updated),
81-
history: formatted_history(content_item.history),
81+
page_history: formatted_history(content_item.history),
8282
} %>
8383
</div>
8484
<% end %>

app/views/fatality_notice/show.html.erb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,10 +49,10 @@
4949
<%= raw(content_item.body) %>
5050
<% end %>
5151
</div>
52-
<%= render "govuk_publishing_components/components/published_dates", {
53-
published: display_date(content_item.initial_publication_date),
52+
<%= render "govuk_publishing_components/components/metadata", {
53+
first_published: display_date(content_item.initial_publication_date),
5454
last_updated: display_date(content_item.updated),
55-
history: formatted_history(content_item.history),
55+
page_history: formatted_history(content_item.history),
5656
} %>
5757
</div>
5858
</div>

app/views/news_article/show.html.erb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,11 +51,11 @@
5151
title: t("components.share_links.share_this_page") %>
5252
</div>
5353

54-
<%= render "govuk_publishing_components/components/published_dates", {
54+
<%= render "govuk_publishing_components/components/metadata", {
5555
dir: page_text_direction,
56-
published: display_date(content_item.initial_publication_date),
56+
first_published: display_date(content_item.initial_publication_date),
5757
last_updated: display_date(content_item.updated),
58-
history: formatted_history(content_item.history),
58+
page_history: formatted_history(content_item.history),
5959
} %>
6060
</div>
6161
</div>

app/views/service_manual/service_manual_guide.html.erb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -60,10 +60,10 @@
6060
</div>
6161
<div class="govuk-grid-column-two-thirds">
6262
<%= render "govuk_publishing_components/components/govspeak", content: content_item.body.html_safe, margin_bottom: 8 %>
63-
<%= render "govuk_publishing_components/components/published_dates", {
64-
published: display_date(content_item.initial_publication_date),
63+
<%= render "govuk_publishing_components/components/metadata", {
64+
first_published: display_date(content_item.initial_publication_date),
6565
last_updated: display_date(content_item.updated),
66-
history: formatted_history(content_item.history),
66+
page_history: formatted_history(content_item.history),
6767
} %>
6868
</div>
6969
</div>

app/views/shared/_body_with_related_links.html.erb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,9 @@
2020
<% end %>
2121

2222
<% if @content_item.public_updated_at && @content_item.schema_name == "help_page" %>
23-
<%= render "govuk_publishing_components/components/published_dates", {
24-
last_updated: display_date(@content_item.public_updated_at),
25-
} %>
23+
<%= render "govuk_publishing_components/components/metadata", {
24+
last_updated: display_date(@content_item.public_updated_at),
25+
} %>
2626
<% end %>
2727
</div>
2828
</div>

app/views/shared/_published_dates_with_notification_button.html.erb

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,12 @@
22
<%= stylesheet_link_tag "views/_published-dates-button-group", media: "all" %>
33
<% end %>
44

5-
<%= render "govuk_publishing_components/components/published_dates", {
6-
published: display_date(content_item.initial_publication_date),
7-
last_updated: display_date(content_item.updated),
8-
history: formatted_history(content_item.history),
9-
margin_bottom: 5,
10-
} %>
5+
<%= render "govuk_publishing_components/components/metadata", {
6+
first_published: display_date(content_item.initial_publication_date),
7+
last_updated: display_date(content_item.updated),
8+
page_history: formatted_history(content_item.history),
9+
margin_bottom: 5,
10+
} %>
1111

1212
<div class="published-dates-button-group">
1313
<h2 class="govuk-visually-hidden">

app/views/specialist_document/show.html.erb

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -56,11 +56,11 @@
5656
</div>
5757

5858
<div class="responsive-bottom-margin">
59-
<%= render "govuk_publishing_components/components/published_dates", {
60-
published: display_date(content_item.initial_publication_date),
61-
last_updated: display_date(content_item.updated),
62-
history: formatted_history(content_item.history),
63-
} %>
59+
<%= render "govuk_publishing_components/components/metadata", {
60+
first_published: display_date(content_item.initial_publication_date),
61+
last_updated: display_date(content_item.updated),
62+
page_history: formatted_history(content_item.history),
63+
} %>
6464
</div>
6565

6666
<% if content_item_presenter.show_finder_link? %>

app/views/speech/show.html.erb

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -50,10 +50,10 @@
5050
<% end %>
5151
</div>
5252

53-
<%= render "govuk_publishing_components/components/published_dates", {
54-
published: display_date(content_item.initial_publication_date),
55-
last_updated: display_date(content_item.updated),
56-
history: formatted_history(content_item.history),
53+
<%= render "govuk_publishing_components/components/metadata", {
54+
first_published: display_date(content_item.initial_publication_date),
55+
last_updated: display_date(content_item.updated),
56+
page_history: formatted_history(content_item.history),
5757
} %>
5858
</div>
5959
</div>

app/views/statistical_data_set/show.html.erb

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -51,13 +51,12 @@
5151
} %>
5252
</div>
5353

54-
<div class="responsive-bottom-margin">
55-
<%= render "govuk_publishing_components/components/published_dates", {
56-
published: display_date(content_item.initial_publication_date),
57-
last_updated: display_date(content_item.updated),
58-
history: formatted_history(content_item.history),
59-
} %>
60-
</div>
54+
<%= render "govuk_publishing_components/components/metadata", {
55+
first_published: display_date(content_item.initial_publication_date),
56+
last_updated: display_date(content_item.updated),
57+
page_history: formatted_history(content_item.history),
58+
margin_bottom: 8,
59+
} %>
6160
<% end %>
6261
</div>
6362
<%= render "shared/sidebar_navigation" %>

0 commit comments

Comments
 (0)