From 4c540a699c166a4fb3ddc28d7b2ba619f40f6bb6 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Stephan=20B=C3=B6sch-Plepelits?= <skunk@xover.mud.at>
Date: Mon, 25 Mar 2019 22:03:47 +0100
Subject: [PATCH] natural: add a type filter

---
 natural.json | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/natural.json b/natural.json
index a990455..faec7c0 100644
--- a/natural.json
+++ b/natural.json
@@ -46,6 +46,17 @@
         "markerSymbol": "{{ markerPointer({ fillColor: const[tags.natural].color|default('#f2756a') })|raw }}",
         "listMarkerSymbol": "{{ markerCircle({ fillColor: const[tags.natural].color|default('#f2756a') })|raw }}"
     },
+    "filter": {
+        "type": {
+            "name": "{{ trans('filter:type') }}",
+            "key": "natural",
+            "type": "select",
+            "show_default": "true",
+            "values": "{% set list = [] %}{% for k, v in const %}<option value=\"{{ k }}\">{% set list = list|merge([ k ]) %}{{ tagTrans('natural', k) }}</option>{% endfor %}<option weight='1' value='other' query='nwr[natural][natural!~\"^(|.*;)({{ list|join('|') }})(|;.*)$\"]'>{{ trans('other') }}</option>",
+            "sort": "natsort",
+            "op": "has"
+        }
+    },
     "const": {
         "wood": {
             "sign": "<i class='fas fa-tree'></i>",