use common layout for all procedures and admins
This commit is contained in:
parent
5f5b6bf7c7
commit
3a15178cee
4 changed files with 163 additions and 223 deletions
|
@ -1,5 +1,7 @@
|
||||||
module Administrateurs
|
module Administrateurs
|
||||||
class ProceduresController < AdministrateurController
|
class ProceduresController < AdministrateurController
|
||||||
|
layout 'all', only: [:all, :administrateurs]
|
||||||
|
|
||||||
before_action :retrieve_procedure, only: [:champs, :annotations, :modifications, :edit, :zones, :monavis, :update_monavis, :jeton, :update_jeton, :publication, :publish, :transfert, :close, :allow_expert_review, :experts_require_administrateur_invitation, :reset_draft]
|
before_action :retrieve_procedure, only: [:champs, :annotations, :modifications, :edit, :zones, :monavis, :update_monavis, :jeton, :update_jeton, :publication, :publish, :transfert, :close, :allow_expert_review, :experts_require_administrateur_invitation, :reset_draft]
|
||||||
before_action :procedure_revisable?, only: [:champs, :annotations, :modifications, :reset_draft]
|
before_action :procedure_revisable?, only: [:champs, :annotations, :modifications, :reset_draft]
|
||||||
before_action :draft_valid?, only: [:apercu]
|
before_action :draft_valid?, only: [:apercu]
|
||||||
|
|
|
@ -1,108 +1,43 @@
|
||||||
= render 'main_menu'
|
- content_for :results do
|
||||||
.fr-container
|
.main-filter-header.fr-my-3w
|
||||||
%h1.fr-my-4w Toutes les démarches
|
.search
|
||||||
|
= link_to 'Voir la liste des démarches', all_admin_procedures_path(@filter.params), class: 'fr-btn fr-btn--secondary btn-admins'
|
||||||
.fr-container--fluid
|
.fr-table.fr-table--bordered
|
||||||
.fr-grid-row.fr-grid-row--gutters
|
%table#all-admins
|
||||||
.fr-col-8
|
%caption
|
||||||
.fr-highlight.fr-mb-4w
|
= "#{@filter.admins_result.total_count} administrateurs"
|
||||||
%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.
|
%span.hidden.fr-icon-ball-pen-fill{ 'aria-hidden': 'true', 'data-autosubmit-target': 'spinner' }
|
||||||
|
- if @filter.selected_zones.present?
|
||||||
.fr-container--fluid{ 'data-turbo': 'true', 'data-controller': 'autosubmit' }
|
.selected-zones.fr-mb-2w
|
||||||
.fr-grid-row.fr-grid-row--gutters
|
- @filter.selected_zones.each do |zone|
|
||||||
.fr-col-3
|
= link_to zone.current_label, all_admin_procedures_path(@filter.without(:zone_ids, zone.id)), class: 'fr-tag fr-tag--dismiss fr-mb-1w'
|
||||||
= form_with(url: all_admin_procedures_path, method: :get, html: {'data-autosubmit-target': 'form'}) do |f|
|
- if @filter.statuses.present?
|
||||||
|
.selected-statuses.fr-mb-2w
|
||||||
%fieldset.sidebar-filter
|
- @filter.statuses.each do |status|
|
||||||
%legend
|
= link_to status, all_admin_procedures_path(@filter.without(:statuses, status)), class: 'fr-tag fr-tag--dismiss fr-mb-1w'
|
||||||
.title.font-weight-bold.fr-pl-2w
|
- if @filter.from_publication_date.present?
|
||||||
%span.fr-icon-filter-fill.fr-icon--sm.fr-mr-1w{ 'aria-hidden': 'true' }
|
.selected-from-publication-date.fr-mb-2w
|
||||||
Filtrer
|
= 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'
|
||||||
.reinit
|
= paginate @filter.admins_result, views_prefix: 'administrateurs'
|
||||||
= link_to all_admin_procedures_path(zone_ids: current_administrateur.zones) do
|
%thead
|
||||||
%span.fr-icon-arrow-go-back-line Réinitialiser
|
%tr
|
||||||
%ul
|
%th{ scope: 'col' }
|
||||||
%li.fr-py-2w.fr-pl-2w{ 'data-controller': "expand" }
|
%th{ scope: 'col' } Administrateurs
|
||||||
.fr-mb-1w
|
%th{ scope: 'col' } Nb démarches
|
||||||
%button{ 'data-action': 'expand#toggle' }
|
%th{ scope: 'col' } Inscrit le
|
||||||
%span.fr-icon-add-line.fr-icon--sm.fr-mr-1w.fr-text-action-high--blue-france{ 'aria-hidden': 'true', 'data-expand-target': 'icon' }
|
- @filter.admins_result.each do |admin|
|
||||||
Mes zones
|
%tbody{ 'data-controller': 'expand' }
|
||||||
.fr-ml-1w{ 'data-expand-target': 'content' }
|
%tr.procedure{ 'data-action': 'click->expand#toggle' }
|
||||||
= f.collection_check_boxes :zone_ids, @filter.admin_zones, :id, :current_label, include_hidden: false do |b|
|
%td
|
||||||
.fr-checkbox-group.fr-ml-2w.fr-py-1w
|
%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' }
|
||||||
= b.check_box(checked: @filter.zone_filtered?(b.value), 'data-action': 'autosubmit#submit')
|
%td= admin.email
|
||||||
= b.label(class: 'fr-label') { b.text }
|
%td= admin.procedures.count
|
||||||
%li.fr-py-2w.fr-pl-2w{ 'data-controller': "expand" }
|
%td= l(admin.created_at, format: :message_date_without_time)
|
||||||
.fr-mb-1w
|
%tr.hidden{ 'data-expand-target': 'content' }
|
||||||
%button{ 'data-action': 'expand#toggle' }
|
%td.fr-highlight--beige-gris-galet{ colspan: '6' }
|
||||||
%span.fr-icon-add-line.fr-icon--sm.fr-mr-1w.fr-text-action-high--blue-france{ 'aria-hidden': 'true', 'data-expand-target': 'icon' }
|
.fr-container
|
||||||
Autres zones
|
.fr-col-12.fr-mr-1w
|
||||||
.fr-ml-1w.hidden{ 'data-expand-target': 'content' }
|
%ul
|
||||||
= f.collection_check_boxes :zone_ids, @filter.other_zones, :id, :current_label, include_hidden: false do |b|
|
- admin.procedures.each do |procedure|
|
||||||
.fr-checkbox-group.fr-ml-2w.fr-py-1w
|
%li= procedure.libelle
|
||||||
= b.check_box(checked: @filter.zone_filtered?(b.value), 'data-action': 'autosubmit#submit')
|
.fr-mt-2w= paginate @filter.admins_result, views_prefix: 'administrateurs'
|
||||||
= b.label(class: 'fr-label') { b.text }
|
|
||||||
%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
|
|
||||||
= f.date_field 'from_publication_date', value: @filter.from_publication_date, class: 'fr-input', 'data-action': 'blur->autosubmit#submit change->autosubmit#debouncedSubmit'
|
|
||||||
|
|
||||||
%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
|
|
||||||
= b.check_box(checked: @filter.status_filtered?(b.value), 'data-action': 'autosubmit#submit')
|
|
||||||
= b.label(class: 'fr-label') { t b.text, scope: 'activerecord.attributes.procedure.aasm_state' }
|
|
||||||
|
|
||||||
.fr-col-9
|
|
||||||
.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
|
|
||||||
= "#{@filter.admins_result.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 @filter.admins_result, views_prefix: 'administrateurs'
|
|
||||||
%thead
|
|
||||||
%tr
|
|
||||||
%th{ scope: 'col' }
|
|
||||||
%th{ scope: 'col' } Administrateurs
|
|
||||||
%th{ scope: 'col' } Nb démarches
|
|
||||||
%th{ scope: 'col' } Inscrit le
|
|
||||||
- @filter.admins_result.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 @filter.admins_result, views_prefix: 'administrateurs'
|
|
||||||
|
|
|
@ -1,115 +1,50 @@
|
||||||
= render 'main_menu'
|
- content_for :results do
|
||||||
.fr-container
|
.main-filter-header.fr-my-3w
|
||||||
%h1.fr-my-4w Toutes les démarches
|
.search
|
||||||
|
= link_to 'Voir la liste des administrateurs', administrateurs_admin_procedures_path(@filter.params), class: 'fr-btn fr-btn--secondary btn-admins'
|
||||||
.fr-container--fluid
|
.fr-table.fr-table--bordered
|
||||||
.fr-grid-row.fr-grid-row--gutters
|
%table#all-demarches
|
||||||
.fr-col-8
|
%caption
|
||||||
.fr-highlight.fr-mb-4w
|
= "#{@filter.procedures_result.total_count} démarches"
|
||||||
%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.
|
%span.hidden.fr-icon-ball-pen-fill{ 'aria-hidden': 'true', 'data-autosubmit-target': 'spinner' }
|
||||||
|
- if @filter.selected_zones.present?
|
||||||
.fr-container--fluid{ 'data-turbo': 'true', 'data-controller': 'autosubmit' }
|
.selected-zones.fr-mb-2w
|
||||||
.fr-grid-row.fr-grid-row--gutters
|
- @filter.selected_zones.each do |zone|
|
||||||
.fr-col-3
|
= link_to zone.current_label, all_admin_procedures_path(@filter.without(:zone_ids, zone.id)), class: 'fr-tag fr-tag--dismiss fr-mb-1w'
|
||||||
= form_with(url: all_admin_procedures_path, method: :get, html: {'data-autosubmit-target': 'form'}) do |f|
|
- if @filter.statuses.present?
|
||||||
|
.selected-statuses.fr-mb-2w
|
||||||
%fieldset.sidebar-filter
|
- @filter.statuses.each do |status|
|
||||||
%legend
|
= link_to status, all_admin_procedures_path(@filter.without(:statuses, status)), class: 'fr-tag fr-tag--dismiss fr-mb-1w'
|
||||||
.title.font-weight-bold.fr-pl-2w
|
- if @filter.from_publication_date.present?
|
||||||
%span.fr-icon-filter-fill.fr-icon--sm.fr-mr-1w{ 'aria-hidden': 'true' }
|
.selected-from-publication-date.fr-mb-2w
|
||||||
Filtrer
|
= 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'
|
||||||
.reinit
|
= paginate @filter.procedures_result, views_prefix: 'administrateurs'
|
||||||
= link_to all_admin_procedures_path(zone_ids: current_administrateur.zones) do
|
%thead
|
||||||
%span.fr-icon-arrow-go-back-line Réinitialiser
|
%tr
|
||||||
%ul
|
%th{ scope: 'col' }
|
||||||
%li.fr-py-2w.fr-pl-2w{ 'data-controller': "expand" }
|
%th{ scope: 'col' } Démarche
|
||||||
.fr-mb-1w
|
%th{ scope: 'col' } N°
|
||||||
%button{ 'data-action': 'expand#toggle' }
|
%th{ scope: 'col' } Administrateurs
|
||||||
%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{ scope: 'col' } Statut
|
||||||
Mes zones
|
%th{ scope: 'col' } Date
|
||||||
.fr-ml-1w{ 'data-expand-target': 'content' }
|
- @filter.procedures_result.each do |procedure|
|
||||||
= f.collection_check_boxes :zone_ids, @filter.admin_zones, :id, :current_label, include_hidden: false do |b|
|
%tbody{ 'data-controller': 'expand' }
|
||||||
.fr-checkbox-group.fr-ml-2w.fr-py-1w
|
%tr.procedure{ 'data-action': 'click->expand#toggle' }
|
||||||
= b.check_box(checked: @filter.zone_filtered?(b.value), 'data-action': 'autosubmit#submit')
|
%td
|
||||||
= b.label(class: 'fr-label') { b.text }
|
%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' }
|
||||||
%li.fr-py-2w.fr-pl-2w{ 'data-controller': "expand" }
|
%td= procedure.libelle
|
||||||
.fr-mb-1w
|
%td= procedure.id
|
||||||
%button{ 'data-action': 'expand#toggle' }
|
%td= procedure.administrateurs.count
|
||||||
%span.fr-icon-add-line.fr-icon--sm.fr-mr-1w.fr-text-action-high--blue-france{ 'aria-hidden': 'true', 'data-expand-target': 'icon' }
|
%td= t procedure.aasm_state, scope: 'activerecord.attributes.procedure.aasm_state'
|
||||||
Autres zones
|
%td= l(procedure.published_at, format: :message_date_without_time)
|
||||||
.fr-ml-1w.hidden{ 'data-expand-target': 'content' }
|
%tr.hidden{ 'data-expand-target': 'content' }
|
||||||
= f.collection_check_boxes :zone_ids, @filter.other_zones, :id, :current_label, include_hidden: false do |b|
|
%td.fr-highlight--beige-gris-galet{ colspan: '6' }
|
||||||
.fr-checkbox-group.fr-ml-2w.fr-py-1w
|
.fr-container
|
||||||
= b.check_box(checked: @filter.zone_filtered?(b.value), 'data-action': 'autosubmit#submit')
|
.fr-grid-row
|
||||||
= b.label(class: 'fr-label') { b.text }
|
.fr-col-6
|
||||||
%li.fr-py-2w{ 'data-controller': "expand" }
|
- procedure.zones.uniq.each do |zone|
|
||||||
.fr-mb-1w.fr-pl-2w
|
= zone.label_at(procedure.published_or_created_at)
|
||||||
%button{ 'data-action': 'click->expand#toggle' }
|
.fr-col-6
|
||||||
%span.fr-icon-add-line.fr-icon--sm.fr-mr-1w.fr-text-action-high--blue-france{ 'aria-hidden': 'true', 'data-expand-target': 'icon' }
|
- procedure.administrateurs.uniq.each do |admin|
|
||||||
Date de publication
|
= admin.email
|
||||||
.fr-input-group.hidden{ 'data-expand-target': 'content' }
|
.fr-mt-2w= paginate @filter.procedures_result, views_prefix: 'administrateurs'
|
||||||
= f.label 'from_publication_date', 'Depuis', class: 'fr-label'
|
|
||||||
.fr-input-wrap.fr-fi-calendar-line
|
|
||||||
= f.date_field 'from_publication_date', value: @filter.from_publication_date, class: 'fr-input', 'data-action': 'blur->autosubmit#submit change->autosubmit#debouncedSubmit'
|
|
||||||
|
|
||||||
%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
|
|
||||||
= b.check_box(checked: @filter.status_filtered?(b.value), 'data-action': 'autosubmit#submit')
|
|
||||||
= b.label(class: 'fr-label') { t b.text, scope: 'activerecord.attributes.procedure.aasm_state' }
|
|
||||||
|
|
||||||
.fr-col-9
|
|
||||||
.main-filter-header.fr-my-3w
|
|
||||||
.search
|
|
||||||
= link_to 'Voir la liste des administrateurs', administrateurs_admin_procedures_path(@filter.params), class: 'fr-btn fr-btn--secondary btn-admins'
|
|
||||||
.fr-table.fr-table--bordered
|
|
||||||
%table#all-demarches
|
|
||||||
%caption
|
|
||||||
= "#{@filter.procedures_result.total_count} démarches"
|
|
||||||
%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 #{l(@filter.from_publication_date)}", all_admin_procedures_path(@filter.without(:from_publication_date)), class: 'fr-tag fr-tag--dismiss fr-mb-1w'
|
|
||||||
= paginate @filter.procedures_result, views_prefix: 'administrateurs'
|
|
||||||
%thead
|
|
||||||
%tr
|
|
||||||
%th{ scope: 'col' }
|
|
||||||
%th{ scope: 'col' } Démarche
|
|
||||||
%th{ scope: 'col' } N°
|
|
||||||
%th{ scope: 'col' } Administrateurs
|
|
||||||
%th{ scope: 'col' } Statut
|
|
||||||
%th{ scope: 'col' } Date
|
|
||||||
- @filter.procedures_result.each do |procedure|
|
|
||||||
%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= procedure.libelle
|
|
||||||
%td= procedure.id
|
|
||||||
%td= procedure.administrateurs.count
|
|
||||||
%td= t procedure.aasm_state, scope: 'activerecord.attributes.procedure.aasm_state'
|
|
||||||
%td= l(procedure.published_at, format: :message_date_without_time)
|
|
||||||
%tr.hidden{ 'data-expand-target': 'content' }
|
|
||||||
%td.fr-highlight--beige-gris-galet{ colspan: '6' }
|
|
||||||
.fr-container
|
|
||||||
.fr-grid-row
|
|
||||||
.fr-col-6
|
|
||||||
- procedure.zones.uniq.each do |zone|
|
|
||||||
= zone.label_at(procedure.published_or_created_at)
|
|
||||||
.fr-col-6
|
|
||||||
- procedure.administrateurs.uniq.each do |admin|
|
|
||||||
= admin.email
|
|
||||||
.fr-mt-2w= paginate @filter.procedures_result, views_prefix: 'administrateurs'
|
|
||||||
|
|
68
app/views/layouts/all.html.haml
Normal file
68
app/views/layouts/all.html.haml
Normal file
|
@ -0,0 +1,68 @@
|
||||||
|
= render 'main_menu'
|
||||||
|
.fr-container
|
||||||
|
%h1.fr-my-4w Toutes les démarches
|
||||||
|
|
||||||
|
.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.
|
||||||
|
|
||||||
|
.fr-container--fluid{ 'data-turbo': 'true', 'data-controller': 'autosubmit' }
|
||||||
|
.fr-grid-row.fr-grid-row--gutters
|
||||||
|
.fr-col-3
|
||||||
|
= form_with(url: all_admin_procedures_path, method: :get, html: {'data-autosubmit-target': 'form'}) do |f|
|
||||||
|
|
||||||
|
%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
|
||||||
|
= link_to all_admin_procedures_path(zone_ids: current_administrateur.zones) do
|
||||||
|
%span.fr-icon-arrow-go-back-line Réinitialiser
|
||||||
|
%ul
|
||||||
|
%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' }
|
||||||
|
Mes zones
|
||||||
|
.fr-ml-1w{ 'data-expand-target': 'content' }
|
||||||
|
= f.collection_check_boxes :zone_ids, @filter.admin_zones, :id, :current_label, include_hidden: false do |b|
|
||||||
|
.fr-checkbox-group.fr-ml-2w.fr-py-1w
|
||||||
|
= b.check_box(checked: @filter.zone_filtered?(b.value), 'data-action': 'autosubmit#submit')
|
||||||
|
= 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' }
|
||||||
|
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|
|
||||||
|
.fr-checkbox-group.fr-ml-2w.fr-py-1w
|
||||||
|
= b.check_box(checked: @filter.zone_filtered?(b.value), 'data-action': 'autosubmit#submit')
|
||||||
|
= b.label(class: 'fr-label') { b.text }
|
||||||
|
%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
|
||||||
|
= f.date_field 'from_publication_date', value: @filter.from_publication_date, class: 'fr-input', 'data-action': 'blur->autosubmit#submit change->autosubmit#debouncedSubmit'
|
||||||
|
|
||||||
|
%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
|
||||||
|
= b.check_box(checked: @filter.status_filtered?(b.value), 'data-action': 'autosubmit#submit')
|
||||||
|
= b.label(class: 'fr-label') { t b.text, scope: 'activerecord.attributes.procedure.aasm_state' }
|
||||||
|
|
||||||
|
.fr-col-9
|
||||||
|
= yield(:results)
|
||||||
|
= render template: 'layouts/application'
|
Loading…
Add table
Add a link
Reference in a new issue