<%= t("projects.reports.elements.modals.project_contents.modules_tab") %>
<%= render partial: "reports/new/modal/module_contents_inner.html.erb", locals: { form: f } %>
@@ -69,9 +69,13 @@
if (nextUl.length && nextUl.is("ul.project-contents-list")) {
nextUl.find("input:checkbox").prop("checked", this.checked);
}
+ if (nextUl.length && nextUl.is("ul.experiment-contents-list")) {
+ nextUl.find("input:checkbox").prop("checked", this.checked);
+ }
});
projectAll.click(function() {
- var parentLists = $(this).parents("ul.project-contents-list");
+ var parentLists = $(this).parents("ul.project-contents-list, ul.experiment-contents-list");
+
if (parentLists.length) {
var prevEl = parentLists.prev();
if (prevEl.length && prevEl.is("div.checkbox")) {
diff --git a/app/views/reports/new/modal/_project_contents_inner.html.erb b/app/views/reports/new/modal/_project_contents_inner.html.erb
index 028713aeb..4d3ce9320 100644
--- a/app/views/reports/new/modal/_project_contents_inner.html.erb
+++ b/app/views/reports/new/modal/_project_contents_inner.html.erb
@@ -1,4 +1,3 @@
-<% modules_without_group = project.modules_without_group %>
@@ -6,36 +5,46 @@
-<% if project.my_modules.count > 0 %>
+<% if project.project_my_modules.count > 0 %>
<%= form.check_box :project, label: project.name, class: "project-all-cb" %>
- <% project.my_module_groups.each do |my_module_group| %>
+ <% project.experiments.each do |experiment| %>
-
- <%= form.check_box "module_group_#{my_module_group.id}", label: my_module_group.name, class: "project-all-cb" %>
- <% if my_module_group.my_modules.present? then %>
-
- <% my_module_group.ordered_modules.each do |my_module| %>
+ <%= form.check_box "experiment_#{experiment.id}", label: experiment.name, class: "project-all-cb" %>
+
+ <% experiment.my_module_groups.each do |my_module_group| %>
+ -
+ <%= form.check_box "module_group_#{my_module_group.id}", label: my_module_group.name, class: "project-all-cb" %>
+ <% if my_module_group.my_modules.present? then %>
+
+ <% my_module_group.ordered_modules.each do |my_module| %>
+ -
+ <%= form.check_box "modules[#{my_module.id}]", label: my_module.name %>
+
+ <% end %>
+
+ <% end %>
+
+ <% end %>
+
+
+
+
+ <% modules_without_group = experiment.modules_without_group %>
+ <% if modules_without_group.present? and modules_without_group.count > 0 %>
+ -
+ <%= form.check_box :no_module_group, label: t("projects.reports.elements.modals.project_contents_inner.no_module_group"), class: "project-all-cb" %>
+
+ <% modules_without_group.each do |my_module| %>
-
<%= form.check_box "modules[#{my_module.id}]", label: my_module.name %>
<% end %>
- <% end %>
-
+
+ <% end %>
<% end %>
- <% if modules_without_group.present? and modules_without_group.count > 0 %>
- -
- <%= form.check_box :no_module_group, label: t("projects.reports.elements.modals.project_contents_inner.no_module_group"), class: "project-all-cb" %>
-
- <% modules_without_group.each do |my_module| %>
- -
- <%= form.check_box "modules[#{my_module.id}]", label: my_module.name %>
-
- <% end %>
-
-
- <% end %>
<% else %>
@@ -43,4 +52,4 @@
<%= t("projects.reports.elements.modals.project_contents_inner.no_modules") %>
-<% end %>
\ No newline at end of file
+<% end %>