2022-11-10 15:15:48 +01:00
|
|
|
|
- content_for :results do
|
|
|
|
|
.main-filter-header.fr-my-3w
|
2023-01-11 21:47:44 +01:00
|
|
|
|
= form_with(url: all_admin_procedures_path, method: :get, data: { turbo_frame: 'procedures' }, html: { role: 'search', class: 'search' }) do |f|
|
2022-11-16 11:03:23 +01:00
|
|
|
|
- @filter.zone_ids&.each do |zone_id|
|
2023-02-28 14:05:11 +01:00
|
|
|
|
= hidden_field_tag 'zone_ids[]', zone_id, id: "zone_#{zone_id}"
|
2022-11-16 11:03:23 +01:00
|
|
|
|
- @filter.statuses&.each do |status|
|
2023-02-28 14:05:11 +01:00
|
|
|
|
= hidden_field_tag 'statuses[]', status, id: "status_#{status}"
|
2023-03-02 00:04:30 +01:00
|
|
|
|
- @filter.tags&.each do|tag|
|
|
|
|
|
= hidden_field_tag 'tags[]', tag, id: "tag_#{tag}"
|
2022-11-16 11:03:23 +01:00
|
|
|
|
= 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'
|
2023-06-01 15:58:55 +02:00
|
|
|
|
= f.search_field 'libelle', size: 30, class: 'fr-input', data: { turbo_force: :server }
|
2022-11-24 16:37:47 +01:00
|
|
|
|
.actions
|
|
|
|
|
.link.fr-mx-1w= link_to 'Voir les administrateurs', administrateurs_admin_procedures_path(@filter.params), class: 'fr-btn fr-btn--secondary'
|
2023-02-13 15:08:55 +01:00
|
|
|
|
.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'
|
2022-11-10 15:15:48 +01:00
|
|
|
|
.fr-table.fr-table--bordered
|
|
|
|
|
%table#all-demarches
|
|
|
|
|
%caption
|
2023-02-02 06:59:46 +01:00
|
|
|
|
= "#{@procedures.total_count} #{t('pluralize.procedures', count: @procedures.total_count)}"
|
2023-01-05 15:51:24 +01:00
|
|
|
|
%span.hidden.spinner{ 'aria-hidden': 'true', 'data-turbo-target': 'spinner' }
|
2022-11-16 11:03:23 +01:00
|
|
|
|
- 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'
|
2023-04-10 13:42:57 +02:00
|
|
|
|
- if @filter.service_siret
|
|
|
|
|
.selected-query.fr-mb-2w
|
|
|
|
|
= link_to @filter.service_siret, all_admin_procedures_path(@filter.without(:service_siret)), class: 'fr-tag fr-tag--dismiss fr-mb-1w'
|
2023-10-26 15:55:36 +02:00
|
|
|
|
- if @filter.service_departement
|
|
|
|
|
.selected-query.fr-mb-2w
|
2023-10-27 17:27:50 +02:00
|
|
|
|
= link_to "#{@filter.service_departement} – #{APIGeoService.departement_name(@filter.service_departement)}", all_admin_procedures_path(@filter.without(:service_departement)), class: 'fr-tag fr-tag--dismiss fr-mb-1w'
|
2022-11-10 15:15:48 +01:00
|
|
|
|
- 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'
|
2023-03-02 00:04:30 +01:00
|
|
|
|
- if @filter.tags.present?
|
2023-01-10 12:06:39 +01:00
|
|
|
|
.selected-tag.fr-mb-2w
|
2023-03-02 00:04:30 +01:00
|
|
|
|
- @filter.tags.each do |tag|
|
|
|
|
|
= link_to tag, all_admin_procedures_path(@filter.without(:tags, tag)), class: 'fr-tag fr-tag--dismiss fr-mb-1w'
|
|
|
|
|
- params[:tags].delete(tag)
|
2024-01-30 11:16:24 +01:00
|
|
|
|
- if @filter.template?
|
|
|
|
|
.selected-template.fr-mb-2w
|
|
|
|
|
= link_to "Modèle DS", all_admin_procedures_path(@filter.without(:template)), class: 'fr-tag fr-tag--dismiss fr-mb-1w'
|
2022-11-10 15:15:48 +01:00
|
|
|
|
- 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'
|
2023-04-24 10:26:03 +02:00
|
|
|
|
= paginate @procedures, params: @filter.params, views_prefix: 'shared'
|
2022-11-10 15:15:48 +01:00
|
|
|
|
%thead
|
|
|
|
|
%tr
|
|
|
|
|
%th{ scope: 'col' }
|
|
|
|
|
%th{ scope: 'col' } Démarche
|
2023-02-02 06:59:46 +01:00
|
|
|
|
%th{ scope: 'col' } №
|
2023-01-03 14:58:46 +01:00
|
|
|
|
%th{ scope: 'col' } Dossiers
|
2022-11-10 15:15:48 +01:00
|
|
|
|
%th{ scope: 'col' } Administrateurs
|
|
|
|
|
%th{ scope: 'col' } Statut
|
|
|
|
|
%th{ scope: 'col' } Date
|
2023-02-02 06:59:46 +01:00
|
|
|
|
%th{ scope: 'col' } Action
|
2022-12-01 19:59:34 +01:00
|
|
|
|
%tbody{ 'data-turbo': 'true' }
|
|
|
|
|
- @procedures.each do |procedure|
|
2023-01-06 17:53:20 +01:00
|
|
|
|
= render partial: 'detail', locals: { procedure: procedure, show_detail: false }
|
2023-04-21 17:19:17 +02:00
|
|
|
|
.fr-mt-2w= paginate @procedures, params: @filter.params, views_prefix: 'shared'
|