Add extend for task child elements in reports [SCI-2377]

This commit is contained in:
Oleksii Kriuchykhin 2018-06-19 14:34:36 +02:00
parent 16bce8de60
commit c0232d9eb2
2 changed files with 3 additions and 1 deletions

View file

@ -33,7 +33,7 @@ module ReportsHelper
end
file_name = element.type_of
if element.type_of.in? %w(step result_asset result_table result_text)
if element.type_of.in? ReportExtends::MY_MODULE_CHILDREN_ELEMENTS
file_name = "my_module_#{element.type_of.singularize}"
end
view = "reports/elements/#{file_name}_element.html.erb"

View file

@ -125,6 +125,8 @@ module ReportExtends
project_header
step_comments)
MY_MODULE_CHILDREN_ELEMENTS = %w(step result_asset result_table result_text)
# path: app/models/report_element.rb
# method: set_element_reference