List dossiers archived

This commit is contained in:
Mathieu Magnin 2017-02-27 17:44:08 +01:00
parent b2198663d1
commit 6774dd008f
8 changed files with 67 additions and 36 deletions

View file

@ -1,9 +1,9 @@
%table#dossiers_list.table
%thead
- if smart_listing.name.to_s == 'follow_dossiers'
%th.col-md-1.col-lg-1.col-sm-1.col-xs-1.col-sm-1.col-xs-1.center
%th.col-xs-1.center
%i.fa.fa-bell
%th.col-md-1.col-lg-1.col-sm-1.col-xs-1.col-sm-1.col-xs-1
%th.col-xs-1
État
- @facade_data_view.preference_list_dossiers_filter.each do |preference|
@ -17,14 +17,14 @@
%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('.', '_')}"}
%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
%th.col-xs-1.center Actions
%th.col-xs-1.center Abonnés
- unless smart_listing.empty?
- smart_listing.collection.each do |dossier|
%tr.dossier-row{id: "tr_dossier_#{dossier.id}", 'data-dossier_url' => backoffice_dossier_url(id: dossier.id)}
- if smart_listing.name.to_s == 'follow_dossiers'
%td.col-md-1.col-lg-1.col-sm-1.col-xs-1.col-sm-1.col-xs-1.center
%td.col-xs-1.center
- total_notif = dossier.notifications.where(already_read: false).count
- if total_notif == 0
.badge.progress-bar-default
@ -32,7 +32,7 @@
- else
.badge.progress-bar-warning
= total_notif
%td.col-md-1.col-lg-1.col-sm-1.col-xs-1.col-sm-1.col-xs-1
%td.col-xs-1
= dossier.decorate.display_state
- @facade_data_view.preference_list_dossiers_filter.each_with_index do |preference, index|
- unless preference.libelle == 'Statut' || preference.libelle == 'État'

View file

@ -5,51 +5,61 @@
.default_data_block
%div.row.show-block#new_dossiers
%div.header
%div.col-lg-10.col-md-10.col-sm-10.col-xs-10.title
%div.col-xs-10.title
%div.carret-right
%div.carret-down
Nouveaux dossiers
%div.col-lg-2.col-md-2.col-sm-2.col-xs-2.count
=@facade_data_view.nouveaux_total
dossiers
%div.col-xs-2.count
= pluralize(@facade_data_view.nouveaux_total, "dossier")
%div.body
= smart_listing_render :new_dossiers
.row.center
.col-lg-1.col-md-1.col-sm-1.col-xs-1
.col-lg-2.col-md-2.col-sm-2.col-xs-2
.col-xs-2.col-xs-offset-1
=link_to 'Tous les états', '?liste=all_state', class: 'text-info', style:"text-decoration: #{@facade_data_view.liste == 'all_state'? 'underline' : ''}"
.col-lg-2.col-md-2.col-sm-2.col-xs-2
.col-xs-2
=link_to 'En construction', '?liste=a_traiter', class: 'text-danger', style:"text-decoration: #{@facade_data_view.liste == 'a_traiter'? 'underline' : ''}"
.col-lg-2.col-md-2.col-sm-2.col-xs-2
.col-xs-2
=link_to 'À receptionner', '?liste=deposes', class: 'text-purple', style:"text-decoration: #{@facade_data_view.liste == 'deposes'? 'underline' : ''}"
.col-lg-2.col-md-2.col-sm-2.col-xs-2
.col-xs-2
=link_to 'À instruire', '?liste=a_instruire', class: 'text-warning', style:"text-decoration: #{@facade_data_view.liste == 'a_instruire'? 'underline' : ''}"
.col-lg-2.col-md-2.col-sm-2.col-xs-2
.col-xs-2
=link_to 'Terminés', '?liste=termine', class: 'text-success', style:"text-decoration: #{@facade_data_view.liste == 'termine'? 'underline' : ''}"
.default_data_block.default_visible
%div.row.show-block#follow_dossiers
%div.header
%div.col-lg-10.col-md-10.col-sm-10.col-xs-10.title
%div.col-xs-10.title
%div.carret-right
%div.carret-down
Dossiers suivis
%div.col-lg-2.col-md-2.col-sm-2.col-xs-2.count
=@facade_data_view.suivi_total
dossiers
%div.col-xs-2.count
= pluralize(@facade_data_view.suivi_total, "dossier")
%div.body
= smart_listing_render :follow_dossiers
.default_data_block
%div.row.show-block#all_dossiers
%div.header
%div.col-lg-10.col-md-10.col-sm-10.col-xs-10.title
%div.col-xs-10.title
%div.carret-right
%div.carret-down
Tous les dossiers
%div.col-lg-2.col-md-2.col-sm-2.col-xs-2.count
=@facade_data_view.all_state_total
dossiers
%div.col-xs-2.count
= pluralize(@facade_data_view.all_state_total, "dossier")
%div.body
= smart_listing_render :all_state_dossiers
.default_data_block
%div.row.show-block#all_dossiers
%div.header
%div.col-xs-10.title
%div.carret-right
%div.carret-down
Dossiers archivés
%div.col-xs-2.count
= pluralize(@dossiers_archived.count, "dossier")
%div.body
= smart_listing_render :dossiers_archived

View file

@ -1,2 +1,2 @@
%div.col-lg-12.col-md-12.col-sm-12.col-xs-12#backoffice_dossier_show
.col-xs-12#backoffice_dossier_show
= render partial: "dossiers/dossier_show"