Merge branch 'develop_v2' of github.com:sgmap/tps into develop_v2
This commit is contained in:
commit
a1242bb55a
12 changed files with 20 additions and 20 deletions
|
@ -4,7 +4,6 @@ class Backoffice::Dossiers::ProcedureController < Backoffice::DossiersListContro
|
|||
super
|
||||
|
||||
dossiers_list_facade.service.filter_procedure! params[:id]
|
||||
@facade_data_view = dossiers_list_facade
|
||||
|
||||
render 'backoffice/dossiers/index'
|
||||
rescue ActiveRecord::RecordNotFound
|
||||
|
|
|
@ -123,7 +123,6 @@ class Backoffice::DossiersController < Backoffice::DossiersListController
|
|||
@liste = cookies[:liste] || 'a_traiter'
|
||||
end
|
||||
|
||||
dossiers_list_facade @liste
|
||||
smartlisting_dossier
|
||||
|
||||
render 'backoffice/dossiers/index', formats: :js
|
||||
|
|
|
@ -25,7 +25,7 @@ class Backoffice::DossiersListController < ApplicationController
|
|||
end
|
||||
|
||||
def dossiers_list_facade liste='a_traiter'
|
||||
@dossiers_list_facade ||= DossiersListFacades.new current_gestionnaire, liste, retrieve_procedure
|
||||
@facade_data_view ||= DossiersListFacades.new current_gestionnaire, liste, retrieve_procedure
|
||||
end
|
||||
|
||||
def smartlisting_dossier dossiers_list=nil, liste='a_traiter'
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
class Backoffice::PreferenceListDossierController < ApplicationController
|
||||
class Backoffice::PreferenceListDossierController < Backoffice::DossiersListController
|
||||
include SmartListing::Helper::ControllerExtensions
|
||||
helper SmartListing::Helper
|
||||
|
||||
|
@ -22,7 +22,7 @@ class Backoffice::PreferenceListDossierController < ApplicationController
|
|||
end
|
||||
|
||||
def reload_pref_list
|
||||
@dossiers_list_facade = DossiersListFacades.new current_gestionnaire, '', retrieve_procedure
|
||||
dossiers_list_facade
|
||||
|
||||
render partial: 'backoffice/dossiers/pref_list', id: params_procedure_id
|
||||
end
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
.panel-heading
|
||||
= preference.libelle
|
||||
|
||||
=form_tag @dossiers_list_facade.filter_url, {class: 'panel-body form-inline', method: :post} do
|
||||
=form_tag @facade_data_view.filter_url, {class: 'panel-body form-inline', method: :post} do
|
||||
%input.form-control.filter_input{name: "filter_input[#{preference.table_attr}]", style:'width: 69%', value: "#{preference.filter}"}
|
||||
%button.btn.btn-sm.btn-success
|
||||
%i.fa.fa-check
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
%table#dossiers_list.table
|
||||
%thead
|
||||
- @dossiers_list_facade.preference_list_dossiers_filter.each do |preference|
|
||||
- @facade_data_view.preference_list_dossiers_filter.each do |preference|
|
||||
%th{class: "col-md-#{preference.bootstrap_lg} col-lg-#{preference.bootstrap_lg}"}
|
||||
- if preference.table.to_s.include? 'champs'
|
||||
= preference.libelle
|
||||
-else
|
||||
= smart_listing.sortable preference.libelle, preference.table_attr
|
||||
- if @dossiers_list_facade.active_filter? preference
|
||||
- if @facade_data_view.active_filter? preference
|
||||
%i.filter.fa.fa-filter{style: "cursor: pointer; margin-left:3px; font-size: 1.1em; color:#{(preference.filter.blank? ? 'grey' : 'orange')}", id: "filter_#{smart_listing.name.to_s}_#{preference.table_attr.sub('.', '_')}"}
|
||||
= render partial: 'backoffice/dossiers/filter_framed', locals:{preference: preference, filter_framed_id: "framed_filter_#{smart_listing.name.to_s}_#{preference.table_attr.sub('.', '_')}"}
|
||||
|
||||
|
@ -16,7 +16,7 @@
|
|||
- unless smart_listing.empty?
|
||||
- smart_listing.collection.each do |dossier|
|
||||
%tr{id: "tr_dossier_#{dossier.id}", 'data-dossier_url' => backoffice_dossier_url(id: dossier.id)}
|
||||
- @dossiers_list_facade.preference_list_dossiers_filter.each_with_index do |preference, index|
|
||||
- @facade_data_view.preference_list_dossiers_filter.each_with_index do |preference, index|
|
||||
%td
|
||||
- if preference.table.nil? || preference.table.empty?
|
||||
- value = dossier.decorate.public_send(preference.attr_decorate)
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
Actuelles
|
||||
|
||||
%ul
|
||||
- @dossiers_list_facade.preference_list_dossiers_filter.each_with_index do |preference, index|
|
||||
- @facade_data_view.preference_list_dossiers_filter.each_with_index do |preference, index|
|
||||
%li
|
||||
= form_tag backoffice_preference_list_dossier_delete_path, method: :delete, remote: true do
|
||||
= hidden_field_tag :pref_id, preference.id
|
||||
|
@ -23,7 +23,7 @@
|
|||
Disponibles
|
||||
|
||||
%table
|
||||
- PreferenceListDossier.available_columns_for(@dossiers_list_facade.procedure_id).each_with_index do |tables, index|
|
||||
- PreferenceListDossier.available_columns_for(@facade_data_view.procedure_id).each_with_index do |tables, index|
|
||||
- if index%2 == 0 || tables.first.to_s.include?('champs')
|
||||
%tr
|
||||
|
||||
|
@ -38,7 +38,7 @@
|
|||
= hidden_field_tag :attr, columns.second[:attr]
|
||||
= hidden_field_tag :attr_decorate, columns.second[:attr_decorate]
|
||||
= hidden_field_tag :bootstrap_lg, columns.second[:bootstrap_lg]
|
||||
= hidden_field_tag :procedure_id, @dossiers_list_facade.procedure_id
|
||||
= hidden_field_tag :procedure_id, @facade_data_view.procedure_id
|
||||
|
||||
= columns.second[:libelle]
|
||||
%button.btn.btn-default.btn-xs{type: :submit, id: "add_pref_list_#{columns.second[:table]}_#{columns.second[:attr]}"}
|
||||
|
|
|
@ -23,7 +23,7 @@
|
|||
%div.carret-down
|
||||
Dossiers suivis
|
||||
%div.col-lg-2.col-md-2.count
|
||||
=@dossiers_list_facade.suivi_total
|
||||
=@facade_data_view.suivi_total
|
||||
dossiers
|
||||
%div.body
|
||||
= smart_listing_render :follow_dossiers
|
||||
|
@ -36,7 +36,7 @@
|
|||
%div.carret-down
|
||||
Tous les dossiers
|
||||
%div.col-lg-2.col-md-2.count
|
||||
=@dossiers_list_facade.all_state_total
|
||||
=@facade_data_view.all_state_total
|
||||
dossiers
|
||||
%div.body
|
||||
= smart_listing_render :all_state_dossiers
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<%= smart_listing_update :new_dossiers %>
|
||||
<%= smart_listing_update :follow_dossiers %>
|
||||
<%= smart_listing_update :all_state_dossiers %>
|
||||
<%= smart_listing_update :new_dossiers, {force: true} %>
|
||||
<%= smart_listing_update :follow_dossiers, {force: true} %>
|
||||
<%= smart_listing_update :all_state_dossiers, {force: true} %>
|
||||
|
||||
filters_init();
|
||||
link_init();
|
|
@ -1,3 +1,5 @@
|
|||
<%= smart_listing_update :dossiers %>
|
||||
<%= smart_listing_update :new_dossiers %>
|
||||
<%= smart_listing_update :follow_dossiers %>
|
||||
<%= smart_listing_update :all_state_dossiers %>
|
||||
|
||||
filters_init();
|
|
@ -1,5 +1,5 @@
|
|||
%div.dropdown.pull-right#download-menu
|
||||
- if @dossiers_list_facade.dossiers_to_display.count > 400
|
||||
- if @facade_data_view.dossiers_to_display.count > 400
|
||||
%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 400, merci de bien vouloir appliquer des filtres.'}
|
||||
= t('dynamics.backoffice.limit_excess_download_all_dossiers')
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
%div#infos-block
|
||||
#procedure_list
|
||||
%div.procedure_list_element
|
||||
- @dossiers_list_facade.gestionnaire_procedures_name_and_id_list.each do |procedure|
|
||||
- @facade_data_view.gestionnaire_procedures_name_and_id_list.each do |procedure|
|
||||
%div.procedure_list_element
|
||||
=link_to truncate(procedure[:libelle], {length: 50}), backoffice_dossiers_procedure_path(procedure[:id]),{title: procedure[:libelle]}
|
||||
|
||||
|
|
Loading…
Reference in a new issue