diff --git a/app/views/lotteries/_service_form_callout.html.erb b/app/views/lotteries/_service_form_callout.html.erb new file mode 100644 index 000000000..b5bc7fbd1 --- /dev/null +++ b/app/views/lotteries/_service_form_callout.html.erb @@ -0,0 +1,13 @@ +<%# locals: (presenter:) %> + +<% if presenter.lottery.finished? && presenter.lottery.service_form.attached? %> + <%= render partial: "shared/callout_with_link", + locals: { + icon_name: "info-circle", + icon_color: "info", + callout_color: "info", + main_text: t("lotteries.show.callout_main_text"), + detail_paragraphs: t("lotteries.show.callout_detail_1"), + link: link_to("Learn more", docs_user_info_path, class: "btn btn-outline-primary") + } %> +<% end %> diff --git a/app/views/lotteries/show.html.erb b/app/views/lotteries/show.html.erb index 99adaf79c..7952318a8 100644 --- a/app/views/lotteries/show.html.erb +++ b/app/views/lotteries/show.html.erb @@ -64,6 +64,7 @@
<% case @presenter.display_style %> <% when "entrants" %> + <%= render partial: "service_form_callout", locals: { presenter: @presenter } %>

<%= "Lottery Entrants" %><%= " #{pluralize_with_delimiter(@presenter.lottery_entrants.count, 'total entrant')}" %>

@@ -130,17 +131,7 @@ <% end %> <% when "results" %> - <% if @presenter.lottery.finished? && @presenter.lottery.service_form.attached? %> - <%= render partial: "shared/callout_with_link", - locals: { - icon_name: "info-circle", - icon_color: "info", - callout_color: "info", - main_text: t(".callout_main_text"), - detail_paragraphs: t(".callout_detail_paragraph_1"), - link: link_to("Learn more", docs_user_info_path, class: "btn btn-outline-primary") - } %> - <% end %> + <%= render partial: "service_form_callout", locals: { presenter: @presenter } %>

Lottery Results<%= " Last updated #{time_ago_in_words(@presenter.lottery.updated_at)} ago" %>

diff --git a/config/locales/views.en.yml b/config/locales/views.en.yml index f884c3d6f..cdf4d3053 100644 --- a/config/locales/views.en.yml +++ b/config/locales/views.en.yml @@ -58,7 +58,7 @@ en: lotteries: show: callout_main_text: "Service form is now available for download" - callout_detail_paragraph_1: "For those accepted to the lottery or waitlisted, the service form is now available for download from your Manage Service page. When the form is complete with all signatures in place, you will upload the form from the same Manage Service page." + callout_detail_1: "For those accepted to the lottery or waitlisted, the service form is now available for download from your Manage Service page. When the form is complete with all signatures in place, you will upload the form from the same Manage Service page." people: show: