Gestionnaire can list dossiers where he is invited for avis

This commit is contained in:
Mathieu Magnin 2017-04-27 12:17:50 +02:00 committed by Simon Lehericey
parent e831442cbd
commit 43f481b7ff
14 changed files with 141 additions and 3 deletions

View file

@ -0,0 +1,20 @@
- if smart_listing.collection.any?
%table#dossiers-list.table
%thead
%th
%th
Procédure
%th
Invité le
%tbody
- smart_listing.collection.each do |avis|
%tr.dossier-row{ id: "tr_dossier_#{avis.dossier.id}", 'data-dossier_url' => backoffice_dossier_url(id: avis.dossier.id) }
%td= avis.dossier.id
%td= avis.dossier.procedure.libelle
%td= avis.created_at.strftime('%d/%m/%Y %H:%M')
= smart_listing.paginate
- else
.center{ colspan: 2 }
%em Aucun dossier

View file

@ -0,0 +1,22 @@
.col-md-12
.default-data-block.default_visible
.row.show-block
.header
.title
.carret-right
.carret-down
= "#{@pending_avis.count} avis à rendre"
.body
= smart_listing_render :pending_avis
%br
.default-data-block
.row.show-block
.header
.title
.carret-right
.carret-down
= "#{@avis_with_answer.count} avis #{"rendu".pluralize(@avis_with_answer.count)}"
.body
= smart_listing_render :avis_with_answer

View file

@ -0,0 +1,4 @@
<%= smart_listing_update :pending_avis %>
<%= smart_listing_update :avis_with_answer %>
link_init();