Skip to content

Commit

Permalink
Display an image credit with the lead image
Browse files Browse the repository at this point in the history
Content Items affected:

* Case Study
* Fatality Notice
* News Articles
* Speech
* Take Part
* World Location News Article

At the moment only the Content Publisher app supports image credits, so they will only be
displayed on news articles for the time being.
  • Loading branch information
leenagupte committed Dec 19, 2018
1 parent b0f2b1f commit 9cfd024
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 0 deletions.
1 change: 1 addition & 0 deletions app/views/content_items/case_study.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
<%= render 'components/figure',
src: @content_item.image["url"],
alt: @content_item.image["alt_text"],
credit: @content_item.image["credit"],
caption: @content_item.image["caption"] if @content_item.image %>

<%= render 'govuk_publishing_components/components/govspeak',
Expand Down
1 change: 1 addition & 0 deletions app/views/content_items/fatality_notice.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
<%= render 'components/figure',
src: @content_item.image["url"],
alt: @content_item.image["alt_text"],
credit: @content_item.image["credit"],
caption: @content_item.image["caption"] if @content_item.image %>
<%= render 'govuk_publishing_components/components/govspeak',
content: @content_item.body.html_safe,
Expand Down
1 change: 1 addition & 0 deletions app/views/content_items/news_article.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
<%= render 'components/figure',
src: @content_item.image["url"],
alt: @content_item.image["alt_text"],
credit: @content_item.image["credit"],
caption: @content_item.image["caption"] if @content_item.image %>
<%= render 'govuk_publishing_components/components/govspeak',
content: @content_item.body.html_safe,
Expand Down
1 change: 1 addition & 0 deletions app/views/content_items/speech.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
<%= render 'components/figure',
src: @content_item.image["url"],
alt: @content_item.image["alt_text"],
credit: @content_item.image["credit"],
caption: @content_item.image["caption"] if @content_item.image %>

<%= render 'govuk_publishing_components/components/govspeak',
Expand Down
1 change: 1 addition & 0 deletions app/views/content_items/take_part.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
<%= render 'components/figure',
src: @content_item.image["url"],
alt: @content_item.image["alt_text"],
credit: @content_item.image["credit"],
caption: @content_item.image["caption"] if @content_item.image %>

<%= render 'govuk_publishing_components/components/govspeak',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
<%= render 'components/figure',
src: @content_item.image["url"],
alt: @content_item.image["alt_text"],
credit: @content_item.image["credit"],
caption: @content_item.image["caption"] if @content_item.image %>

<%= render 'govuk_publishing_components/components/govspeak',
Expand Down

0 comments on commit 9cfd024

Please sign in to comment.