Update condition for project content [SCI-5620]

This commit is contained in:
aignatov-bio 2021-04-14 10:24:58 +02:00
parent bccd474cc6
commit 85a13b7182

View file

@ -4,11 +4,7 @@
<div class="experiment-block"> <div class="experiment-block">
<span class="sci-checkbox-container"> <span class="sci-checkbox-container">
<input type="checkbox" value="<%= experiment.id %>" class="sci-checkbox report-experiment-checkbox" <input type="checkbox" value="<%= experiment.id %>" class="sci-checkbox report-experiment-checkbox"
<%= if report <%= 'checked' if !report || @project_contents[:experiments].include?(experiment.id)
'checked' if @project_contents[:experiments].include?(experiment.id)
else
'checked'
end
%>/> %>/>
<span class="sci-checkbox-label"></span> <span class="sci-checkbox-label"></span>
</span> </span>
@ -30,11 +26,7 @@
<li class="experiment-my-module"> <li class="experiment-my-module">
<span class="sci-checkbox-container"> <span class="sci-checkbox-container">
<input type="checkbox" value="<%= my_module.id %>" class="sci-checkbox report-my-module-checkbox" <input type="checkbox" value="<%= my_module.id %>" class="sci-checkbox report-my-module-checkbox"
<%= if report <%= 'checked' if !report || @project_contents[:my_modules].include?(my_module.id)
'checked' if @project_contents[:my_modules].include?(my_module.id)
else
'checked'
end
%>/> %>/>
<span class="sci-checkbox-label"></span> <span class="sci-checkbox-label"></span>
</span> </span>