Skip to content

Commit

Permalink
Use the Lead paragraph component from the gem
Browse files Browse the repository at this point in the history
  • Loading branch information
tijmenb committed Jun 1, 2018
1 parent 2079044 commit a84d275
Show file tree
Hide file tree
Showing 16 changed files with 16 additions and 20 deletions.
2 changes: 1 addition & 1 deletion app/views/content_items/case_study.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
</div>
<%= render 'shared/translations' %>
<div class="column-two-thirds">
<%= render 'govuk_component/lead_paragraph', text: @content_item.description %>
<%= render 'govuk_publishing_components/components/lead_paragraph', text: @content_item.description %>
</div>
</div>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
</div>
<%= render 'shared/translations' %>
<div class="column-two-thirds">
<%= render 'govuk_component/lead_paragraph', text: @content_item.description %>
<%= render 'govuk_publishing_components/components/lead_paragraph', text: @content_item.description %>
<%= render 'components/notice', @content_item.withdrawal_notice_component %>
</div>
</div>
Expand Down
2 changes: 1 addition & 1 deletion app/views/content_items/detailed_guide.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
</div>
<%= render 'shared/translations' %>
<div class="column-two-thirds">
<%= render 'govuk_component/lead_paragraph', text: @content_item.description %>
<%= render 'govuk_publishing_components/components/lead_paragraph', text: @content_item.description %>
</div>
</div>

Expand Down
2 changes: 1 addition & 1 deletion app/views/content_items/document_collection.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
</div>
<%= render 'shared/translations', content_item: @content_item %>
<div class="column-two-thirds">
<%= render 'govuk_component/lead_paragraph', text: @content_item.description %>
<%= render 'govuk_publishing_components/components/lead_paragraph', text: @content_item.description %>
<%= render 'components/notice', @content_item.withdrawal_notice_component %>
<%= render 'shared/history_notice', content_item: @content_item %>
</div>
Expand Down
2 changes: 1 addition & 1 deletion app/views/content_items/fatality_notice.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
</div>
<%= render 'shared/translations' %>
<div class="column-two-thirds">
<%= render 'govuk_component/lead_paragraph', text: @content_item.description %>
<%= render 'govuk_publishing_components/components/lead_paragraph', text: @content_item.description %>
</div>
</div>

Expand Down
2 changes: 1 addition & 1 deletion app/views/content_items/news_article.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
</div>
<%= render 'shared/translations' %>
<div class="column-two-thirds">
<%= render 'govuk_component/lead_paragraph', text: @content_item.description %>
<%= render 'govuk_publishing_components/components/lead_paragraph', text: @content_item.description %>
</div>
</div>

Expand Down
2 changes: 1 addition & 1 deletion app/views/content_items/publication.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
<%= render 'shared/translations' %>

<div class="column-two-thirds">
<%= render 'govuk_component/lead_paragraph', text: @content_item.description %>
<%= render 'govuk_publishing_components/components/lead_paragraph', text: @content_item.description %>
</div>
</div>

Expand Down
2 changes: 1 addition & 1 deletion app/views/content_items/specialist_document.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
</div>
<%= render 'shared/translations' %>
<div class="column-two-thirds">
<%= render 'govuk_component/lead_paragraph', text: @content_item.description %>
<%= render 'govuk_publishing_components/components/lead_paragraph', text: @content_item.description %>
</div>
</div>

Expand Down
2 changes: 1 addition & 1 deletion app/views/content_items/speech.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
</div>
<%= render 'shared/translations' %>
<div class="column-two-thirds">
<%= render 'govuk_component/lead_paragraph', text: @content_item.description %>
<%= render 'govuk_publishing_components/components/lead_paragraph', text: @content_item.description %>
</div>
</div>

Expand Down
2 changes: 1 addition & 1 deletion app/views/content_items/statistical_data_set.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
</div>
<%= render 'shared/translations', content_item: @content_item %>
<div class="column-two-thirds">
<%= render 'govuk_component/lead_paragraph', text: @content_item.description %>
<%= render 'govuk_publishing_components/components/lead_paragraph', text: @content_item.description %>
<%= render 'components/notice', @content_item.withdrawal_notice_component %>
<%= render 'shared/history_notice', content_item: @content_item %>
</div>
Expand Down
2 changes: 1 addition & 1 deletion app/views/content_items/statistics_announcement.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<div class="grid-row">
<div class="column-two-thirds">
<%= render 'govuk_component/title', @content_item.title_and_context %>
<%= render 'govuk_component/lead_paragraph', text: @content_item.description %>
<%= render 'govuk_publishing_components/components/lead_paragraph', text: @content_item.description %>
</div>
</div>

Expand Down
2 changes: 1 addition & 1 deletion app/views/content_items/take_part.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<div class="grid-row">
<div class="column-two-thirds">
<%= render 'govuk_component/title', @content_item.title_and_context %>
<%= render 'govuk_component/lead_paragraph', text: @content_item.description %>
<%= render 'govuk_publishing_components/components/lead_paragraph', text: @content_item.description %>
</div>

<%= render 'shared/translations' %>
Expand Down
2 changes: 1 addition & 1 deletion app/views/content_items/topical_event_about_page.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

<div class="grid-row">
<div class="column-two-thirds">
<%= render 'govuk_component/lead_paragraph', text: @content_item.description %>
<%= render 'govuk_publishing_components/components/lead_paragraph', text: @content_item.description %>
</div>
</div>

Expand Down
2 changes: 1 addition & 1 deletion app/views/content_items/working_group.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
</div>
<%= render 'shared/translations' %>
<div class="column-two-thirds">
<%= render 'govuk_component/lead_paragraph', text: @content_item.description %>
<%= render 'govuk_publishing_components/components/lead_paragraph', text: @content_item.description %>
<%= render 'components/contents-list-with-body', contents: @content_item.contents do %>
<%= render 'govuk_component/govspeak',
content: "#{@content_item.body} #{@additional_body}",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
</div>
<%= render 'shared/translations' %>
<div class="column-two-thirds">
<%= render 'govuk_component/lead_paragraph', text: @content_item.description %>
<%= render 'govuk_publishing_components/components/lead_paragraph', text: @content_item.description %>
</div>
</div>

Expand Down
6 changes: 1 addition & 5 deletions test/integration/fatality_notice_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,7 @@ class FatalityNoticeTest < ActionDispatch::IntegrationTest
"Field of operation": { "Zululand": "/government/fields-of-operation/zululand" }
)

assert_component_parameter(
"lead_paragraph",
"text",
"It is with great sadness that the Ministry of Defence must confirm that Sir George Pomeroy Colley, died in battle in Zululand on 27 February 1881."
)
assert page.has_content?("It is with great sadness that the Ministry of Defence must confirm that Sir George Pomeroy Colley, died in battle")

assert(
page.has_css?("img[src*=ministry-of-defence-crest][alt='Ministry of Defence crest']"),
Expand Down

0 comments on commit a84d275

Please sign in to comment.