scinote-web/app/views/reports/wizard/_third_step.html.erb

200 lines
9.8 KiB
Text
Raw Normal View History

2021-04-07 22:14:52 +08:00
<div class="task-contents-container">
<div class="title">
<%= t("projects.reports.wizard.third_step.title") %>
</div>
<div class="select-all-container">
<span class="sci-checkbox-container">
2021-04-08 23:40:16 +08:00
<input type="checkbox" class="sci-checkbox select-all-task-contents"/>
2021-04-07 22:14:52 +08:00
<span class="sci-checkbox-label"></span>
</span>
<%= t("projects.reports.wizard.third_step.select_all") %>
</div>
<div class="divider"></div>
2021-04-08 23:40:16 +08:00
<ul class="report-task-settings">
2021-04-07 22:14:52 +08:00
<li class="content-element">
<i class="fas fa-caret-down " data-toggle="collapse" href="#protocolContents" aria-expanded="false"></i>
<span class="content-element-title">
<%= t("projects.reports.wizard.third_step.task_protocol") %>
</span>
<ul class="protocol-contents collapse in" id="protocolContents">
<li>
<span class="sci-checkbox-container">
<input type="checkbox" class="sci-checkbox protocol-setting" value="description" <%= 'checked' if report.settings.dig(:task, :protocol, :description) %>/>
2021-04-07 22:14:52 +08:00
<span class="sci-checkbox-label"></span>
</span>
<%= t("projects.reports.wizard.third_step.protocol_description") %>
<div class="divider"></div>
</li>
<li>
<span class="sci-checkbox-container">
2021-04-08 23:40:16 +08:00
<input type="checkbox" class="sci-checkbox protocol-steps-checkbox" value="protocol_steps"/>
2021-04-07 22:14:52 +08:00
<span class="sci-checkbox-label"></span>
</span>
<%= t("projects.reports.wizard.third_step.protocol_step") %>
<div class="divider"></div>
2021-04-08 23:40:16 +08:00
<ul class="step-contents report-protocol-settings">
<% %i(completed_steps uncompleted_steps step_texts step_checklists step_files step_tables step_well_plates step_comments).each do |step_content| %>
2021-04-07 22:14:52 +08:00
<li>
<span class="sci-checkbox-container">
<input type="checkbox" class="sci-checkbox protocol-setting" value="<%= step_content %>" <%= 'checked' if report.settings.dig(:task, :protocol, step_content) %> />
2021-04-07 22:14:52 +08:00
<span class="sci-checkbox-label"></span>
</span>
<%= t("projects.reports.wizard.third_step.#{step_content}") %>
<div class="divider"></div>
</li>
<% end %>
</ul>
</li>
</ul>
</li>
<div class="divider"></div>
<li class="content-element">
<i class="fas fa-caret-down " data-toggle="collapse" href="#repositoriesContents" aria-expanded="false"></i>
<span class="content-element-title">
<%= t("projects.reports.wizard.third_step.assigned_items") %>
</span><br>
<span class="repositories-items-description">
<i class="fas fa-info-circle"></i>
<%= t("projects.reports.wizard.third_step.assigned_items_description") %>
</span>
<ul class="collapse in" id="repositoriesContents">
<li>
<span class="sci-checkbox-container">
<input type="checkbox" class="sci-checkbox select-all-repositories"/>
<span class="sci-checkbox-label"></span>
</span>
<%= t("projects.reports.wizard.third_step.include_all_assigned_iitems") %>
<div class="divider"></div>
<ul class="repositories-contents">
<% @repositories.each do |repository| %>
<li>
<span class="sci-checkbox-container">
<input type="checkbox"
class="sci-checkbox repositories-setting"
value="<%= repository.is_a?(RepositorySnapshot) ? repository.parent_id : repository.id %>"
<%= 'checked' if report.new_record? ||
@project_contents[:repositories].include?(repository.id) ||
(repository.is_a?(Repository) && repository.repository_snapshots.exists?(id: @project_contents[:repositories])) %> />
<span class="sci-checkbox-label"></span>
</span>
<%= repository.name %>
<% if repository.archived? %>
<span class="archived">
<%= t("projects.reports.wizard.third_step.archived") %>
</span>
<% elsif repository.is_a?(RepositorySnapshot) %>
<span class="deleted">
<%= t("projects.reports.wizard.third_step.deleted") %>
</span>
<% end %>
<div class="divider"></div>
</li>
<% end %>
2021-04-07 22:14:52 +08:00
</ul>
</li>
</ul>
</li>
<div class="divider"></div>
2021-04-07 22:14:52 +08:00
<li class="content-element">
<i class="fas fa-caret-down " data-toggle="collapse" href="#resultContents" aria-expanded="false"></i>
<span class="content-element-title">
<%= t("projects.reports.wizard.third_step.results") %>
</span>
<ul class="result-contents collapse in" id="resultContents">
<li>
<div class="all-results-container">
<span class="sci-checkbox-container">
2021-04-08 23:40:16 +08:00
<input type="checkbox" class="sci-checkbox all-results-checkbox" value="all_results"/>
2021-04-07 22:14:52 +08:00
<span class="sci-checkbox-label"></span>
</span>
<span>
<%= t("projects.reports.wizard.third_step.all_results") %>
<div class="results-order-contaner">
<label>
<%= t("projects.reports.wizard.third_step.order_results") %>
</label>
<%= select_tag :taskResultsOrder,
options_for_select([
[t('projects.reports.wizard.third_step.atoz'), 'atoz'],
[t('projects.reports.wizard.third_step.ztoa'), 'ztoa'],
[t('projects.reports.wizard.third_step.old'), 'old'],
[t('projects.reports.wizard.third_step.new'), 'new'],
[t('projects.reports.wizard.third_step.old_updated'), 'old_updated'],
[t('projects.reports.wizard.third_step.new_updated'), 'new_updated']
], selected: report.settings.dig(:task, :result_order)),
class: 'order-results' %>
2021-04-07 22:14:52 +08:00
</div>
</span>
</div>
<div class="divider"></div>
2021-04-08 23:40:16 +08:00
<ul class="results-type-contents report-result-settings">
2021-04-07 22:14:52 +08:00
<li>
<div class="file-result-title-container">
<span class="sci-checkbox-container">
<input type="checkbox" class="sci-checkbox task-setting" value="file_results" <%= 'checked' if report.settings.dig(:task, :file_results) %>/>
2021-04-07 22:14:52 +08:00
<span class="sci-checkbox-label"></span>
</span>
<span>
<%= t("projects.reports.wizard.third_step.file_results") %>
<div class="include-pages-container">
<span class="sci-checkbox-container">
<input type="checkbox" class="sci-checkbox task-setting skip-select-all" value="file_results_previews" <%= 'checked' if report.settings.dig(:task, :file_results_previews) %>/>
2021-04-07 22:14:52 +08:00
<span class="sci-checkbox-label"></span>
</span>
<%= t("projects.reports.wizard.third_step.insert_pages_from_pdf") %><br>
<i class="fas fa-exclamation-triangle"></i>
<%= t("projects.reports.wizard.third_step.pdf_warning") %>
</div>
</span>
</div>
<div class="divider"></div>
</li>
<li>
<span class="sci-checkbox-container">
<input type="checkbox" class="sci-checkbox task-setting " value="table_results" <%= 'checked' if report.settings.dig(:task, :table_results) %>/>
2021-04-07 22:14:52 +08:00
<span class="sci-checkbox-label"></span>
</span>
<%= t("projects.reports.wizard.third_step.table_results") %>
<div class="divider"></div>
</li>
<li>
<span class="sci-checkbox-container">
<input type="checkbox" class="sci-checkbox task-setting" value="text_results" <%= 'checked' if report.settings.dig(:task, :text_results) %>/>
2021-04-07 22:14:52 +08:00
<span class="sci-checkbox-label"></span>
</span>
<%= t("projects.reports.wizard.third_step.text_results") %>
<div class="divider"></div>
</li>
</ul>
</li>
<li>
<span class="sci-checkbox-container">
<input type="checkbox" class="sci-checkbox task-setting" value="result_comments" <%= 'checked' if report.settings.dig(:task, :result_comments) %>/>
2021-04-07 22:14:52 +08:00
<span class="sci-checkbox-label"></span>
</span>
<%= t("projects.reports.wizard.third_step.results_comments") %>
2021-05-25 19:14:57 +08:00
<div class="divider"></div>
2021-04-07 22:14:52 +08:00
</li>
</ul>
<div class="divider"></div>
</li>
<li class="content-element">
<i class="fas fa-caret-down " data-toggle="collapse" href="#additionalContents" aria-expanded="false"></i>
<span class="content-element-title">
<%= t("projects.reports.wizard.third_step.additional_content") %>
</span>
<ul class="additional-contents collapse in" id="additionalContents">
<li>
<div class="select-all-container">
<span class="sci-checkbox-container">
<input type="checkbox" class="sci-checkbox task-setting" value="activities" <%= 'checked' if report.settings.dig(:task, :activities) %>/>
2021-04-07 22:14:52 +08:00
<span class="sci-checkbox-label"></span>
</span>
<%= t("projects.reports.wizard.third_step.task_activity") %>
<div class="divider"></div>
</div>
</li>
</ul>
</ul>
</div>