Loading variables from controller to get several uniq layout to display

This commit is contained in:
JC 2016-11-21 16:45:12 +01:00
parent 2d355bd6a0
commit ef9adf52cb
5 changed files with 26 additions and 29 deletions

View file

@ -36,7 +36,7 @@
height: 60px;
background-color: #FFFFFF;
box-shadow: 0 1px 2px 0 rgba(0,0,0,0.5);
padding-left: 15px;
padding-left: 50px;
.main-info {
font-family: Arial;
font-size: 18px;

View file

@ -3,7 +3,7 @@ class Backoffice::DossiersController < Backoffice::DossiersListController
def index
super
@options = ["dossiers/download_dossiers"]
dossiers_list_facade.service.filter_procedure_reset!
end

View file

@ -5,27 +5,6 @@
%h1
=t('dynamics.backoffice.title')
%div.dropdown.pull-right#download_menu
- if @dossiers_list_facade.dossiers_to_display.count > 200
%button.btn.btn-error.dropdown-toggle#dropdownDownloadMenu{ type: :button, 'data-toggle' => 'dropdown', 'aria-haspopup' => true, 'aria-expanded' => false, class: 'disabled'}
%span{'data-toggle' => :tooltip, "data-placement" => :left, title: 'Pour réduire le nombre de dossiers et ne pas dépasser la limite autorisée de 200, merci de bien vouloir appliquer des filtres.'}
= t('dynamics.backoffice.limit_excess_download_all_dossiers')
- else
%button.btn.btn-success.dropdown-toggle#dropdownDownloadMenu{ type: :button, 'data-toggle' => 'dropdown', 'aria-haspopup' => true, 'aria-expanded' => false }
%i.fa.fa-download
= t('dynamics.backoffice.download_all_dossiers')
%span.caret
%ul.dropdown-menu.dropdown-menu-right
%li
= link_to backoffice_download_dossiers_tps_path(format: :csv, procedure_id: params[:id]), { class: 'btn btn-sm' } do
= t('dynamics.backoffice.format_csv')
%li
= link_to backoffice_download_dossiers_tps_path(format: :xlsx, procedure_id: params[:id]), { class: 'btn btn-sm' } do
= t('dynamics.backoffice.format_xlsx')
%li
= link_to backoffice_download_dossiers_tps_path(format: :ods, procedure_id: params[:id]), { class: 'btn btn-sm' } do
= t('dynamics.backoffice.format_ods')
= render partial: 'backoffice/dossiers/onglets'
= smart_listing_render :dossiers

View file

@ -0,0 +1,20 @@
%div.dropdown.pull-right#download_menu
- if @dossiers_list_facade.dossiers_to_display.count > 200
%button.btn.btn-error.dropdown-toggle#dropdownDownloadMenu{ type: :button, 'data-toggle' => 'dropdown', 'aria-haspopup' => true, 'aria-expanded' => false, class: 'disabled'}
%span{'data-toggle' => :tooltip, "data-placement" => :left, title: 'Pour réduire le nombre de dossiers et ne pas dépasser la limite autorisée de 200, merci de bien vouloir appliquer des filtres.'}
= t('dynamics.backoffice.limit_excess_download_all_dossiers')
- else
%button.btn.btn-success.dropdown-toggle#dropdownDownloadMenu{ type: :button, 'data-toggle' => 'dropdown', 'aria-haspopup' => true, 'aria-expanded' => false }
%i.fa.fa-download
= t('dynamics.backoffice.download_all_dossiers')
%span.caret
%ul.dropdown-menu.dropdown-menu-right
%li
= link_to backoffice_download_dossiers_tps_path(format: :csv, procedure_id: params[:id]), { class: 'btn btn-sm' } do
= t('dynamics.backoffice.format_csv')
%li
= link_to backoffice_download_dossiers_tps_path(format: :xlsx, procedure_id: params[:id]), { class: 'btn btn-sm' } do
= t('dynamics.backoffice.format_xlsx')
%li
= link_to backoffice_download_dossiers_tps_path(format: :ods, procedure_id: params[:id]), { class: 'btn btn-sm' } do
= t('dynamics.backoffice.format_ods')

View file

@ -19,12 +19,10 @@
Start UP region ile de france (8 dossiers en cours)
%div.col-lg-3.col-md-3.options
%div.row
%div.col-lg-12.col-md-12
%span.fa.fa-pencil
Modifier le tableau
%div.col-lg-12.col-md-12
%span.fa.fa-download
Télécharger les données
- if @options
- @options.each do |option|
%div.col-lg-12.col-md-12
= render partial: option
%div.col-lg-1.col-md-1.log-options
%span.fa.fa-sign-out