5 changed files with 63 additions and 33 deletions
@ -1,25 +1,37 @@
|
||||
<div class="check-answers-summary-list"> |
||||
<%= govuk_summary_list do |summary_list| %> |
||||
<% applicable_questions.each do |question| %> |
||||
<% summary_list.row do |row| %> |
||||
<% row.key { question.check_answer_label.to_s.presence || question.header.to_s } %> |
||||
<% row.value do %> |
||||
<span class="govuk-!-margin-right-4"><%= get_answer_label(question) %></span> |
||||
<% extra_value = question.get_extra_check_answer_value(case_log) %> |
||||
<% if extra_value %> |
||||
<span class="govuk-!-font-weight-regular app-!-colour-muted"><%= extra_value %></span> |
||||
<% end %> |
||||
<br> |
||||
<% question.get_inferred_answers(case_log).each do |inferred_answer| %> |
||||
<span class="govuk-!-font-weight-regular app-!-colour-muted"><%= inferred_answer %></span> |
||||
<div class="x-govuk-summary-card govuk-!-margin-bottom-6"> |
||||
<% if applicable_questions.first.check_answers_card_number != 0 %> |
||||
<div class="x-govuk-summary-card__header"> |
||||
<% if applicable_questions.first.check_answers_card_number == 1 %> |
||||
<h3 class="x-govuk-summary-card__title">Lead tenant</h3> |
||||
<% end %> |
||||
<% if applicable_questions.first.check_answers_card_number > 1 %> |
||||
<h3 class="x-govuk-summary-card__title">Person <%= applicable_questions.first.check_answers_card_number %></h3> |
||||
<% end %> |
||||
</div> |
||||
<% end %> |
||||
<div class="x-govuk-summary-card__body"> |
||||
<%= govuk_summary_list do |summary_list| %> |
||||
<% applicable_questions.each do |question| %> |
||||
<% summary_list.row do |row| %> |
||||
<% row.key { question.check_answer_label.to_s.presence || question.header.to_s } %> |
||||
<% row.value do %> |
||||
<span class="govuk-!-margin-right-4"><%= get_answer_label(question) %></span> |
||||
<% extra_value = question.get_extra_check_answer_value(case_log) %> |
||||
<% if extra_value %> |
||||
<span class="govuk-!-font-weight-regular app-!-colour-muted"><%= extra_value %></span> |
||||
<% end %> |
||||
<br> |
||||
<% question.get_inferred_answers(case_log).each do |inferred_answer| %> |
||||
<span class="govuk-!-font-weight-regular app-!-colour-muted"><%= inferred_answer %></span> |
||||
<% end %> |
||||
<% end %> |
||||
<% row.action( |
||||
text: question.action_text(case_log), |
||||
href: question.action_href(case_log, question.page.id), |
||||
visually_hidden_text: question.check_answer_label.to_s.downcase, |
||||
) %> |
||||
<% end %> |
||||
<% end %> |
||||
<% row.action( |
||||
text: question.action_text(case_log), |
||||
href: question.action_href(case_log, question.page.id), |
||||
visually_hidden_text: question.check_answer_label.to_s.downcase, |
||||
) %> |
||||
<% end %> |
||||
<% end %> |
||||
<% end %> |
||||
</div> |
||||
</div> |
||||
|
Loading…
Reference in new issue