2016-11-08 14:08:16 +01:00
|
|
|
%table#dossiers_list.table
|
2016-10-04 19:19:03 +02:00
|
|
|
%thead
|
2016-12-21 17:26:31 +01:00
|
|
|
- if smart_listing.name.to_s == 'follow_dossiers'
|
2017-01-05 18:01:53 +01:00
|
|
|
%th.col-md-1.col-lg-1.col-sm-1.col-xs-1.col-sm-1.col-xs-1.center
|
2016-12-21 17:26:31 +01:00
|
|
|
%i.fa.fa-bell
|
2017-01-09 17:12:11 +01:00
|
|
|
- unless Features.opensimplif
|
|
|
|
%th.col-md-1.col-lg-1.col-sm-1.col-xs-1.col-sm-1.col-xs-1
|
|
|
|
État
|
2017-01-05 18:01:53 +01:00
|
|
|
|
2016-11-28 16:49:50 +01:00
|
|
|
- @facade_data_view.preference_list_dossiers_filter.each do |preference|
|
2017-01-05 18:01:53 +01:00
|
|
|
- unless preference.libelle == 'Statut' || preference.libelle == 'État'
|
|
|
|
%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 @facade_data_view.active_filter? preference
|
|
|
|
%i.filter.fa.fa-filter{style: "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('.', '_')}"}
|
2016-09-09 15:05:46 +02:00
|
|
|
|
2016-12-23 16:58:06 +01:00
|
|
|
%th.col-md-1.col-lg-1.col-sm-1.col-xs-1.col-sm-1.col-xs-1.center Actions
|
|
|
|
%th.col-md-1.col-lg-1.col-sm-1.col-xs-1.col-sm-1.col-xs-1.center Abonnés
|
2015-12-02 14:05:56 +01:00
|
|
|
|
2016-10-04 19:19:03 +02:00
|
|
|
- unless smart_listing.empty?
|
2016-11-24 19:33:34 +01:00
|
|
|
- smart_listing.collection.each do |dossier|
|
2016-12-23 14:46:50 +01:00
|
|
|
%tr.dossier-row{id: "tr_dossier_#{dossier.id}", 'data-dossier_url' => backoffice_dossier_url(id: dossier.id)}
|
2016-12-21 17:26:31 +01:00
|
|
|
- if smart_listing.name.to_s == 'follow_dossiers'
|
2017-01-05 18:01:53 +01:00
|
|
|
%td.col-md-1.col-lg-1.col-sm-1.col-xs-1.col-sm-1.col-xs-1.center
|
2016-12-27 11:23:19 +01:00
|
|
|
- total_notif = dossier.notifications.where(already_read: false).count
|
2016-12-21 17:26:31 +01:00
|
|
|
- if total_notif == 0
|
|
|
|
.badge.progress-bar-default
|
|
|
|
= total_notif
|
|
|
|
- else
|
2016-12-22 21:25:55 +01:00
|
|
|
.badge.progress-bar-warning
|
2016-12-21 17:26:31 +01:00
|
|
|
= total_notif
|
2017-01-09 17:12:11 +01:00
|
|
|
- unless Features.opensimplif
|
|
|
|
%td.col-md-1.col-lg-1.col-sm-1.col-xs-1.col-sm-1.col-xs-1
|
|
|
|
= dossier.decorate.display_state
|
2016-11-28 16:49:50 +01:00
|
|
|
- @facade_data_view.preference_list_dossiers_filter.each_with_index do |preference, index|
|
2017-01-05 18:01:53 +01:00
|
|
|
- unless preference.libelle == 'Statut' || preference.libelle == 'État'
|
|
|
|
%td
|
|
|
|
- if preference.table.nil? || preference.table.empty?
|
|
|
|
- value = dossier.decorate.public_send(preference.attr_decorate)
|
|
|
|
- elsif preference.table == 'champs'
|
|
|
|
- value = dossier.champs.find_by_type_de_champ_id(preference.attr).value
|
|
|
|
- elsif preference.table == 'champs_private'
|
|
|
|
- value = dossier.champs_private.find_by_type_de_champ_id(preference.attr).value
|
|
|
|
- else
|
|
|
|
- begin
|
|
|
|
- value = dossier.public_send(preference.table).decorate.public_send(preference.attr_decorate)
|
|
|
|
- rescue NoMethodError
|
|
|
|
- value = ''
|
2016-08-01 18:10:32 +02:00
|
|
|
|
2017-01-05 18:01:53 +01:00
|
|
|
= value
|
2016-08-01 18:10:32 +02:00
|
|
|
|
2016-07-19 17:18:41 +02:00
|
|
|
%td.center
|
|
|
|
- if current_gestionnaire.follow?(dossier.id)
|
|
|
|
= link_to('Quitter'.html_safe, backoffice_dossier_follow_path(dossier_id: dossier.id), 'data-method' => :put, class: 'btn-sm btn-danger', id: "suivre_dossier_#{dossier.id}")
|
|
|
|
-else
|
|
|
|
= link_to('Suivre', backoffice_dossier_follow_path(dossier_id: dossier.id), 'data-method' => :put, class: 'btn-sm btn-primary', id: "suivre_dossier_#{dossier.id}")
|
|
|
|
%td.center{style:"color: #{dossier.total_follow == 0 ? 'red' : ''}"}
|
|
|
|
= dossier.total_follow
|
2016-01-08 11:39:04 +01:00
|
|
|
|
2016-10-04 19:19:03 +02:00
|
|
|
= smart_listing.paginate
|
2017-01-09 17:12:11 +01:00
|
|
|
- if smart_listing.name.to_s == 'follow_dossiers' && smart_listing.collection.count > 0
|
2017-01-02 10:48:47 +01:00
|
|
|
= smart_listing.pagination_per_page_links
|
|
|
|
%br
|
|
|
|
|
2016-08-01 18:10:32 +02:00
|
|
|
|
2016-10-04 19:19:03 +02:00
|
|
|
- if smart_listing.empty?
|
2016-01-08 11:39:04 +01:00
|
|
|
%h4.center
|
2016-11-04 17:11:26 +01:00
|
|
|
Aucun dossier
|