2022-03-09 10:25:48 +01:00
|
|
|
<% if @can_download_dossiers %>
|
2022-04-05 15:57:19 +02:00
|
|
|
<% if @statut.present? %>
|
|
|
|
<%= render_to_element('.dossiers-export', partial: "dossiers_export", locals: { procedure: @procedure, exports: @exports, statut: @statut, count: @dossiers_count }) %>
|
|
|
|
<% else %>
|
|
|
|
<%= render_to_element('.procedure-actions', partial: "download_dossiers", locals: { procedure: @procedure, exports: @exports }) %>
|
|
|
|
<% end %>
|
2022-03-09 10:25:48 +01:00
|
|
|
<% end %>
|
2020-01-29 12:16:38 +01:00
|
|
|
|
2022-04-05 15:57:19 +02:00
|
|
|
<% @exports.values.each do |exports| %>
|
|
|
|
<% if @statut.present? %>
|
|
|
|
<% export = exports[:statut][@statut] %>
|
|
|
|
<% if export && !export.ready? %>
|
|
|
|
<%= fire_event('export:update', { url: download_export_instructeur_procedure_path(@procedure, export_format: export.format, statut: export.statut, no_progress_notification: true) }.to_json) %>
|
|
|
|
<% end %>
|
|
|
|
<% else %>
|
|
|
|
<% exports[:time_span_type].values.each do |export| %>
|
|
|
|
<% if !export.ready? %>
|
|
|
|
<%= fire_event('export:update', { url: download_export_instructeur_procedure_path(@procedure, export_format: export.format, time_span_type: export.time_span_type, no_progress_notification: true) }.to_json) %>
|
|
|
|
<% end %>
|
2021-06-16 11:46:25 +02:00
|
|
|
<% end %>
|
2020-01-29 12:16:38 +01:00
|
|
|
<% end %>
|
|
|
|
<% end %>
|
|
|
|
|
2020-04-02 16:06:00 +02:00
|
|
|
<%= render_flash %>
|