<% @log.form.sections.each do |section| %> <% next unless section.displayed_in_tasklist?(@log) %>
  1. <%= section.label %>

    <% if section.description %>

    <%= section.description.html_safe %>

    <% 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 %>
  2. <% end %>