From 9db6fb2ef53bec38642cf8af312ba4ceafaaa899 Mon Sep 17 00:00:00 2001
From: Martin Artnik <85488244+artoscinote@users.noreply.github.com>
Date: Wed, 15 Nov 2023 09:23:38 +0100
Subject: [PATCH] Revert "Fix result settings for reports [SCI-9693]"
---
.../elements/_my_module_element.html.erb | 49 +++++++++----------
1 file changed, 23 insertions(+), 26 deletions(-)
diff --git a/app/views/reports/elements/_my_module_element.html.erb b/app/views/reports/elements/_my_module_element.html.erb
index e3504a250..5d91b2d0a 100644
--- a/app/views/reports/elements/_my_module_element.html.erb
+++ b/app/views/reports/elements/_my_module_element.html.erb
@@ -71,37 +71,34 @@
<%= t('projects.reports.elements.module.results') %>
+ <% end %>
- <% order_results_for_report(my_module.results, @settings.dig('task', 'result_order')).each do |result| %>
-
- <%= result.name.presence || I18n.t('projects.reports.unnamed') %>
- <% if result.archived? %>
- <%= t('search.index.archived') %>
- <% end %>
-
-
- <% result.result_orderable_elements.each do |element| %>
- <% if element.orderable_type == "ResultTable" && @settings.dig('task', 'table_results') %>
- <%= render partial: 'reports/elements/my_module_result_table_element', locals: { result: result, export_all: export_all, element: element} %>
- <% elsif element.orderable_type == "ResultText" && @settings.dig('task', 'text_results') %>
- <%= render partial: 'reports/elements/my_module_result_text_element', locals: { result: result, export_all: export_all, element: element } %>
- <% end %>
+ <% order_results_for_report(my_module.results, @settings.dig('task', 'result_order')).each do |result| %>
+
+ <%= result.name.presence || I18n.t('projects.reports.unnamed') %>
+ <% if result.archived? %>
+ <%= t('search.index.archived') %>
<% end %>
+
- <% if @settings.dig('task', 'file_results') %>
- <%= render partial: 'reports/elements/my_module_result_asset_element', locals: { result: result, report: report, export_all: export_all } %>
+ <% result.result_orderable_elements.each do |element| %>
+ <% if element.orderable_type == "ResultTable" %>
+ <%= render partial: 'reports/elements/my_module_result_table_element', locals: { result: result, export_all: export_all, element: element} %>
+ <% elsif element.orderable_type == "ResultText" %>
+ <%= render partial: 'reports/elements/my_module_result_text_element', locals: { result: result, export_all: export_all, element: element } %>
<% end %>
-
-
- <%= t('projects.reports.elements.result.user_time', user: result.user.full_name, timestamp: l(result.created_at, format: :full)) %>
-
-
-
- <% if @settings.dig('task', 'result_comments') %>
- <%= render partial: 'reports/elements/result_comments_element', locals: { result: result } %>
- <% end %>
-
<% end %>
+
+ <%= render partial: 'reports/elements/my_module_result_asset_element', locals: { result: result, report: report, export_all: export_all } %>
+
+ <%= t('projects.reports.elements.result.user_time', user: result.user.full_name, timestamp: l(result.created_at, format: :full)) %>
+
+
+
+ <% if @settings.dig('task', 'result_comments') %>
+ <%= render partial: 'reports/elements/result_comments_element', locals: { result: result } %>
+ <% end %>
+
<% end %>