Hide other delete links when the demarche has not been persisted

This commit is contained in:
gregoirenovel 2018-10-16 18:18:31 +02:00
parent 2c44754981
commit f8b1bc96bb

View file

@ -59,8 +59,8 @@
- else
%a{ href: url_for(deliberation), target: '_blank' }
= deliberation.filename.to_s
= link_to 'supprimer', delete_deliberation_admin_procedure_path(@procedure),
method: :delete
- if @procedure.persisted?
= link_to 'supprimer', delete_deliberation_admin_procedure_path(@procedure), method: :delete
%br
Modifier :
= f.file_field :deliberation,
@ -75,9 +75,9 @@
- else
%a{ href: url_for(notice), target: '_blank' }
= notice.filename.to_s
\-
= link_to 'supprimer', delete_notice_admin_procedure_path(@procedure),
method: :delete
- if @procedure.persisted?
\-
= link_to 'supprimer', delete_notice_admin_procedure_path(@procedure), method: :delete
%br
Modifier :
= f.file_field :notice,