demarches-normaliennes/app/views/administrations/_list.html.haml

32 lines
1 KiB
Text
Raw Normal View History

2017-03-08 14:52:25 +01:00
.card
- unless smart_listing.empty?
%table.table
%thead
%th.col-xs-4= smart_listing.sortable 'Email', :email
%th.col-xs-4= smart_listing.sortable 'Date de dernière connexion', :last_sign_in_at
%th.col-xs-2 Procédure active
%th.col-xs-2 Dossier en cours
2016-02-23 16:51:24 +01:00
2017-03-08 14:52:25 +01:00
- @admins.each do |admin|
%tr
%td
= admin.email
%td
- unless admin.last_sign_in_at.nil?
= time_ago_in_words(l(admin.last_sign_in_at, format: "%d/%m/%Y %H:%M UTC +02:00"))
(
2017-05-16 14:40:44 +02:00
= admin.last_sign_in_at.localtime.strftime('%d/%m/%Y')
2017-03-08 14:52:25 +01:00
)
%td
2017-07-11 15:52:06 +02:00
= admin.procedures.publiees.count
2017-03-08 14:52:25 +01:00
%td
- total_dossier = 0
2017-07-11 09:09:20 +02:00
- admin.procedures.each do |procedure| total_dossier += procedure.dossiers.state_not_brouillon.count end
2017-03-08 14:52:25 +01:00
= total_dossier
= smart_listing.paginate
= smart_listing.pagination_per_page_links
2016-04-19 10:41:23 +02:00
2017-03-08 14:52:25 +01:00
- else
%h4.center
Aucun administrateur créé