chore: add truncate option to show and download component

This commit is contained in:
Eric Leroy-Terquem 2024-04-08 10:13:05 +02:00
parent 7c6c3608c9
commit 29dea52a7e
No known key found for this signature in database
GPG key ID: ECE60B4C1FA2ABB3
5 changed files with 25 additions and 22 deletions

View file

@ -1,6 +1,6 @@
%div{ id: dom_id(attachment, :show), class: class_names("attachment-error": error?, "fr-mb-2w": !should_display_link?) }
- if should_display_link?
= render Dsfr::DownloadComponent.new(attachment: attachment, virus_not_analyzed: !attachment.virus_scanner.started?, new_tab: new_tab)
= render Dsfr::DownloadComponent.new(attachment: attachment, virus_not_analyzed: !attachment.virus_scanner.started?, new_tab: new_tab, truncate: truncate)
- else
.attachment-filename.fr-mb-1w.fr-mr-1w= attachment.filename.to_s