From d835b92c7cafd7309fa43ab360efc24f78823614 Mon Sep 17 00:00:00 2001 From: Robin van der Linde Date: Thu, 8 Dec 2022 11:31:58 +0100 Subject: [PATCH] Move questions, remove name question --- assets/layers/atm/atm.json | 10 -- .../layers/ticket_machine/license_info.json | 110 ------------ .../layers/ticket_machine/ticket_machine.json | 160 +----------------- .../10cent.svg | 0 .../1cent.svg | 0 .../1euro.svg | 0 .../20cent.svg | 0 .../2cent.svg | 0 .../2euro.svg | 0 .../50cent.svg | 0 .../5cent.svg | 0 .../coins.svg | 0 assets/tagRenderings/license_info.json | 108 ++++++++++++ .../notes.svg | 0 assets/tagRenderings/questions.json | 149 +++++++++++++++- langs/layers/en.json | 4 - 16 files changed, 258 insertions(+), 283 deletions(-) delete mode 100644 assets/layers/ticket_machine/license_info.json rename assets/{layers/ticket_machine => tagRenderings}/10cent.svg (100%) rename assets/{layers/ticket_machine => tagRenderings}/1cent.svg (100%) rename assets/{layers/ticket_machine => tagRenderings}/1euro.svg (100%) rename assets/{layers/ticket_machine => tagRenderings}/20cent.svg (100%) rename assets/{layers/ticket_machine => tagRenderings}/2cent.svg (100%) rename assets/{layers/ticket_machine => tagRenderings}/2euro.svg (100%) rename assets/{layers/ticket_machine => tagRenderings}/50cent.svg (100%) rename assets/{layers/ticket_machine => tagRenderings}/5cent.svg (100%) rename assets/{layers/ticket_machine => tagRenderings}/coins.svg (100%) rename assets/{layers/ticket_machine => tagRenderings}/notes.svg (100%) diff --git a/assets/layers/atm/atm.json b/assets/layers/atm/atm.json index a8242be24..67d449152 100644 --- a/assets/layers/atm/atm.json +++ b/assets/layers/atm/atm.json @@ -36,16 +36,6 @@ "tagRenderings": [ { "id": "name", - "question": { - "en": "What is the name of this ATM?" - }, - "freeform": { - "key": "name", - "type": "string", - "placeholder": { - "en": "Name of the ATM" - } - }, "render": { "en": "The name of this ATM is {name}" } diff --git a/assets/layers/ticket_machine/license_info.json b/assets/layers/ticket_machine/license_info.json deleted file mode 100644 index 2f2d2a429..000000000 --- a/assets/layers/ticket_machine/license_info.json +++ /dev/null @@ -1,110 +0,0 @@ -[ - { - "path": "10cent.svg", - "license": "CC0", - "authors": [ - "OpenClipart", - "frankes" - ], - "sources": [ - "https://openclipart.org/detail/311337/worksheet-10-cent-coloured" - ] - }, - { - "path": "1cent.svg", - "license": "CC0", - "authors": [ - "OpenClipart", - "frankes" - ], - "sources": [ - "https://openclipart.org/detail/311334/worksheet-1-cent-coloured" - ] - }, - { - "path": "1euro.svg", - "license": "CC0", - "authors": [ - "OpenClipart", - "frankes" - ], - "sources": [ - "https://openclipart.org/detail/311340/worksheet-1-euro-coloured" - ] - }, - { - "path": "20cent.svg", - "license": "CC0", - "authors": [ - "OpenClipart", - "frankes" - ], - "sources": [ - "https://openclipart.org/detail/311338/worksheet-20-cent-coloured" - ] - }, - { - "path": "2cent.svg", - "license": "CC0", - "authors": [ - "OpenClipart", - "frankes" - ], - "sources": [ - "https://openclipart.org/detail/311335/worksheet-2-cent-coloured" - ] - }, - { - "path": "2euro.svg", - "license": "CC0", - "authors": [ - "OpenClipart", - "frankes" - ], - "sources": [ - "https://openclipart.org/detail/311341/worksheet-2-euro-coloured" - ] - }, - { - "path": "50cent.svg", - "license": "CC0", - "authors": [ - "OpenClipart", - "frankes" - ], - "sources": [ - "https://openclipart.org/detail/311339/worksheet-50-cent-coloured" - ] - }, - { - "path": "5cent.svg", - "license": "CC0", - "authors": [ - "OpenClipart", - "frankes" - ], - "sources": [ - "https://openclipart.org/detail/311336/worksheet-5-cent-coloured" - ] - }, - { - "path": "coins.svg", - "license": "CC-BY 3.0", - "authors": [ - "Online Web Fonts" - ], - "sources": [ - "https://www.onlinewebfonts.com/icon/464488" - ] - }, - { - "path": "notes.svg", - "license": "CC-BY 3.0", - "authors": [ - "Online Web Fonts" - ], - "sources": [ - "https://www.onlinewebfonts.com/icon/464507" - ] - } -] \ No newline at end of file diff --git a/assets/layers/ticket_machine/ticket_machine.json b/assets/layers/ticket_machine/ticket_machine.json index 849ba0783..673bd0625 100644 --- a/assets/layers/ticket_machine/ticket_machine.json +++ b/assets/layers/ticket_machine/ticket_machine.json @@ -52,164 +52,8 @@ } ] }, - { - "id": "payment-options", - "question": { - "en": "How can you pay for tickets at this ticket machine?" - }, - "multiAnswer": true, - "mappings": [ - { - "if": "payment:coins=yes", - "ifnot": "payment:coins=no", - "icon": "./assets/layers/ticket_machine/coins.svg", - "then": { - "en": "You can pay using coins" - } - }, - { - "if": "payment:notes=yes", - "ifnot": "payment:notes=no", - "icon": "./assets/layers/ticket_machine/notes.svg", - "then": { - "en": "You can pay using bank notes" - } - }, - { - "if": "payment:cash=yes", - "ifnot": "payment:cash=", - "icon": "./assets/tagRenderings/cash.svg", - "then": { - "en": "You can pay here using coins and bank notes" - }, - "hideInAnswer": true - }, - { - "if": "payment:debit_cards=yes", - "ifnot": "payment_debit_cards=no", - "icon": "./assets/tagRenderings/payment_card.svg", - "then": { - "en": "You can pay here using debit cards" - } - }, - { - "if": "payment:credit_cards=yes", - "ifnot": "payment:credit_cards=no", - "icon": "./assets/tagRenderings/payment_card.svg", - "then": { - "en": "You can pay here using credit cards" - } - }, - { - "if": "payment:cards=yes", - "ifnot": "payment:cards=", - "icon": "./assets/tagRenderings/payment_card.svg", - "then": { - "en": "You can pay here using cards" - }, - "hideInAnswer": true - } - ] - }, - { - "id": "denominations-coins", - "condition": { - "and": [ - { - "or": [ - "payment:coins=yes", - "payment:cash=yes" - ] - }, - { - "or": [ - "_country=at", - "_country=be", - "_country=cy", - "_country=de", - "_country=ee", - "_country=es", - "_country=fi", - "_country=fr", - "_country=gr", - "_country=hr", - "_country=ie", - "_country=it", - "_country=lt", - "_country=lu", - "_country=lv", - "_country=mt", - "_country=nl", - "_country=pt", - "_country=si", - "_country=sk" - ] - } - ] - }, - "question": { - "en": "Whith what coins can you pay here?" - }, - "multiAnswer": true, - "mappings": [ - { - "if": "payment:coins:denomination=0.01 EUR", - "icon": "./assets/layers/ticket_machine/1cent.svg", - "then": { - "en": "1 cent coins are accepted" - } - }, - { - "if": "payment:coins:denomination=0.02 EUR", - "icon": "./assets/layers/ticket_machine/2cent.svg", - "then": { - "en": "2 cent coins are accepted" - } - }, - { - "if": "payment:coins:denomination=0.05 EUR", - "icon": "./assets/layers/ticket_machine/5cent.svg", - "then": { - "en": "5 cent coins are accepted" - } - }, - { - "if": "payment:coins:denomination=0.10 EUR", - "icon": "./assets/layers/ticket_machine/10cent.svg", - "then": { - "en": "10 cent coins are accepted" - } - }, - { - "if": "payment:coins:denomination=0.20 EUR", - "icon": "./assets/layers/ticket_machine/20cent.svg", - "then": { - "en": "20 cent coins are accepted" - } - }, - { - "if": "payment:coins:denomination=0.50 EUR", - "icon": "./assets/layers/ticket_machine/50cent.svg", - "then": { - "en": "50 cent coins are accepted" - } - }, - { - "if": "payment:coins:denomination=1.00 EUR", - "icon": "./assets/layers/ticket_machine/1euro.svg", - "then": { - "en": "1 euro coins are accepted" - } - }, - { - "if": "payment:coins:denomination=2.00 EUR", - "icon": "./assets/layers/ticket_machine/2euro.svg", - "then": { - "en": "2 euro coins are accepted" - } - } - ] - } + "payment-options-split", + "denominations-coins" ], "presets": [ { diff --git a/assets/layers/ticket_machine/10cent.svg b/assets/tagRenderings/10cent.svg similarity index 100% rename from assets/layers/ticket_machine/10cent.svg rename to assets/tagRenderings/10cent.svg diff --git a/assets/layers/ticket_machine/1cent.svg b/assets/tagRenderings/1cent.svg similarity index 100% rename from assets/layers/ticket_machine/1cent.svg rename to assets/tagRenderings/1cent.svg diff --git a/assets/layers/ticket_machine/1euro.svg b/assets/tagRenderings/1euro.svg similarity index 100% rename from assets/layers/ticket_machine/1euro.svg rename to assets/tagRenderings/1euro.svg diff --git a/assets/layers/ticket_machine/20cent.svg b/assets/tagRenderings/20cent.svg similarity index 100% rename from assets/layers/ticket_machine/20cent.svg rename to assets/tagRenderings/20cent.svg diff --git a/assets/layers/ticket_machine/2cent.svg b/assets/tagRenderings/2cent.svg similarity index 100% rename from assets/layers/ticket_machine/2cent.svg rename to assets/tagRenderings/2cent.svg diff --git a/assets/layers/ticket_machine/2euro.svg b/assets/tagRenderings/2euro.svg similarity index 100% rename from assets/layers/ticket_machine/2euro.svg rename to assets/tagRenderings/2euro.svg diff --git a/assets/layers/ticket_machine/50cent.svg b/assets/tagRenderings/50cent.svg similarity index 100% rename from assets/layers/ticket_machine/50cent.svg rename to assets/tagRenderings/50cent.svg diff --git a/assets/layers/ticket_machine/5cent.svg b/assets/tagRenderings/5cent.svg similarity index 100% rename from assets/layers/ticket_machine/5cent.svg rename to assets/tagRenderings/5cent.svg diff --git a/assets/layers/ticket_machine/coins.svg b/assets/tagRenderings/coins.svg similarity index 100% rename from assets/layers/ticket_machine/coins.svg rename to assets/tagRenderings/coins.svg diff --git a/assets/tagRenderings/license_info.json b/assets/tagRenderings/license_info.json index 1f92135a1..01abeaa68 100644 --- a/assets/tagRenderings/license_info.json +++ b/assets/tagRenderings/license_info.json @@ -1,4 +1,92 @@ [ + { + "path": "10cent.svg", + "license": "CC0", + "authors": [ + "OpenClipart", + "frankes" + ], + "sources": [ + "https://openclipart.org/detail/311337/worksheet-10-cent-coloured" + ] + }, + { + "path": "1cent.svg", + "license": "CC0", + "authors": [ + "OpenClipart", + "frankes" + ], + "sources": [ + "https://openclipart.org/detail/311334/worksheet-1-cent-coloured" + ] + }, + { + "path": "1euro.svg", + "license": "CC0", + "authors": [ + "OpenClipart", + "frankes" + ], + "sources": [ + "https://openclipart.org/detail/311340/worksheet-1-euro-coloured" + ] + }, + { + "path": "20cent.svg", + "license": "CC0", + "authors": [ + "OpenClipart", + "frankes" + ], + "sources": [ + "https://openclipart.org/detail/311338/worksheet-20-cent-coloured" + ] + }, + { + "path": "2cent.svg", + "license": "CC0", + "authors": [ + "OpenClipart", + "frankes" + ], + "sources": [ + "https://openclipart.org/detail/311335/worksheet-2-cent-coloured" + ] + }, + { + "path": "2euro.svg", + "license": "CC0", + "authors": [ + "OpenClipart", + "frankes" + ], + "sources": [ + "https://openclipart.org/detail/311341/worksheet-2-euro-coloured" + ] + }, + { + "path": "50cent.svg", + "license": "CC0", + "authors": [ + "OpenClipart", + "frankes" + ], + "sources": [ + "https://openclipart.org/detail/311339/worksheet-50-cent-coloured" + ] + }, + { + "path": "5cent.svg", + "license": "CC0", + "authors": [ + "OpenClipart", + "frankes" + ], + "sources": [ + "https://openclipart.org/detail/311336/worksheet-5-cent-coloured" + ] + }, { "path": "audio_induction_loop.svg", "license": "CC-BY 4.0", @@ -29,6 +117,16 @@ "https://www.onlinewebfonts.com/icon/464494" ] }, + { + "path": "coins.svg", + "license": "CC-BY 3.0", + "authors": [ + "Online Web Fonts" + ], + "sources": [ + "https://www.onlinewebfonts.com/icon/464488" + ] + }, { "path": "nfc_card.svg", "license": "CC0", @@ -50,6 +148,16 @@ "https://www.aiga.org/content.cfm/symbol-signs" ] }, + { + "path": "notes.svg", + "license": "CC-BY 3.0", + "authors": [ + "Online Web Fonts" + ], + "sources": [ + "https://www.onlinewebfonts.com/icon/464507" + ] + }, { "path": "payment_card.svg", "license": "CC0", diff --git a/assets/layers/ticket_machine/notes.svg b/assets/tagRenderings/notes.svg similarity index 100% rename from assets/layers/ticket_machine/notes.svg rename to assets/tagRenderings/notes.svg diff --git a/assets/tagRenderings/questions.json b/assets/tagRenderings/questions.json index 95a79226d..b73849dfd 100644 --- a/assets/tagRenderings/questions.json +++ b/assets/tagRenderings/questions.json @@ -895,6 +895,55 @@ } ] }, + "payment-options-split": { + "builtin": "payment-options", + "override": { + "mappings": [ + { + "hideInAnswer": true, + "ifnot": "payment:cash=" + }, + { + "hideInAnswer": true, + "ifnot": "payment:cards=" + } + ], + "mappings+": [ + { + "if": "payment:coins=yes", + "ifnot": "payment:coins=no", + "icon": "./assets/tagRenderings/coins.svg", + "then": { + "en": "Coins are accepted here" + } + }, + { + "if": "payment:notes=yes", + "ifnot": "payment:notes=no", + "icon": "./assets/tagRenderings/notes.svg", + "then": { + "en": "Bank notes are accepted here" + } + }, + { + "if": "payment:debit_cards=yes", + "ifnot": "payment_debit_cards=no", + "icon": "./assets/tagRenderings/payment_card.svg", + "then": { + "en": "Debit cards are accepted here" + } + }, + { + "if": "payment:credit_cards=yes", + "ifnot": "payment:credit_cards=no", + "icon": "./assets/tagRenderings/payment_card.svg", + "then": { + "en": "Credit cards are accepted here" + } + } + ] + } + }, "payment-options-advanced": { "builtin": "payment-options", "override": { @@ -949,6 +998,104 @@ ] } }, + "denominations-coins": { + "condition": { + "and": [ + { + "or": [ + "payment:coins=yes", + "payment:cash=yes" + ] + }, + { + "or": [ + "_country=at", + "_country=be", + "_country=cy", + "_country=de", + "_country=ee", + "_country=es", + "_country=fi", + "_country=fr", + "_country=gr", + "_country=hr", + "_country=ie", + "_country=it", + "_country=lt", + "_country=lu", + "_country=lv", + "_country=mt", + "_country=nl", + "_country=pt", + "_country=si", + "_country=sk" + ] + } + ] + }, + "question": { + "en": "Whith what coins can you pay here?" + }, + "multiAnswer": true, + "mappings": [ + { + "if": "payment:coins:denominations=0.01 EUR", + "icon": "./assets/tagRenderings/1cent.svg", + "then": { + "en": "1 cent coins are accepted" + } + }, + { + "if": "payment:coins:denominations=0.02 EUR", + "icon": "./assets/tagRenderings/2cent.svg", + "then": { + "en": "2 cent coins are accepted" + } + }, + { + "if": "payment:coins:denominations=0.05 EUR", + "icon": "./assets/tagRenderings/5cent.svg", + "then": { + "en": "5 cent coins are accepted" + } + }, + { + "if": "payment:coins:denominations=0.10 EUR", + "icon": "./assets/tagRenderings/10cent.svg", + "then": { + "en": "10 cent coins are accepted" + } + }, + { + "if": "payment:coins:denominations=0.20 EUR", + "icon": "./assets/tagRenderings/20cent.svg", + "then": { + "en": "20 cent coins are accepted" + } + }, + { + "if": "payment:coins:denominations=0.50 EUR", + "icon": "./assets/tagRenderings/50cent.svg", + "then": { + "en": "50 cent coins are accepted" + } + }, + { + "if": "payment:coins:denominations=1.00 EUR", + "icon": "./assets/tagRenderings/1euro.svg", + "then": { + "en": "1 euro coins are accepted" + } + }, + { + "if": "payment:coins:denominations=2.00 EUR", + "icon": "./assets/tagRenderings/2euro.svg", + "then": { + "en": "2 euro coins are accepted" + } + } + ] + }, "last_edit": { "#": "Gives some metainfo about the last edit and who did edit it - rendering only", "condition": "_last_edit:contributor~*", @@ -1491,4 +1638,4 @@ "es": "El nombre de red es {internet_access:ssid}" } } -} +} \ No newline at end of file diff --git a/langs/layers/en.json b/langs/layers/en.json index 87a99da06..3a5ec4112 100644 --- a/langs/layers/en.json +++ b/langs/layers/en.json @@ -170,10 +170,6 @@ "render": "The brand of this ATM is {brand}" }, "name": { - "freeform": { - "placeholder": "Name of the ATM" - }, - "question": "What is the name of this ATM?", "render": "The name of this ATM is {name}" }, "operator": {