<% step_undefined = !defined? step or step.blank? %>

<div>
  <em>
    <%= t("projects.reports.elements.modals.step_contents_inner.instructions") %>
  </em>
</div>

<div class="checkbox-tree">
  <ul>
    <li>
      <%= form.check_box :step_all, label: t("projects.reports.elements.modals.step_contents_inner.check_all") %>
      <ul>

        <% if step_undefined or step.checklists.exists? %>
          <li>
            <%= form.check_box :step_checklists, label: t("projects.reports.elements.modals.step_contents_inner.checklists") %>
          </li>
        <% else %>
          <div>
            <em>
              <%= t("projects.reports.elements.modals.step_contents_inner.no_checklists") %>
            </em>
          </div>
        <% end %>

        <% if step_undefined or step.assets.exists? %>
          <li>
            <%= form.check_box :step_assets, label: t("projects.reports.elements.modals.step_contents_inner.assets") %>
          </li>
        <% else %>
          <div>
            <em>
              <%= t("projects.reports.elements.modals.step_contents_inner.no_assets") %>
            </em>
          </div>
        <% end %>

        <% if step_undefined or step.tables.exists? %>
          <li>
            <%= form.check_box :step_tables, label: t("projects.reports.elements.modals.step_contents_inner.tables") %>
          </li>
        <% else %>
          <div>
            <em>
              <%= t("projects.reports.elements.modals.step_contents_inner.no_tables") %>
            </em>
          </div>
        <% end %>

        <li>
          <%= form.check_box :step_comments, label: t("projects.reports.elements.modals.step_contents_inner.comments") %>
        </li>

      </ul>
    </li>
  </ul>
</div>
