[fix #1897] Procedure: can delete a deliberation
This commit is contained in:
parent
0e690c90cc
commit
18ad227df5
4 changed files with 24 additions and 0 deletions
|
@ -217,6 +217,15 @@ class Admin::ProceduresController < AdminController
|
|||
render json: json_path_list
|
||||
end
|
||||
|
||||
def delete_deliberation
|
||||
procedure = Procedure.find(params[:id])
|
||||
|
||||
procedure.deliberation.purge_later
|
||||
|
||||
flash.notice = 'la délibération a bien été supprimée'
|
||||
redirect_to edit_admin_procedure_path(procedure)
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
def cloned_from_library?
|
||||
|
|
|
@ -35,6 +35,8 @@
|
|||
- else
|
||||
%a{ href: url_for(deliberation), target: '_blank' }
|
||||
= deliberation.filename.to_s
|
||||
= link_to 'supprimer', delete_deliberation_admin_procedure_path(@procedure),
|
||||
method: :delete
|
||||
%br
|
||||
Modifier :
|
||||
= f.file_field :deliberation,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue