2023-10-30 15:37:04 +01:00
- content_for(:main_navigation) do
= render 'administrateurs/main_navigation'
2022-11-18 06:50:45 +01:00
- content_for :content do
.fr-container
%h1.fr-my-4w Toutes les démarches
2022-11-10 15:15:48 +01:00
2022-11-18 06:50:45 +01:00
.fr-container--fluid
.fr-grid-row.fr-grid-row--gutters
.fr-col-8
.fr-highlight.fr-mb-4w
%p Ce tableau de bord permet de consulter les informations sur les démarches simplifiées pour toutes les zones. Filtrez par zone et statut. Consultez la liste des démarches et cliquez sur une démarche pour voir la zone et quels sont les administrateurs.
2022-11-10 15:15:48 +01:00
2023-01-11 21:47:44 +01:00
.fr-container--fluid{ data: { turbo: 'true' } }
2023-02-28 14:05:11 +01:00
%turbo-frame#procedures.fr-grid-row.fr-grid-row--gutters{ 'data-turbo-action': 'advance' }
2022-11-18 06:50:45 +01:00
.fr-col-3
2023-01-11 21:47:44 +01:00
= form_with(url: all_admin_procedures_path, method: :get, data: { controller: 'autosubmit', turbo_frame: 'procedures' }) do |f|
2022-11-10 15:15:48 +01:00
2022-11-18 06:50:45 +01:00
%fieldset.sidebar-filter
%legend
.title.font-weight-bold.fr-pl-2w
%span.fr-icon-filter-fill.fr-icon--sm.fr-mr-1w{ 'aria-hidden': 'true' }
Filtrer
.reinit
2023-02-28 14:05:11 +01:00
= link_to all_admin_procedures_path(zone_ids: current_administrateur.zones), { data: { turbo: 'false' } } do
2022-11-18 06:50:45 +01:00
%span.fr-icon-arrow-go-back-line Réinitialiser
%ul
2024-05-21 11:56:50 +02:00
2024-10-01 11:19:03 +02:00
%li.fr-py-2w.fr-pl-2w{ 'data-controller': "expand" }
.fr-mb-1w
%button{ 'data-action': 'expand#toggle' }
%span.fr-icon-add-line.fr-icon--sm.fr-mr-1w.fr-text-action-high--blue-france{ 'aria-hidden': 'true', 'data-expand-target': 'icon' }
Thématique
.fr-ml-1w.hidden{ 'data-expand-target': 'content' }
%div
= f.search_field :tags, placeholder: 'Choisissez un thème', list: 'tags_list', class: 'fr-input', data: { no_autosubmit: 'input', turbo_force: :server }, multiple: true
%datalist#tags_list
- ProcedureTag.order(:name).each do |tag|
%option{ value: tag.name, data: { id: tag.id } }
- if @filter.tags.present?
- @filter.tags.each do |tag|
= f.hidden_field :tags, value: tag, multiple: true, id: "tag-#{tag.tr(' ', '_')}"
2022-11-18 06:50:45 +01:00
%li.fr-py-2w.fr-pl-2w{ 'data-controller': "expand" }
.fr-mb-1w
%button{ 'data-action': 'expand#toggle' }
%span.fr-icon-add-line.fr-icon--sm.fr-mr-1w.fr-text-action-high--blue-france{ 'aria-hidden': 'true', 'data-expand-target': 'icon' }
2024-05-21 11:56:50 +02:00
Démarches modèles
.fr-ml-1w.hidden{ 'data-expand-target': 'content' }
.fr-checkbox-group.fr-ml-2w.fr-py-1w
= f.check_box :template, class: 'fr-input'
= f.label :template, 'Modèle DS', class: 'fr-label'
%li.fr-py-2w.fr-pl-2w{ 'data-controller': "expand" }
.fr-mb-1w
%button{ 'data-action': 'expand#toggle' }
%span.fr-icon-add-line.fr-icon--sm.fr-mr-1w.fr-text-action-high--blue-france{ 'aria-hidden': 'true', 'data-expand-target': 'icon' }
Autres zones
.fr-ml-1w.hidden{ 'data-expand-target': 'content' }
= f.collection_check_boxes :zone_ids, @filter.other_zones, :id, :current_label, include_hidden: false do |b|
2022-11-18 06:50:45 +01:00
.fr-checkbox-group.fr-ml-2w.fr-py-1w
2023-01-11 21:47:44 +01:00
= b.check_box(checked: @filter.zone_filtered?(b.value))
2022-11-18 06:50:45 +01:00
= b.label(class: 'fr-label') { b.text }
%li.fr-py-2w.fr-pl-2w{ 'data-controller': "expand" }
.fr-mb-1w
%button{ 'data-action': 'expand#toggle' }
%span.fr-icon-add-line.fr-icon--sm.fr-mr-1w.fr-text-action-high--blue-france{ 'aria-hidden': 'true', 'data-expand-target': 'icon' }
2024-05-21 11:56:50 +02:00
Mes zones
2022-11-18 06:50:45 +01:00
.fr-ml-1w.hidden{ 'data-expand-target': 'content' }
2024-05-21 11:56:50 +02:00
= f.collection_check_boxes :zone_ids, @filter.admin_zones, :id, :current_label, include_hidden: false do |b|
2022-11-18 06:50:45 +01:00
.fr-checkbox-group.fr-ml-2w.fr-py-1w
2023-01-11 21:47:44 +01:00
= b.check_box(checked: @filter.zone_filtered?(b.value))
2022-11-18 06:50:45 +01:00
= b.label(class: 'fr-label') { b.text }
2023-04-10 13:42:57 +02:00
%li.fr-py-2w.fr-pl-2w{ 'data-controller': "expand" }
.fr-mb-1w
%button{ 'data-action': 'expand#toggle' }
%span.fr-icon-add-line.fr-icon--sm.fr-mr-1w.fr-text-action-high--blue-france{ 'aria-hidden': 'true', 'data-expand-target': 'icon' }
Service
.fr-ml-1w.hidden{ 'data-expand-target': 'content' }
%div
= f.text_field :service_siret, placeholder: 'Indiquez le SIRET', class: 'fr-input'
2023-10-26 15:55:36 +02:00
%li.fr-py-2w.fr-pl-2w{ 'data-controller': "expand" }
.fr-mb-1w
%button{ 'data-action': 'expand#toggle' }
%span.fr-icon-add-line.fr-icon--sm.fr-mr-1w.fr-text-action-high--blue-france{ 'aria-hidden': 'true', 'data-expand-target': 'icon' }
Département
.fr-ml-1w.hidden{ 'data-expand-target': 'content' }
%div
= f.select :service_departement,
2024-11-07 10:27:35 +01:00
APIGeoService.departement_options,
2023-10-26 15:55:36 +02:00
{ selected: @filter.service_departement, include_blank: ''},
id: "service_dep_select",
class: 'fr-select'
2024-05-21 11:56:50 +02:00
%li.fr-py-2w.fr-pl-2w{ 'data-controller': "expand" }
.fr-mb-1w
%button{ 'data-action': 'expand#toggle' }
%span.fr-icon-add-line.fr-icon--sm.fr-mr-1w.fr-text-action-high--blue-france{ 'aria-hidden': 'true', 'data-expand-target': 'icon' }
Type d'usager
.fr-ml-1w.hidden{ 'data-expand-target': 'content' }
= f.collection_check_boxes :kind_usagers, ['individual', 'personne_morale'], :to_s, :to_s, include_hidden: false do |b|
.fr-checkbox-group.fr-ml-2w.fr-py-1w
= b.check_box(checked: @filter.kind_usager_filtered?(b.value))
= b.label(class: 'fr-label') { t b.text, scope: 'activerecord.attributes.procedure.kind_usager' }
2022-11-18 06:50:45 +01:00
%li.fr-py-2w{ 'data-controller': "expand" }
.fr-mb-1w.fr-pl-2w
%button{ 'data-action': 'click->expand#toggle' }
%span.fr-icon-add-line.fr-icon--sm.fr-mr-1w.fr-text-action-high--blue-france{ 'aria-hidden': 'true', 'data-expand-target': 'icon' }
Date de publication
.fr-input-group.hidden{ 'data-expand-target': 'content' }
= f.label 'from_publication_date', 'Depuis', class: 'fr-label'
.fr-input-wrap.fr-fi-calendar-line
2023-01-11 21:47:44 +01:00
= f.date_field 'from_publication_date', value: @filter.from_publication_date, class: 'fr-input'
2022-11-10 15:15:48 +01:00
2022-11-18 06:50:45 +01:00
%li.fr-py-2w.fr-pl-2w{ 'data-controller': "expand" }
.fr-mb-1w
%button{ 'data-action': 'expand#toggle' }
%span.fr-icon-add-line.fr-icon--sm.fr-mr-1w.fr-text-action-high--blue-france{ 'aria-hidden': 'true', 'data-expand-target': 'icon' }
Statut
.fr-ml-1w.hidden{ 'data-expand-target': 'content' }
= f.collection_check_boxes :statuses, ['publiee', 'close'], :to_s, :to_s, include_hidden: false do |b|
.fr-checkbox-group.fr-ml-2w.fr-py-1w
2023-01-11 21:47:44 +01:00
= b.check_box(checked: @filter.status_filtered?(b.value))
2022-11-18 06:50:45 +01:00
= b.label(class: 'fr-label') { t b.text, scope: 'activerecord.attributes.procedure.aasm_state' }
2022-11-10 15:15:48 +01:00
2023-02-28 14:05:11 +01:00
.fr-col-9
2022-11-18 06:50:45 +01:00
= yield(:results)
2022-11-10 15:15:48 +01:00
= render template: 'layouts/application'