Fix some pdf errors
Some checks failed
/ Run tests (push) Successful in 2m5s
/ Run system tests (push) Failing after 2m34s
/ Build, push and deploy image (push) Successful in 1m45s

This commit is contained in:
david 2024-11-24 11:03:44 +01:00
parent 650bec3f57
commit 83dd857776

View file

@ -77,9 +77,9 @@ module PdfDocuments
move_down 5 move_down 5
check.links.group_by(&:link_category).each do |cat, links| check.links.group_by(&:link_category).each do |cat, links|
rich_text(%Q( rich_text(%Q(
<b>#{cat.name}</b> <span>#{cat.name}</span>
<ul> <ul>
#{links.map{ "<li><link href='#{_1.url}'>#{_1.text}</link></li>" }.join() } #{links.map{ "<li><a href='#{_1.url}'>#{_1.text}</a></li>" }.join() }
</ul> </ul>
)) ))
end end
@ -157,8 +157,10 @@ module PdfDocuments
end end
heading4("Protokollnummer") heading4("Protokollnummer")
text(success_criterion.number) text(success_criterion.number)
safe_display(success_criterion.check.external_url) do
heading4("WCAG") heading4("WCAG")
text("<link href='#{success_criterion.check.external_url}'>#{success_criterion.check.external_number}</link>", inline_format: true) text("<link href='#{_1}'>#{success_criterion.check.external_number || _1}</link>", inline_format: true)
end
move_down(10) move_down(10)
end end
end end