2016-01-08 11:39:04 +01:00
|
|
|
- unless smart_listing.empty?
|
|
|
|
%table.table
|
2016-07-18 18:24:29 +02:00
|
|
|
%thead
|
2016-09-08 16:21:54 +02:00
|
|
|
- @dossiers_list_facade.preference_list_dossiers_filter.each do |preference|
|
2016-08-01 18:10:32 +02:00
|
|
|
%th{class: "col-md-#{preference.bootstrap_lg} col-lg-#{preference.bootstrap_lg}"}= smart_listing.sortable preference.libelle, preference.table_attr
|
|
|
|
%th.col-md-1.col-lg-1.center Actions
|
|
|
|
%th.col-md-1.col-lg-1.center Abonnés
|
2015-12-02 14:05:56 +01:00
|
|
|
|
2016-01-08 11:39:04 +01:00
|
|
|
- @dossiers.each do |dossier|
|
|
|
|
%tr
|
2016-09-08 16:21:54 +02:00
|
|
|
- @dossiers_list_facade.preference_list_dossiers_filter.each_with_index do |preference, index|
|
2016-08-01 18:10:32 +02:00
|
|
|
%td
|
2016-08-02 14:49:41 +02:00
|
|
|
- if preference.table.nil? || preference.table.empty?
|
2016-08-01 18:10:32 +02:00
|
|
|
- value = dossier.decorate.public_send(preference.attr_decorate)
|
|
|
|
- else
|
|
|
|
- value = dossier.public_send(preference.table).decorate.public_send(preference.attr_decorate)
|
|
|
|
|
|
|
|
- if index == 0
|
|
|
|
= link_to value, backoffice_dossier_path(id: dossier.id)
|
|
|
|
- else
|
|
|
|
= value
|
|
|
|
|
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
|
|
|
|
|
|
|
= smart_listing.paginate
|
|
|
|
= smart_listing.pagination_per_page_links
|
2016-08-01 18:10:32 +02:00
|
|
|
|
2016-01-08 11:39:04 +01:00
|
|
|
- else
|
|
|
|
%h4.center
|
2016-08-01 18:10:32 +02:00
|
|
|
Aucun dossier
|