2019-07-01 16:14:16 +08:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2019-09-17 16:50:01 +08:00
|
|
|
module Reports::Docx::DrawProjectHeader
|
2019-07-01 16:14:16 +08:00
|
|
|
def draw_project_header(subject)
|
2021-05-21 22:35:23 +08:00
|
|
|
project = subject.project
|
2020-07-21 20:11:42 +08:00
|
|
|
return unless project && can_read_project?(@user, project)
|
2019-07-01 16:14:16 +08:00
|
|
|
|
|
|
|
@docx.p I18n.t('projects.reports.elements.project_header.user_time',
|
|
|
|
timestamp: I18n.l(project.created_at, format: :full))
|
|
|
|
@docx.h1 I18n.t('projects.reports.elements.project_header.title', project: project.name)
|
|
|
|
@docx.hr do
|
|
|
|
size 18
|
|
|
|
spacing 24
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|