fix(procedures): turbo force server, fix table JS style
This commit is contained in:
parent
5d6e35c540
commit
8ebdb00fc2
1 changed files with 35 additions and 34 deletions
|
@ -15,7 +15,40 @@
|
|||
.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--sm.fr-table--no-scroll.fr-table--bordered
|
||||
- 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.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'
|
||||
- if @filter.service_departement
|
||||
.selected-query.fr-mb-2w
|
||||
= 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'
|
||||
- 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.kind_usagers.present?
|
||||
.selected-kind_usagers.fr-mb-2w
|
||||
- @filter.kind_usagers.each do |kind_usager|
|
||||
= link_to t(kind_usager, scope: 'activerecord.attributes.procedure.kind_usager'), all_admin_procedures_path(@filter.without(:kind_usagers, kind_usager)), class: 'fr-tag fr-tag--dismiss fr-mb-1w'
|
||||
- if @filter.tags.present?
|
||||
.selected-tag.fr-mb-2w
|
||||
- @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)
|
||||
- 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'
|
||||
- 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'
|
||||
|
||||
.fr-table.fr-table--sm.fr-table--no-scroll.fr-table--bordered{ 'data-turbo': 'true', 'data-turbo-force': 'server' }
|
||||
.fr-table__wrapper
|
||||
.fr-table__container
|
||||
.fr-table__content
|
||||
|
@ -23,38 +56,6 @@
|
|||
%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.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'
|
||||
- if @filter.service_departement
|
||||
.selected-query.fr-mb-2w
|
||||
= 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'
|
||||
- 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.kind_usagers.present?
|
||||
.selected-kind_usagers.fr-mb-2w
|
||||
- @filter.kind_usagers.each do |kind_usager|
|
||||
= link_to t(kind_usager, scope: 'activerecord.attributes.procedure.kind_usager'), all_admin_procedures_path(@filter.without(:kind_usagers, kind_usager)), class: 'fr-tag fr-tag--dismiss fr-mb-1w'
|
||||
- if @filter.tags.present?
|
||||
.selected-tag.fr-mb-2w
|
||||
- @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)
|
||||
- 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'
|
||||
- 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'
|
||||
|
||||
%thead
|
||||
%tr
|
||||
|
@ -66,7 +67,7 @@
|
|||
%th{ scope: 'col' } Statut
|
||||
%th{ scope: 'col' } Date
|
||||
%th{ scope: 'col' } Action
|
||||
%tbody{ 'data-turbo': 'true' }
|
||||
%tbody
|
||||
- @procedures.each do |procedure|
|
||||
= render partial: 'detail', locals: { procedure: procedure, show_detail: false }
|
||||
.fr-table__footer
|
||||
|
|
Loading…
Reference in a new issue