Revert "Export de tous les dossier d'une démarche"
This commit is contained in:
parent
4f79c0315d
commit
d9a588b52e
32 changed files with 36 additions and 675 deletions
|
@ -213,6 +213,7 @@ 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")
|
||||
|
@ -238,6 +239,12 @@ 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