|
|
|
<ol class="app-task-list govuk-!-margin-top-8">
|
|
|
|
<% @case_log.form.sections.map do |section| %>
|
|
|
|
<li>
|
|
|
|
<h2 class="app-task-list__section-heading">
|
|
|
|
<%= section.label %>
|
|
|
|
</h2>
|
|
|
|
<% if section.description %>
|
|
|
|
<p class="govuk-body"><%= section.description.html_safe %></p>
|
|
|
|
<% end %>
|
|
|
|
<ul class="app-task-list__items">
|
|
|
|
<% section.subsections.map do |subsection| %>
|
|
|
|
<% subsection_status = subsection.status(@case_log) %>
|
|
|
|
<li class="app-task-list__item">
|
|
|
|
<span class="app-task-list__task-name" id="<%= subsection.id.dasherize %>">
|
|
|
|
<%= subsection_link(subsection, @case_log, current_user) %>
|
|
|
|
</span>
|
|
|
|
<%= status_tag(subsection_status, "app-task-list__tag") %>
|
|
|
|
</li>
|
|
|
|
<% end %>
|
|
|
|
</ul>
|
|
|
|
</li>
|
|
|
|
<% end %>
|
|
|
|
</ol>
|