scinote-web/app/services/reports/docx/draw_my_module_protocol.rb

18 lines
637 B
Ruby
Raw Normal View History

# frozen_string_literal: true
2019-09-17 16:50:01 +08:00
module Reports::Docx::DrawMyModuleProtocol
def draw_my_module_protocol(my_module)
protocol = my_module.protocol
return false if protocol.description.blank?
@docx.p I18n.t 'projects.reports.elements.module.protocol.user_time',
timestamp: I18n.l(protocol.created_at, format: :full)
@docx.hr
html = custom_auto_link(protocol.description, team: @report_team)
2020-10-30 19:55:30 +08:00
Reports::HtmlToWordConverter.new(@docx, { scinote_url: @scinote_url,
link_style: @link_style }).html_to_word_converter(html)
@docx.p
@docx.p
end
end