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

38 lines
1.2 KiB
Text
Raw Normal View History

2017-03-08 14:52:25 +01:00
.card
2018-01-11 19:04:39 +01:00
- if smart_listing.present?
2017-03-08 14:52:25 +01:00
%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 État
2017-03-08 14:52:25 +01:00
%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
2018-01-11 19:04:39 +01:00
- if admin.last_sign_in_at.present?
2017-03-08 14:52:25 +01:00
= 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
- if admin.invitation_expired?
= link_to admin.registration_state, administration_path(admin), remote: true, method: :patch
- else
= admin.registration_state
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éé