feat(announce): can destroy a note and add at the same date

This commit is contained in:
Colin Darie 2023-10-26 14:36:03 +02:00
parent 5df6997fa3
commit e49436aa5d
No known key found for this signature in database
GPG key ID: 8C76CADD40253590
8 changed files with 47 additions and 5 deletions

View file

@ -0,0 +1,4 @@
---
en:
delete: Delete this note
new: New note

View file

@ -0,0 +1,4 @@
---
fr:
delete: Supprimer cette note
new: Ajouter une note

View file

@ -40,4 +40,14 @@
.fr-fieldset__element
= f.submit "Valider", class: "fr-btn fr-btn--lg"
%ul.fr-btns-group.fr-btns-group--inline.fr-btns-group--icon-left
%li= f.button "Valider", class: "fr-btn fr-icon-check-line"
- if release_note.persisted?
%li= link_to t(".new"), new_super_admins_release_note_path(date: release_note.released_on), class: "fr-btn fr-btn--secondary fr-icon-add-line"
- if release_note.persisted?
%li
= link_to t('.delete'), super_admins_release_note_path(release_note),
class: "fr-btn fr-btn--secondary fr-icon-delete-line",
data: { method: :delete, confirm: "Supprimer cette note ?" }