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 1/5] 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\"]" + } } } From dcc182b5faa322d7ba25e1c8785edf0984c4e59b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stephan=20B=C3=B6sch-Plepelits?= Date: Wed, 19 Aug 2020 22:45:47 +0200 Subject: [PATCH 2/5] leisure: add type filter --- leisure.json | 54 +++++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 53 insertions(+), 1 deletion(-) diff --git a/leisure.json b/leisure.json index 58af7a12..d3b6525a 100644 --- a/leisure.json +++ b/leisure.json @@ -72,6 +72,58 @@ } }, "emptyQuery": "nwr[\"access\"!=\"private\"]" + }, + "leisure": { + "name": "{{ trans('filter:type') }}", + "type": "select", + "values": "{% set list = [] %}{% for k in const %}{% endfor %}", + "sort": "natsort", + "op": "has" } - } + }, + "const": [ + "adult_gaming_centre", + "amusement_arcade", + "bandstand", + "beach_resort", + "bird_hide", + "bleachers", + "bowling_alley", + "common", + "dance", + "disc_golf_course", + "dog_park", + "escape_game", + "firepit", + "fishing", + "fitness_centre", + "fitness_station", + "garden", + "golf_course", + "hackerspace", + "horse_riding", + "ice_rink", + "indoor_play", + "marina", + "miniature_golf", + "nature_reserve", + "outdoor_seating", + "park", + "picnic_table", + "pitch", + "playground", + "sauna", + "slipway", + "sport", + "sports_cenre", + "sports_hall", + "stadium", + "summer_camp", + "swimming_area", + "swimming_pool", + "track", + "trampoline_park", + "water_park", + "wildlife_hide" + ] } From 26a5cefc452b34bc944d6ab3ffd9edbd3cca64a7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stephan=20B=C3=B6sch-Plepelits?= Date: Fri, 21 Aug 2020 09:05:46 +0200 Subject: [PATCH 3/5] leisure: add icons (unfin) --- leisure.json | 95 ++++++++++++++++++++++++++-------------------------- 1 file changed, 48 insertions(+), 47 deletions(-) diff --git a/leisure.json b/leisure.json index d3b6525a..95228682 100644 --- a/leisure.json +++ b/leisure.json @@ -40,7 +40,8 @@ " - {{ tagTransList('sport', tags.sport) }}", " {% endif %}", "{% endif %}" - ] + ], + "markerSign": "{{ const[tags.leisure]|raw }}" }, "filter": { "access": { @@ -76,54 +77,54 @@ "leisure": { "name": "{{ trans('filter:type') }}", "type": "select", - "values": "{% set list = [] %}{% for k in const %}{% endfor %}", + "values": "{% set list = [] %}{% for k, v in const %}{% endfor %}", "sort": "natsort", "op": "has" } }, - "const": [ - "adult_gaming_centre", - "amusement_arcade", - "bandstand", - "beach_resort", - "bird_hide", - "bleachers", - "bowling_alley", - "common", - "dance", - "disc_golf_course", - "dog_park", - "escape_game", - "firepit", - "fishing", - "fitness_centre", - "fitness_station", - "garden", - "golf_course", - "hackerspace", - "horse_riding", - "ice_rink", - "indoor_play", - "marina", - "miniature_golf", - "nature_reserve", - "outdoor_seating", - "park", - "picnic_table", - "pitch", - "playground", - "sauna", - "slipway", - "sport", - "sports_cenre", - "sports_hall", - "stadium", - "summer_camp", - "swimming_area", - "swimming_pool", - "track", - "trampoline_park", - "water_park", - "wildlife_hide" - ] + "const": { + "adult_gaming_centre": "", + "amusement_arcade": "", + "bandstand": ":", + "beach_resort": "", + "bird_hide": "", + "bleachers": "", + "bowling_alley": "", + "common": "", + "dance": "", + "disc_golf_course": "", + "dog_park": "", + "escape_game": "", + "firepit": "", + "fishing": "", + "fitness_centre": "", + "fitness_station": "", + "garden": "", + "golf_course": "", + "hackerspace": "", + "horse_riding": "", + "ice_rink": "", + "indoor_play": "", + "marina": "", + "miniature_golf": "", + "nature_reserve": "", + "outdoor_seating": "", + "park": "P", + "picnic_table": "", + "pitch": "", + "playground": "⛹", + "sauna": "", + "slipway": "", + "sport": "", + "sports_cenre": "", + "sports_hall": "", + "stadium": "", + "summer_camp": "", + "swimming_area": "", + "swimming_pool": "", + "track": "", + "trampoline_park": "", + "water_park": "", + "wildlife_hide": "" + } } From b24b7a2fe484659f4aefee7f72f535acca45f212 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stephan=20B=C3=B6sch-Plepelits?= Date: Sat, 5 Sep 2020 08:51:46 +0200 Subject: [PATCH 4/5] Leisure: add 'empty value' as separate filter option --- leisure.json | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/leisure.json b/leisure.json index 95228682..c2106b05 100644 --- a/leisure.json +++ b/leisure.json @@ -52,7 +52,7 @@ "valueName": "{{ tagTrans(\"access\", value) }}", "values": { "*": { - "name": "{{ trans('any value') }}", + "name": "<{{ trans('any value') }}>", "query": "nwr", "weight": -1 }, @@ -63,13 +63,17 @@ "discouraged": {}, "unknown": { "name": "{{ trans(\"unknown\") }}", - "query": "(nwr[\"access\"=\"unknown\"];nwr[!access];)", + "query": "nwr[\"access\"=\"unknown\"]" + }, + "!": { + "name": "<{{ trans('empty value') }}>", + "query": "nwr[!access]", "weight": 1 }, "?": { - "name": "{{ trans(\"other\") }}", + "name": "<{{ trans(\"other\") }}>", "query": "nwr[access][\"access\"!~\"^(public|private|permissive|customers|discouraged|unknown|yes)$\"]", - "weight": 1 + "weight": 2 } }, "emptyQuery": "nwr[\"access\"!=\"private\"]" From 64d441ab4ae65ddd4ae51acfe8676accf4f5f922 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stephan=20B=C3=B6sch-Plepelits?= Date: Fri, 21 Aug 2020 09:05:46 +0200 Subject: [PATCH 5/5] leisure: add icons --- leisure.json | 80 ++++++++++++++++++++++++++-------------------------- 1 file changed, 40 insertions(+), 40 deletions(-) diff --git a/leisure.json b/leisure.json index c2106b05..fbe24495 100644 --- a/leisure.json +++ b/leisure.json @@ -87,48 +87,48 @@ } }, "const": { - "adult_gaming_centre": "", - "amusement_arcade": "", - "bandstand": ":", - "beach_resort": "", - "bird_hide": "", - "bleachers": "", - "bowling_alley": "", + "adult_gaming_centre": "", + "amusement_arcade": "", + "bandstand": "", + "beach_resort": "", + "bird_hide": "", + "bleachers": "", + "bowling_alley": "", "common": "", - "dance": "", - "disc_golf_course": "", - "dog_park": "", - "escape_game": "", - "firepit": "", - "fishing": "", - "fitness_centre": "", - "fitness_station": "", - "garden": "", - "golf_course": "", - "hackerspace": "", - "horse_riding": "", - "ice_rink": "", - "indoor_play": "", - "marina": "", - "miniature_golf": "", - "nature_reserve": "", - "outdoor_seating": "", - "park": "P", + "dance": "💃", + "disc_golf_course": "", + "dog_park": "", + "escape_game": "", + "firepit": "", + "fishing": "", + "fitness_centre": "", + "fitness_station": "", + "garden": "", + "golf_course": "", + "hackerspace": "", + "horse_riding": "", + "ice_rink": "", + "indoor_play": "", + "marina": "", + "miniature_golf": "", + "nature_reserve": "", + "outdoor_seating": "", + "park": "", "picnic_table": "", - "pitch": "", - "playground": "⛹", - "sauna": "", - "slipway": "", - "sport": "", - "sports_cenre": "", - "sports_hall": "", - "stadium": "", - "summer_camp": "", - "swimming_area": "", - "swimming_pool": "", - "track": "", + "pitch": "", + "playground": "", + "sauna": "", + "slipway": "", + "sport": "", + "sports_centre": "", + "sports_hall": "", + "stadium": "", + "summer_camp": "", + "swimming_area": "", + "swimming_pool": "", + "track": "", "trampoline_park": "", - "water_park": "", - "wildlife_hide": "" + "water_park": "", + "wildlife_hide": "" } }