Merge pull request #1220 from okriuchykhin/ok_SCI_2377

Add extend for task child elements in reports [SCI-2377]
This commit is contained in:
okriuchykhin 2018-06-19 14:41:48 +02:00 committed by GitHub
commit c70b06cc52
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
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