feat(piece_justificative): allow user to replace a PJ for dossier en_construction
This commit is contained in:
parent
93de4cf821
commit
4049240c2c
12 changed files with 108 additions and 14 deletions
|
@ -1,9 +1,11 @@
|
|||
.attachment.fr-upload-group{ { id: attachment ? dom_id(attachment, :edit) : nil, class: class_names("fr-mb-2w": !(as_multiple? && downloadable?)) }.compact }
|
||||
.attachment.fr-upload-group{ { id: attachment ? dom_id(attachment, :edit) : nil, class: class_names("fr-mb-2w": !(as_multiple? && downloadable?)) }.compact, **replace_controller_attributes }
|
||||
- if persisted?
|
||||
%div{ id: dom_id(attachment, :persisted_row) }
|
||||
.flex.flex-gap-2{ class: class_names("attachment-error": attachment.virus_scanner_error?) }
|
||||
- if user_can_destroy?
|
||||
= link_to(t('.delete'), destroy_attachment_path, **remove_button_options, class: "fr-btn fr-btn--tertiary fr-btn--sm fr-icon-delete-line", title: "Supprimer le fichier #{attachment.filename}")
|
||||
- elsif user_can_replace?
|
||||
= button_tag t('.replace'), **replace_button_options, class: "fr-btn fr-btn--tertiary fr-btn--sm", title: "Remplacer le fichier #{attachment.filename}"
|
||||
|
||||
.fr-py-1v
|
||||
- if downloadable?
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue