51 lines
3 KiB
Text
51 lines
3 KiB
Text
- content_for :results do
|
|
.main-filter-header.fr-my-3w
|
|
= form_with(url: all_admin_procedures_path, method: :get, data: { turbo_frame: 'procedures' }, html: { role: 'search', class: 'search' }) do |f|
|
|
- @filter.zone_ids&.each do |zone_id|
|
|
= hidden_field_tag 'zone_ids[]', zone_id
|
|
- @filter.statuses&.each do |status|
|
|
= hidden_field_tag 'statuses[]', status
|
|
= hidden_field_tag 'from_publication_date', @filter.from_publication_date if @filter.from_publication_date.present?
|
|
|
|
= f.label :libelle, 'Rechercher des démarches par libellé', class: 'fr-label'
|
|
= f.search_field 'libelle', size: 30, class: 'fr-input'
|
|
.actions
|
|
.link.fr-mx-1w= link_to 'Voir les administrateurs', administrateurs_admin_procedures_path(@filter.params), class: 'fr-btn fr-btn--secondary'
|
|
.link.fr-mx-1w{ "data-turbo": "false" }= link_to 'Exporter les résultats', all_admin_procedures_path(@filter.params.merge(format: :xlsx)), class: 'fr-btn fr-btn--secondary'
|
|
.fr-table.fr-table--bordered
|
|
%table#all-demarches
|
|
%caption
|
|
= "#{@procedures.total_count} #{t('pluralize.procedures', count: @procedures.total_count)}"
|
|
%span.hidden.spinner{ 'aria-hidden': 'true', 'data-turbo-target': 'spinner' }
|
|
- if @filter.libelle
|
|
.selected-query.fr-mb-2w
|
|
= link_to @filter.libelle, all_admin_procedures_path(@filter.without(:libelle)), class: 'fr-tag fr-tag--dismiss fr-mb-1w'
|
|
- 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.tag.present?
|
|
.selected-tag.fr-mb-2w
|
|
= link_to @filter.tag, all_admin_procedures_path(@filter.without(:tag)), 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 #{l(@filter.from_publication_date)}", all_admin_procedures_path(@filter.without(:from_publication_date)), class: 'fr-tag fr-tag--dismiss fr-mb-1w'
|
|
= paginate @procedures, views_prefix: 'administrateurs'
|
|
%thead
|
|
%tr
|
|
%th{ scope: 'col' }
|
|
%th{ scope: 'col' } Démarche
|
|
%th{ scope: 'col' } №
|
|
%th{ scope: 'col' } Administrateurs
|
|
%th{ scope: 'col' } Statut
|
|
%th{ scope: 'col' } Date
|
|
%th{ scope: 'col' } Action
|
|
%tbody{ 'data-turbo': 'true' }
|
|
- @procedures.each do |procedure|
|
|
= render partial: 'detail', locals: { procedure: procedure, show_detail: false }
|
|
.fr-mt-2w= paginate @procedures, views_prefix: 'administrateurs'
|