Add context to delete button
This commit is contained in:
parent
c10bec342a
commit
95acc0adb6
1 changed files with 2 additions and 2 deletions
|
@ -6,7 +6,7 @@
|
|||
.flex.flex-gap-2{ class: class_names("attachment-error": attachment.virus_scanner_error?) }
|
||||
- if user_can_destroy?
|
||||
= render NestedForms::OwnedButtonComponent.new(formaction: destroy_attachment_path, http_method: :delete, opt: {class: "fr-btn fr-btn--tertiary fr-btn--sm fr-icon-delete-line", title: t(".delete_file", filename: attachment.filename)}) do
|
||||
= t('.delete')
|
||||
= t('.delete_file', filename: attachment.filename)
|
||||
|
||||
- if downloadable?(attachment)
|
||||
= render Dsfr::DownloadComponent.new(attachment: attachment)
|
||||
|
@ -24,7 +24,7 @@
|
|||
.flex.flex-gap-2{ class: class_names("attachment-error": attachment.virus_scanner_error?) }
|
||||
- if user_can_destroy?
|
||||
= render NestedForms::OwnedButtonComponent.new(formaction: destroy_attachment_path, http_method: :delete, opt: {class: "fr-btn fr-btn--tertiary fr-btn--sm fr-icon-delete-line", title: t(".delete_file", filename: attachment.filename)}) do
|
||||
= t('.delete')
|
||||
= t('.delete_file', filename: attachment.filename)
|
||||
|
||||
- if downloadable?(attachment)
|
||||
= render Dsfr::DownloadComponent.new(attachment:)
|
||||
|
|
Loading…
Reference in a new issue