43 lines
2.2 KiB
Text
43 lines
2.2 KiB
Text
- content_for :results do
|
|
.main-filter-header.fr-my-3w
|
|
.search
|
|
= link_to 'Voir la liste des démarches', all_admin_procedures_path(@filter.params), class: 'fr-btn fr-btn--secondary btn-admins'
|
|
.fr-table.fr-table--bordered
|
|
%table#all-admins
|
|
%caption
|
|
= "#{@admins.total_count} administrateurs"
|
|
%span.hidden.fr-icon-ball-pen-fill{ 'aria-hidden': 'true', 'data-autosubmit-target': 'spinner' }
|
|
- if @filter.selected_zones.present?
|
|
.selected-zones.fr-mb-2w
|
|
- @filter.selected_zones.each do |zone|
|
|
= link_to zone.current_label, all_admin_procedures_path(@filter.without(:zone_ids, zone.id)), class: 'fr-tag fr-tag--dismiss fr-mb-1w'
|
|
- if @filter.statuses.present?
|
|
.selected-statuses.fr-mb-2w
|
|
- @filter.statuses.each do |status|
|
|
= link_to status, all_admin_procedures_path(@filter.without(:statuses, status)), class: 'fr-tag fr-tag--dismiss fr-mb-1w'
|
|
- if @filter.from_publication_date.present?
|
|
.selected-from-publication-date.fr-mb-2w
|
|
= link_to "Depuis le #{l(@filter.from_publication_date)}", all_admin_procedures_path(@filter.without(:from_publication_date)), class: 'fr-tag fr-tag--dismiss fr-mb-1w'
|
|
= paginate @admins, views_prefix: 'administrateurs'
|
|
%thead
|
|
%tr
|
|
%th{ scope: 'col' }
|
|
%th{ scope: 'col' } Administrateurs
|
|
%th{ scope: 'col' } Nb démarches
|
|
%th{ scope: 'col' } Inscrit le
|
|
- @admins.each do |admin|
|
|
%tbody{ 'data-controller': 'expand' }
|
|
%tr.procedure{ 'data-action': 'click->expand#toggle' }
|
|
%td
|
|
%button.fr-icon-add-line.fr-icon--sm.fr-mr-1w.fr-mb-1w.fr-text-action-high--blue-france{ 'aria-hidden': 'true', 'data-expand-target': 'icon' }
|
|
%td= admin.email
|
|
%td= admin.procedures.count
|
|
%td= l(admin.created_at, format: :message_date_without_time)
|
|
%tr.hidden{ 'data-expand-target': 'content' }
|
|
%td.fr-highlight--beige-gris-galet{ colspan: '6' }
|
|
.fr-container
|
|
.fr-col-12.fr-mr-1w
|
|
%ul
|
|
- admin.procedures.each do |procedure|
|
|
%li= procedure.libelle
|
|
.fr-mt-2w= paginate @admins, views_prefix: 'administrateurs'
|