Fine-tune conditions and marker stuff

This commit is contained in:
Midgard 2021-04-07 19:00:09 +02:00
parent f98780fac4
commit 3b757a29c7
Signed by untrusted user who does not match committer: midgard
GPG key ID: 511C112F1331BBB4

View file

@ -144,6 +144,10 @@
"key": "fire_hydrant:diameter", "key": "fire_hydrant:diameter",
"type": "pnat" "type": "pnat"
}, },
"condition": { "or": [
"has_marker!=no",
"fire_hydrant:diameter~*"
] },
"mappings": [ "mappings": [
{ "if": { "and": [ "fire_hydrant:diameter=75" ] }, "then": { { "if": { "and": [ "fire_hydrant:diameter=75" ] }, "then": {
"nl": "<img src='./assets/layers/fire_hydrants/diameter.svg' style='width:18px;height:18px;display:inline' alt=''/> Nominale diameter van aanvoerleiding: 75&nbsp;mm", "nl": "<img src='./assets/layers/fire_hydrants/diameter.svg' style='width:18px;height:18px;display:inline' alt=''/> Nominale diameter van aanvoerleiding: 75&nbsp;mm",
@ -194,12 +198,7 @@
"nl": "<img src='./assets/layers/fire_hydrants/diameter.svg' style='width:18px;height:18px;display:inline' alt=''/> Nominale diameter van aanvoerleiding: {fire_hydrant:diameter}&nbsp;mm", "nl": "<img src='./assets/layers/fire_hydrants/diameter.svg' style='width:18px;height:18px;display:inline' alt=''/> Nominale diameter van aanvoerleiding: {fire_hydrant:diameter}&nbsp;mm",
"en": "<img src='./assets/layers/fire_hydrants/diameter.svg' style='width:18px;height:18px;display:inline' alt=''/> Nominal diameter of supply: {fire_hydrant:diameter}&nbsp;mm" "en": "<img src='./assets/layers/fire_hydrants/diameter.svg' style='width:18px;height:18px;display:inline' alt=''/> Nominal diameter of supply: {fire_hydrant:diameter}&nbsp;mm"
}, "hideInAnswer": true } }, "hideInAnswer": true }
], ]
"condition": {"or": [
"removed:emergency!=fire_hydrant",
"has_marker=yes",
"fire_hydrant:diameter~*"
]}
}, },
{ {
@ -301,11 +300,11 @@
"en": "<img src='./assets/layers/fire_hydrants/hydrant_hasmarker_no.svg' style='width:18px;height:18px;display:inline' alt=''/> A marker is missing!" "en": "<img src='./assets/layers/fire_hydrants/hydrant_hasmarker_no.svg' style='width:18px;height:18px;display:inline' alt=''/> A marker is missing!"
}}, }},
{"if": {"and": ["has_marker="]}, "then": { {"if": {"and": ["has_marker="]}, "then": {
"nl": "<img src='./assets/layers/fire_hydrants/hydrant_hasmarker_yes.svg' style='width:18px;height:18px;display:inline' alt=''/> Er is een bordje voor de hydrant.", "nl": "<img src='./assets/layers/fire_hydrants/hydrant_hasmarker_yes.svg' style='width:18px;height:18px;display:inline' alt=''/> Er is een bordje.",
"en": "<img src='./assets/layers/fire_hydrants/hydrant_hasmarker_yes.svg' style='width:18px;height:18px;display:inline' alt=''/> A marker is present." "en": "<img src='./assets/layers/fire_hydrants/hydrant_hasmarker_yes.svg' style='width:18px;height:18px;display:inline' alt=''/> A marker is present."
}}, }},
{"if": {"and": ["has_marker=yes"]}, "then": { {"if": {"and": ["has_marker=yes"]}, "then": {
"nl": "<img src='./assets/layers/fire_hydrants/hydrant_hasmarker_yes.svg' style='width:18px;height:18px;display:inline' alt=''/> Er is een bordje voor de hydrant.", "nl": "<img src='./assets/layers/fire_hydrants/hydrant_hasmarker_yes.svg' style='width:18px;height:18px;display:inline' alt=''/> Er is een bordje.",
"en": "<img src='./assets/layers/fire_hydrants/hydrant_hasmarker_yes.svg' style='width:18px;height:18px;display:inline' alt=''/> A marker is present." "en": "<img src='./assets/layers/fire_hydrants/hydrant_hasmarker_yes.svg' style='width:18px;height:18px;display:inline' alt=''/> A marker is present."
}, "hideInAnswer": true } }, "hideInAnswer": true }
] ]
@ -319,17 +318,13 @@
"condition": {"or": ["disused:emergency=fire_hydrant", "abandoned:emergency=fire_hydrant"]}, "condition": {"or": ["disused:emergency=fire_hydrant", "abandoned:emergency=fire_hydrant"]},
"mappings": [ "mappings": [
{"if": {"and": ["has_marker=no"]}, "then": { {"if": {"and": ["has_marker=no"]}, "then": {
"nl": "<img src='./assets/layers/fire_hydrants/hydrant_hasmarker_no.svg' style='width:18px;height:18px;display:inline' alt=''/> Een bordje ontbreekt.", "nl": "<img src='./assets/layers/fire_hydrants/hydrant_hasmarker_no.svg' style='width:18px;height:18px;display:inline' alt=''/> Er is geen bordje.",
"en": "<img src='./assets/layers/fire_hydrants/hydrant_hasmarker_no.svg' style='width:18px;height:18px;display:inline' alt=''/> A marker is missing." "en": "<img src='./assets/layers/fire_hydrants/hydrant_hasmarker_no.svg' style='width:18px;height:18px;display:inline' alt=''/> There's no marker."
}},
{"if": {"and": ["has_marker="]}, "then": {
"nl": "<img src='./assets/layers/fire_hydrants/hydrant_hasmarker_yes.svg' style='width:18px;height:18px;display:inline' alt=''/> Er is een bordje voor de hydrant.",
"en": "<img src='./assets/layers/fire_hydrants/hydrant_hasmarker_yes.svg' style='width:18px;height:18px;display:inline' alt=''/> A marker is present."
}}, }},
{"if": {"and": ["has_marker=yes"]}, "then": { {"if": {"and": ["has_marker=yes"]}, "then": {
"nl": "<img src='./assets/layers/fire_hydrants/hydrant_hasmarker_yes.svg' style='width:18px;height:18px;display:inline' alt=''/> Er is een bordje voor de hydrant.", "nl": "<img src='./assets/layers/fire_hydrants/hydrant_hasmarker_yes.svg' style='width:18px;height:18px;display:inline' alt=''/> Er is een bordje.",
"en": "<img src='./assets/layers/fire_hydrants/hydrant_hasmarker_yes.svg' style='width:18px;height:18px;display:inline' alt=''/> A marker is present." "en": "<img src='./assets/layers/fire_hydrants/hydrant_hasmarker_yes.svg' style='width:18px;height:18px;display:inline' alt=''/> A marker is present."
}, "hideInAnswer": true } }}
] ]
}, },
{ {
@ -360,7 +355,7 @@
"nl": "Omgeving: {fire_hydrant:position}", "nl": "Omgeving: {fire_hydrant:position}",
"en": "Position: {fire_hydrant:position}" "en": "Position: {fire_hydrant:position}"
}, },
"freeform": {"key": "fire_hydrant:position:description"}, "freeform": {"key": "fire_hydrant:position"},
"condition": {"and": ["removed:emergency!=fire_hydrant"]}, "condition": {"and": ["removed:emergency!=fire_hydrant"]},
"mappings": [ "mappings": [
{"if": {"and": ["fire_hydrant:position=lane"]}, "then": { {"if": {"and": ["fire_hydrant:position=lane"]}, "then": {
@ -390,14 +385,22 @@
] ]
}, },
{
"render": {
"nl": "Extra info: <i>{description}</i>",
"en": "Extra info: <i>{description}</i>"
},
"freeform": {"key": "description"}
},
{ {
"question": { "question": {
"nl": "Heb je opmerkingen die niet pasten in de andere vragen?", "nl": "Heb je opmerkingen die niet pasten in de andere vragen?",
"en": "Any other remarks that don't fit in the other questions?" "en": "Any other remarks that don't fit in the other questions?"
}, },
"render": { "render": {
"nl": "Extra info: <i>{description:0}</i>", "nl": "Extra info via MapComplete: <i>{description:0}</i>",
"en": "Extra info: <i>{description:0}</i>" "en": "Extra info via MapComplete: <i>{description:0}</i>"
}, },
"freeform": {"key": "description:0"} "freeform": {"key": "description:0"}
} }