Browse Source

Only present next incomplete section link if such section exists

pull/279/head
Kat 3 years ago
parent
commit
2bf7999102
  1. 14
      app/views/case_logs/edit.html.erb

14
app/views/case_logs/edit.html.erb

@ -21,12 +21,14 @@
<% next_incomplete_section = get_next_incomplete_section(@case_log) %>
</p>
<p>
<a class="app-section-skip-link" href="#<%= next_incomplete_section.id %>"
data-controller="tasklist"
data-action="tasklist#addHighlight"
data-info=<%= next_incomplete_section.id %>>
Skip to next incomplete section: <%= next_incomplete_section.label %>
</a>
<% if next_incomplete_section.present? %>
<a class="app-section-skip-link" href="#<%= next_incomplete_section.id %>"
data-controller="tasklist"
data-action="tasklist#addHighlight"
data-info=<%= next_incomplete_section.id %>>
Skip to next incomplete section: <%= next_incomplete_section.label %>
</a>
<% end %>
</p>
<%= render "tasklist" %>
</div>

Loading…
Cancel
Save