5 changed files with 65 additions and 20 deletions
@ -1,5 +0,0 @@ |
|||||||
class DuplicateLogService |
|
||||||
def is_log_duplicate? (log) |
|
||||||
return true if log.id == 3 |
|
||||||
end |
|
||||||
end |
|
||||||
@ -0,0 +1,13 @@ |
|||||||
|
<% if question.page.routed_to?(@log, current_user) %> |
||||||
|
<%= govuk_panel( |
||||||
|
classes: "app-panel--interruption", |
||||||
|
) do %> |
||||||
|
<p class="govuk-heading-l"><%= display_title_text(title_text, lettings_log) %></p> |
||||||
|
<% if informative_text.present? %> |
||||||
|
<p class="govuk-body-l"><%= display_informative_text(informative_text, lettings_log) %></p> |
||||||
|
<% end %> |
||||||
|
<% if question.hint_text.present? %> |
||||||
|
<p class="govuk-body-l"><%= question.hint_text&.html_safe %></p> |
||||||
|
<% end %> |
||||||
|
<% end %> |
||||||
|
<% end %> |
||||||
@ -0,0 +1,37 @@ |
|||||||
|
<%= govuk_summary_list do |summary_list| %> |
||||||
|
<% questions.each do |question| %> |
||||||
|
<% summary_list.row do |row| %> |
||||||
|
<% row.key { get_question_label(question) } %> |
||||||
|
|
||||||
|
<% row.value do %> |
||||||
|
<%= simple_format( |
||||||
|
get_answer_label(question, @log), |
||||||
|
wrapper_tag: "span", |
||||||
|
class: "govuk-!-margin-right-4", |
||||||
|
) %> |
||||||
|
|
||||||
|
<% extra_value = question.get_extra_check_answer_value(@log) %> |
||||||
|
|
||||||
|
<% if extra_value && question.answer_label(@log, current_user).present? %> |
||||||
|
<%= simple_format( |
||||||
|
extra_value, |
||||||
|
wrapper_tag: "span", |
||||||
|
class: "govuk-!-font-weight-regular app-!-colour-muted", |
||||||
|
) %> |
||||||
|
<% end %> |
||||||
|
|
||||||
|
<% question.get_inferred_answers(@log).each do |inferred_answer| %> |
||||||
|
<span class="govuk-!-font-weight-regular app-!-colour-muted"><%= inferred_answer %></span> |
||||||
|
<% end %> |
||||||
|
<% end %> |
||||||
|
|
||||||
|
<% if @log.collection_period_open_for_editing? %> |
||||||
|
<% row.action( |
||||||
|
text: question.action_text(@log), |
||||||
|
href: action_href(@log, question.page.id, referrer), |
||||||
|
visually_hidden_text: question.check_answer_label.to_s.downcase, |
||||||
|
) %> |
||||||
|
<% end %> |
||||||
|
<% end %> |
||||||
|
<% end %> |
||||||
|
<% end %> |
||||||
Loading…
Reference in new issue