Submit social housing lettings and sales data (CORE)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

29 lines
1.4 KiB

<ol class="app-task-list govuk-!-margin-top-8">
<% @log.form.sections.each do |section| %>
<% next unless section.displayed_in_tasklist?(@log) %>
<li>
<h2 class="app-task-list__section-heading">
<%= section.label %>
</h2>
<% if section.description %>
<p class="govuk-body"><%= section.description.html_safe %></p>
<% end %>
<%= govuk_task_list(id_prefix: "logs", classes: "app-task-list__items") do |task_list|
section.subsections.each do |subsection|
next unless subsection.displayed_in_tasklist?(@log) && (subsection.applicable_questions(@log).count.positive? || !subsection.enabled?(@log))
subsection_status = subsection.status(@log)
task_list.with_item(classes: "#{tasklist_link_class(subsection_status)} app-task-list__item") do |item|
item.with_title(text: subsection.label, href: subsection_href(subsection, @log, current_user), classes: "app-task-list__name-and-hint--my-modifier")
if status_tag(subsection_status, "app-task-list__tag").present?
item.with_status(text: status_tag(subsection_status), classes: "app-task-list__tag")
else
item.with_status(text: status_text(subsection_status), classes: "app-task-list__tag")
end
end
end
end %>
</li>
<% end %>
</ol>