mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2024-12-28 03:06:28 +08:00
SCI-4108 check if there are any checklist items before rendering the checklist
This commit is contained in:
parent
759b3acfe9
commit
72c158d3e2
1 changed files with 7 additions and 5 deletions
|
@ -21,11 +21,13 @@ module Reports::Docx::DrawStepChecklist
|
|||
text I18n.t('projects.reports.elements.step_checklist.user_time',
|
||||
timestamp: I18n.l(timestamp, format: :full)), color: color[:gray]
|
||||
end
|
||||
@docx.ul do
|
||||
items.each do |item|
|
||||
li do
|
||||
text SmartAnnotations::TagToText.new(user, team, item.text).text
|
||||
text " (#{I18n.t('projects.reports.elements.step_checklist.checked')})", color: '2dbe61' if item.checked
|
||||
if items.any?
|
||||
@docx.ul do
|
||||
items.each do |item|
|
||||
li do
|
||||
text SmartAnnotations::TagToText.new(user, team, item.text).text
|
||||
text " (#{I18n.t('projects.reports.elements.step_checklist.checked')})", color: '2dbe61' if item.checked
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue