Adding limit (200) for dossier exportation
This commit is contained in:
parent
0ac3c5fc86
commit
23b928f160
4 changed files with 13 additions and 6 deletions
5
Gemfile
5
Gemfile
|
@ -112,6 +112,10 @@ group :test do
|
|||
gem 'vcr'
|
||||
end
|
||||
|
||||
group :development do
|
||||
gem 'web-console', '~> 2.0'
|
||||
end
|
||||
|
||||
group :development, :test do
|
||||
# gem 'terminal-notifier'
|
||||
# gem 'terminal-notifier-guard'
|
||||
|
@ -121,7 +125,6 @@ group :development, :test do
|
|||
gem 'pry-byebug'
|
||||
|
||||
# Access an IRB console on exception pages or by using <%= console %> in views
|
||||
gem 'web-console', '~> 2.0'
|
||||
|
||||
# Spring speeds up development by keeping your application running in the background. Read more: https://github.com/rails/spring
|
||||
gem 'spring'
|
||||
|
|
|
@ -20,10 +20,10 @@ class Backoffice::DossiersController < Backoffice::DossiersListController
|
|||
|
||||
def download_dossiers_tps
|
||||
if procedure = Procedure.find_by(id: params[:procedure_id])
|
||||
dossiers = DossiersListGestionnaireService.new(current_gestionnaire, nil, procedure).filter_dossiers
|
||||
dossiers = dossiers_list_facade(param_liste).dossiers_to_display
|
||||
respond_with Dossier.export_full_generation(dossiers, request.format)
|
||||
else
|
||||
dossiers = DossiersListGestionnaireService.new(current_gestionnaire, nil, nil).filter_dossiers
|
||||
dossiers = dossiers_list_facade(param_liste).dossiers_to_display
|
||||
respond_to do |format|
|
||||
format.xlsx { render xlsx: dossiers }
|
||||
format.ods { render ods: dossiers }
|
||||
|
|
|
@ -6,9 +6,12 @@
|
|||
=t('dynamics.backoffice.title')
|
||||
|
||||
%div.dropdown.pull-right#download_menu
|
||||
%button.btn.btn-default.dropdown-toggle#dropdownDownloadMenu{ type: :button, 'data-toggle' => 'dropdown', 'aria-haspopup' => true, 'aria-expanded' => false}
|
||||
%i.fa.fa-download
|
||||
= t('dynamics.backoffice.download_all_dossiers')
|
||||
%button.btn.btn-success.dropdown-toggle#dropdownDownloadMenu{ type: :button, 'data-toggle' => 'dropdown', 'aria-haspopup' => true, 'aria-expanded' => false, class: ('disabled' if (@dossiers.count > 200)) }
|
||||
- if (@dossiers.count > 200)
|
||||
= t('dynamics.backoffice.limit_excess_download_all_dossiers')
|
||||
- else
|
||||
%i.fa.fa-download
|
||||
= t('dynamics.backoffice.download_all_dossiers')
|
||||
%span.caret
|
||||
%ul.dropdown-menu.dropdown-menu-right
|
||||
%li
|
||||
|
|
|
@ -13,6 +13,7 @@ fr:
|
|||
title: 'Gestion de colonnes affichées'
|
||||
description: 'Ce menu vous permet de choisir les différentes colonnes que vous souhaitez voir apparaître dans votre interface de suivi des dossiers.'
|
||||
download_all_dossiers: 'Télécharger mes dossiers'
|
||||
limit_excess_download_all_dossiers: 'Limite de dossiers fixée à 200 pour le téléchargement'
|
||||
format_csv: 'Au format CSV'
|
||||
format_xlsx: 'Au format XLSX'
|
||||
format_ods: 'Au format ODS'
|
||||
|
|
Loading…
Reference in a new issue