From 87884e64a92447c61e1f455d1133c5554315634d Mon Sep 17 00:00:00 2001 From: Benjamin Dauvergne Date: Fri, 4 Dec 2020 12:28:36 +0100 Subject: [PATCH 2/2] alpes-maritimes-2018: add search services (#49120) --- static/alpes-maritimes-2018/config.json | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/static/alpes-maritimes-2018/config.json b/static/alpes-maritimes-2018/config.json index ecaeb81e..062eb610 100644 --- a/static/alpes-maritimes-2018/config.json +++ b/static/alpes-maritimes-2018/config.json @@ -10,6 +10,25 @@ "label": "Pictogramme dossier handicap" } }, + "COMBO_SEARCH_SERVICES": { + "users": { + "url": "{{eservices_url}}api/users/?q=%(q)s{% if user_nameid %}&NameID={{ user_nameid }}{% endif %}", + "label": "Usagers", + "signature": true, + "hit_url_template": "fiche-usager/{{user_name_identifier_0}}/", + "hit_label_template": "{{text}}", + "hit_description_template": "{% if user_var_city %}{{ user_var_address|default:'' }} {{ user_var_city }}{% endif %}" + }, + "users-senior-a2": { + "url": "{{ idp_url }}api/users/?ou__slug=senior&q=%(q)s", + "label": "Seniors", + "signature": true, + "data_key": "results", + "hit_url_template": "page-senior/{{ uuid }}/", + "hit_label_template": "{{ last_name|upper }} {{ first_name }} {% if birthdate %} - {{ birthdate|date:'d/m/Y' }}{% endif %}", + "hit_description_template": "{% if address or zipcode or city %}📨 {% endif %}{% if address %}{{ address }} {% endif %}{% if zipcode %}{{ zipcode }} {% endif %}{% if city %}{{ city }}{% endif %}" + } + }, "JSON_CELL_TYPES.update": { "desappairage": { "form": [ -- 2.29.2