max width in Administration
This commit is contained in:
parent
66cb0c09b1
commit
48d12cfa34
2 changed files with 43 additions and 45 deletions
|
@ -1,30 +1,31 @@
|
||||||
- unless smart_listing.empty?
|
.card
|
||||||
%table.table
|
- unless smart_listing.empty?
|
||||||
%thead
|
%table.table
|
||||||
%th.col-xs-4= smart_listing.sortable 'Email', :email
|
%thead
|
||||||
%th.col-xs-4= smart_listing.sortable 'Date de dernière connexion', :last_sign_in_at
|
%th.col-xs-4= smart_listing.sortable 'Email', :email
|
||||||
%th.col-xs-2 Procédure active
|
%th.col-xs-4= smart_listing.sortable 'Date de dernière connexion', :last_sign_in_at
|
||||||
%th.col-xs-2 Dossier en cours
|
%th.col-xs-2 Procédure active
|
||||||
|
%th.col-xs-2 Dossier en cours
|
||||||
|
|
||||||
- @admins.each do |admin|
|
- @admins.each do |admin|
|
||||||
%tr
|
%tr
|
||||||
%td
|
%td
|
||||||
= admin.email
|
= admin.email
|
||||||
%td
|
%td
|
||||||
- unless admin.last_sign_in_at.nil?
|
- 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"))
|
= 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')
|
= admin.last_sign_in_at.to_date.strftime('%d/%m/%Y')
|
||||||
)
|
)
|
||||||
%td
|
%td
|
||||||
= admin.procedures.where(published: true).count
|
= admin.procedures.where(published: true).count
|
||||||
%td
|
%td
|
||||||
- total_dossier = 0
|
- total_dossier = 0
|
||||||
- admin.procedures.each do |procedure| total_dossier += procedure.dossiers.where.not(state: :draft).count end
|
- admin.procedures.each do |procedure| total_dossier += procedure.dossiers.where.not(state: :draft).count end
|
||||||
= total_dossier
|
= total_dossier
|
||||||
= smart_listing.paginate
|
= smart_listing.paginate
|
||||||
= smart_listing.pagination_per_page_links
|
= smart_listing.pagination_per_page_links
|
||||||
|
|
||||||
- else
|
- else
|
||||||
%h4.center
|
%h4.center
|
||||||
Aucun administrateur créé
|
Aucun administrateur créé
|
||||||
|
|
|
@ -1,22 +1,19 @@
|
||||||
%br
|
.container
|
||||||
%br
|
.mt-1
|
||||||
|
= form_for @admin, url: {controller: 'administrations', action: :create} do |f|
|
||||||
|
.form-group.form-inline.text-center
|
||||||
|
= f.text_field :email, placeholder: :email, class: 'form-control'
|
||||||
|
= f.text_field :password, placeholder: :password, class: 'form-control'
|
||||||
|
|
||||||
= form_for @admin, url: {controller: 'administrations', action: :create} do |f|
|
= f.submit 'Créer un administrateur', class: 'btn btn-success', id: 'submit_new_administrateur'
|
||||||
.form-group.form-inline.center
|
|
||||||
= f.text_field :email, placeholder: :email, class: 'form-control'
|
|
||||||
= f.text_field :password, placeholder: :password, class: 'form-control'
|
|
||||||
|
|
||||||
= f.submit 'Valider', class: 'btn btn-success', id: 'submit_new_administrateur'
|
.text-center
|
||||||
|
=link_to 'Stats', administrations_stats_path, style: 'margin-bottom: 50px; display: block', 'data-no-turbolink': true
|
||||||
|
|
||||||
%br
|
= smart_listing_render :admins
|
||||||
|
|
||||||
.center
|
%br
|
||||||
=link_to 'Stats', administrations_stats_path, style: 'margin-bottom: 50px; display: block', 'data-no-turbolink': true
|
%br
|
||||||
|
|
||||||
= smart_listing_render :admins
|
.text-center
|
||||||
|
=link_to 'Deconnexion', '/administrations/sign_out', method: :delete
|
||||||
%br
|
|
||||||
%br
|
|
||||||
|
|
||||||
.center
|
|
||||||
=link_to 'Deconnexion', '/administrations/sign_out', method: :delete
|
|
Loading…
Add table
Add a link
Reference in a new issue