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

<% if experiment.my_modules.count > 0 %>
  <%= form.check_box :experiment, label: experiment.name, class: "experiment-all-cb" %>
  <ul class="no-style experiment-contents-list">
    <% experiment.my_module_groups.each do |my_module_group| %>
      <% if my_module_group.my_modules.present? then %>
          <% my_module_group.ordered_modules.each do |my_module| %>
            <li>
              <%= form.check_box "modules[#{my_module.id}]", label: my_module.name %>
            </li>
          <% end %>
      <% end %>
    <% end %>

      <!-- Tasks without groups -->
    <% modules_without_group = experiment.modules_without_group %>
    <% if modules_without_group.present? and modules_without_group.count > 0 %>
      <% modules_without_group.each do |my_module| %>
        <li>
          <%= form.check_box "modules[#{my_module.id}]", label: my_module.name %>
        </li>
      <% end %>
    <% end %>

  </ul>
<% else %>
  <div>
    <em>
      <%= t("projects.reports.elements.modals.experiment_contents_inner.no_modules") %>
    </em>
  </div>
<% end %>
