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

31 lines
1.1 KiB
Text
Raw Normal View History

2016-02-23 16:51:24 +01:00
- unless smart_listing.empty?
%table.table
%thead
2016-12-23 16:58:06 +01:00
%th.col-md-4.col-sm-4.col-xs-4.col-lg-4= smart_listing.sortable 'Email', :email
%th.col-md-4.col-sm-4.col-xs-4.col-lg-4= smart_listing.sortable 'Date de dernière connexion', :last_sign_in_at
%th.col-md-2.col-sm-2.col-xs-2.col-lg-2 Procédure active
%th.col-md-2.col-sm-2.col-xs-2.col-lg-2 Dossier en cours
2016-02-23 16:51:24 +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"))
(
= admin.last_sign_in_at.to_date.strftime('%d/%m/%Y')
)
%td
= admin.procedures.where(published: true).count
%td
- total_dossier = 0
2016-10-25 12:11:11 +02:00
- admin.procedures.each do |procedure| total_dossier += procedure.dossiers.where.not(state: :draft).count end
= total_dossier
2016-02-23 16:51:24 +01:00
= smart_listing.paginate
= smart_listing.pagination_per_page_links
2016-04-19 10:41:23 +02:00
2016-02-23 16:51:24 +01:00
- else
%h4.center
Aucun administrateur créé