feat(attachment): allow user to "view" a file without the complete download UI
This commit is contained in:
parent
7719ce1865
commit
7c5d27d8e9
3 changed files with 30 additions and 4 deletions
|
@ -9,7 +9,7 @@
|
|||
- if downloadable?
|
||||
= render Dsfr::DownloadComponent.new(attachment:)
|
||||
- else
|
||||
%span.attachment-filename.fr-mr-1w-= attachment.filename.to_s
|
||||
%span.attachment-filename.fr-mr-1w= link_to_if(viewable?, attachment.filename.to_s, helpers.url_for(attachment.blob), title: "Ouvrir le fichier #{attachment.filename.to_s}", **helpers.external_link_attributes)
|
||||
|
||||
= render Attachment::ProgressComponent.new(attachment: attachment)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue