From 868f069f7cdd0c81675ca69720fa2f2aee37f468 Mon Sep 17 00:00:00 2001 From: Antoine Girard Date: Mon, 28 Oct 2024 16:09:36 +0100 Subject: [PATCH] =?UTF-8?q?Page=20de=20contacts:=20tri=20et=20groupement?= =?UTF-8?q?=20par=20d=C3=A9partement?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/static_pages/contact.html.slim | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/app/views/static_pages/contact.html.slim b/app/views/static_pages/contact.html.slim index c0e27c70e9..aa9c7e2412 100644 --- a/app/views/static_pages/contact.html.slim +++ b/app/views/static_pages/contact.html.slim @@ -1,14 +1,16 @@ - content_for :title, "Contact" -h2 Votre département -ul.list-group.mb-2 - - Territory.where.not(phone_number: nil).each do |territory| - li - span> #{territory} - = link_to territory.phone_number, "tel:#{territory.phone_number_formatted}" - li - span> Autres départements, voir - = link_to "l'annuaire des services publics", "https://lannuaire.service-public.fr/" +- Territory.where.not(phone_number_formatted: nil).order(:departement_number, :name).group_by(&:departement_number).each do |department_number, territories| + h3 #{department_number} + ul.list-group.mb-2 + - territories.each do |territory| + li + span> #{territory.name} + = link_to territory.phone_number, "tel:#{territory.phone_number_formatted}" + +h3 Autres contacts +span> Voir += link_to "l'annuaire des services publics", "https://lannuaire.service-public.fr/" .fr-grid-row.mt-4#tech-support .fr-col-md-8