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

Loading…
Cancel
Save