Revert "Revert "Export de tous les dossier d'une démarche""
This reverts commit d9a588b52e
.
This commit is contained in:
parent
533fa903bc
commit
f40d96fbd2
32 changed files with 675 additions and 36 deletions
|
@ -213,7 +213,6 @@ module Instructeurs
|
|||
def telecharger_pjs
|
||||
return head(:forbidden) if !dossier.attachments_downloadable?
|
||||
|
||||
generate_pdf_for_instructeur_export
|
||||
files = ActiveStorage::DownloadableFile.create_list_from_dossier(dossier)
|
||||
|
||||
zipline(files, "dossier-#{dossier.id}.zip")
|
||||
|
@ -239,12 +238,6 @@ module Instructeurs
|
|||
.find(params[:dossier_id])
|
||||
end
|
||||
|
||||
def generate_pdf_for_instructeur_export
|
||||
@include_infos_administration = true
|
||||
pdf = render_to_string(template: 'dossiers/show', formats: [:pdf])
|
||||
dossier.pdf_export_for_instructeur.attach(io: StringIO.open(pdf), filename: "export-#{dossier.id}.pdf", content_type: 'application/pdf')
|
||||
end
|
||||
|
||||
def commentaire_params
|
||||
params.require(:commentaire).permit(:body, :piece_jointe)
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue