From 7b28a652ab6bf1afe10b1762e78b3d9eea2e41e0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stephan=20B=C3=B6sch-Plepelits?= Date: Tue, 18 Aug 2020 07:22:34 +0200 Subject: [PATCH] Leisure: Add access filter --- leisure.json | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/leisure.json b/leisure.json index e39dd073..58af7a12 100644 --- a/leisure.json +++ b/leisure.json @@ -41,5 +41,37 @@ " {% endif %}", "{% endif %}" ] + }, + "filter": { + "access": { + "name": "{{ keyTrans('access') }}", + "type": "select", + "show_default": "true", + "placeholder": "{{ trans(\"tag:access!=private\") }}", + "valueName": "{{ tagTrans(\"access\", value) }}", + "values": { + "*": { + "name": "{{ trans('any value') }}", + "query": "nwr", + "weight": -1 + }, + "yes": {}, + "private": {}, + "permissive": {}, + "customers": {}, + "discouraged": {}, + "unknown": { + "name": "{{ trans(\"unknown\") }}", + "query": "(nwr[\"access\"=\"unknown\"];nwr[!access];)", + "weight": 1 + }, + "?": { + "name": "{{ trans(\"other\") }}", + "query": "nwr[access][\"access\"!~\"^(public|private|permissive|customers|discouraged|unknown|yes)$\"]", + "weight": 1 + } + }, + "emptyQuery": "nwr[\"access\"!=\"private\"]" + } } }