mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2024-12-31 04:32:06 +08:00
Merge pull request #1220 from okriuchykhin/ok_SCI_2377
Add extend for task child elements in reports [SCI-2377]
This commit is contained in:
commit
c70b06cc52
2 changed files with 3 additions and 1 deletions
|
@ -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"
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in a new issue