Improvements on the climbing-theme, small tweaks in the review form

This commit is contained in:
Pieter Vander Vennet 2020-12-18 01:36:45 +01:00
parent 7ad601f2eb
commit a641d976fc
6 changed files with 324 additions and 205 deletions

File diff suppressed because one or more lines are too long

View file

@ -62,8 +62,8 @@ export class AllKnownLayouts {
new LayoutConfig(widths), new LayoutConfig(widths),
new LayoutConfig(buurtnatuur), new LayoutConfig(buurtnatuur),
new LayoutConfig(bike_monitoring_stations), new LayoutConfig(bike_monitoring_stations),
new LayoutConfig(surveillance_cameras) new LayoutConfig(surveillance_cameras),
new LayoutConfig(climbing), new LayoutConfig(climbing)
]; ];

View file

@ -48,7 +48,7 @@ export default class ReviewForm extends InputElement<Review> {
this._postingAs = this._postingAs =
new Combine([t.posting_as, new VariableUiElement(userDetails.map((ud: UserDetails) => ud.name)).SetClass("review-author")]) new Combine([t.posting_as, new VariableUiElement(userDetails.map((ud: UserDetails) => ud.name)).SetClass("review-author")])
.SetStyle("display:flex;flex-direction: column;align-items: flex-end;margin-right: 0.5;") .SetStyle("display:flex;flex-direction: column;align-items: flex-end;margin-left: auto;")
this._saveButton = this._saveButton =
new SaveButton(this._value.map(r => self.IsValid(r)), undefined) new SaveButton(this._value.map(r => self.IsValid(r)), undefined)
.onClick(() => { .onClick(() => {
@ -58,7 +58,7 @@ export default class ReviewForm extends InputElement<Review> {
}); });
}) })
this._isAffiliated = new CheckBoxes([t.i_am_affiliated]).SetStyle(" display:inline-block;") this._isAffiliated = new CheckBoxes([t.i_am_affiliated])
this._comment = comment; this._comment = comment;
const stars = [] const stars = []

View file

@ -11,7 +11,8 @@
"en": "On this map you will find various climbing opportunities such as climbing gyms, bouldering halls and rocks in nature." "en": "On this map you will find various climbing opportunities such as climbing gyms, bouldering halls and rocks in nature."
}, },
"descriptionTail": { "descriptionTail": {
"en": "<p><strong>kletterspots.de</strong> is run by <a href='https://utopicode.de/en/?ref=kletterspots' target='_blank'>Christian Neumann</a>. Please <a href='https://utopicode.de/en/contact/?project=kletterspots&ref=kletterspots' target='blank'>get in touch</a> if you have feedback or questions.</p><p>The project uses data of the <a href='https://www.openstreetmap.org/' target='_blank'>OpenStreetMap</a> project and is based on the free software <a href='https://github.com/pietervdvn/MapComplete' target='_blank'>MapComplete</a>.</p>", "nl": "De Open Klimkaart is oorspronkelijk gemaakt door <a href='https://utopicode.de/en/?ref=kletterspots' target='_blank'>Christian Neumann</a> op <a href='https://kletterspots.de' target='_blank'>kletterspots.de</a>.",
"en": "The climbing map was originally made by <a href='https://utopicode.de/en/?ref=kletterspots' target='_blank'>Christian Neumann</a>. Please <a href='https://utopicode.de/en/contact/?project=kletterspots&ref=kletterspots' target='blank'>get in touch</a> if you have feedback or questions.</p><p>The project uses data of the <a href='https://www.openstreetmap.org/' target='_blank'>OpenStreetMap</a> project.</p>",
"de": "<p><strong>kletterspots.de</strong> wird betrieben von <a href='https://utopicode.de/?ref=kletterspots' target='_blank'>Christian Neumann</a>. Bitte <a href='https://utopicode.de/kontakt/?project=kletterspots&ref=kletterspots' target='blank'>melden Sie sich</a>, wenn Sie Feedback oder Fragen haben.</p><p>Das Projekt nutzt Daten des <a href='https://www.openstreetmap.org/' target='_blank'>OpenStreetMap</a> Projekts und basiert auf der freien Software <a href='https://github.com/pietervdvn/MapComplete' target='_blank'>MapComplete</a>.</p>" "de": "<p><strong>kletterspots.de</strong> wird betrieben von <a href='https://utopicode.de/?ref=kletterspots' target='_blank'>Christian Neumann</a>. Bitte <a href='https://utopicode.de/kontakt/?project=kletterspots&ref=kletterspots' target='blank'>melden Sie sich</a>, wenn Sie Feedback oder Fragen haben.</p><p>Das Projekt nutzt Daten des <a href='https://www.openstreetmap.org/' target='_blank'>OpenStreetMap</a> Projekts und basiert auf der freien Software <a href='https://github.com/pietervdvn/MapComplete' target='_blank'>MapComplete</a>.</p>"
}, },
"language": [ "language": [
@ -95,6 +96,13 @@
"icon": { "icon": {
"render": "./assets/themes/climbing/club.svg" "render": "./assets/themes/climbing/club.svg"
}, },
"iconOverlays": [
{
"if": "opening_hours~*",
"then": "isOpen",
"badge": true
}
],
"width": { "width": {
"render": "8" "render": "8"
}, },
@ -136,6 +144,180 @@
], ],
"wayHandling": 1 "wayHandling": 1
}, },
{
"id": "climbing_gym",
"name": {
"de": "Kletterhallen",
"en": "Climbing gyms",
"nl": "Klimzaal"
},
"minzoom": 10,
"overpassTags": {
"and": [
"sport=climbing",
"leisure=sports_centre"
]
},
"title": {
"render": {
"nl": "Klimzaal",
"de": "Kletterhalle",
"en": "Climbing gym"
},
"mappings": [
{
"if": "name~*",
"then": {
"nl": "Klimzaal <strong>{name}</strong>",
"de": "Kletterhalle <strong>{name}</strong>",
"en": "Climbing gym <strong>{name}</strong>"
}
}
]
},
"description": {
"de": "Eine Kletterhalle",
"en": "A climbing gym"
},
"tagRenderings": [
{
"render": {
"en": "<strong>{name}</strong>",
"nl": "<strong>{name}</strong>",
"de": "<strong>{name}</strong>"
},
"question": {
"en": "What is the name of this climbing gym?",
"nl": "Wat is de naam van dit Klimzaal?",
"de": "Wie heißt diese Kletterhalle?"
},
"freeform": {
"key": "name"
}
},
"website",
"phone",
"email",
"opening_hours"
],
"hideUnderlayingFeaturesMinPercentage": 0,
"icon": {
"render": "./assets/themes/climbing/climbing_gym.svg"
},
"iconOverlays": [
{
"if": "opening_hours~*",
"then": "isOpen",
"badge": true
}
],
"width": "0",
"iconSize": {
"render": "40,40,center"
},
"wayHandling": 1
},
{
"id": "climbing_route",
"name": {
"en": "Climbing routes",
"de": "Kletterrouten",
"nl": "Klimroute"
},
"minzoom": 18,
"overpassTags": {
"and": [
"climbing=route"
]
},
"title": {
"render": {
"de": "Kleterroute",
"en": "Climbing route",
"nl": "Klimroute"
},
"mappings": [
{
"if": "name~*",
"then": {
"de": "Kleterroute <strong>{name}</strong>",
"en": "Climbing route <strong>{name}</strong>",
"nl": "Klimroute <strong>{name}</strong>"
}
}
]
},
"tagRenderings": [
"images",
"questions",
{
"#": "Name",
"render": {
"en": "<strong>{name}</strong>",
"nl": "<strong>{name}</strong>",
"de": "<strong>{name}</strong>"
},
"question": {
"en": "What is the name of this climbing route?",
"de": "Wie heißt diese Kletterroute?",
"nl": "Hoe heet deze klimroute?"
},
"freeform": {
"key": "name"
},
"mappings": [
{
"if": {
"and": [
"noname=yes",
"name="
]
},
"then": {
"en": "This climbing route doesn't have a name",
"de": "Diese Kletterroute hat keinen Namen",
"nl": "Deze klimroute heeft geen naam"
}
}
]
},
{
"#": "Length",
"render": {
"en": "This route is {climbing:length} meter high",
"nl": "Deze klimroute is {climbing:length} meter hoog"
},
"freeform": {
"key": "climbing:length",
"type": "pnat"
}
},
{
"#": "Difficulty",
"render": {
"en": "The difficulty is {climbing:grade:french} according to the french/belgian system",
"nl": "De klimmoeilijkheid is {climbing:grade:french} volgens het Franse/Belgische systeem"
},
"freeform": {
"key": "climbing:grade:french"
}
},
"reviews"
],
"hideUnderlayingFeaturesMinPercentage": 0,
"icon": {
"render": "./assets/themes/climbing/climbing_route.svg"
},
"width": {
"render": "4"
},
"iconSize": {
"render": "20,20,center"
},
"color": {
"render": "#0f0"
}
},
{ {
"id": "climbing", "id": "climbing",
"name": { "name": {
@ -148,7 +330,9 @@
"and": [ "and": [
"sport=climbing", "sport=climbing",
"climbing!~route", "climbing!~route",
"leisure!~sports_centre" "leisure!~sports_centre",
"climbing!=route_top",
"climbing!=route_bottom"
] ]
}, },
"title": { "title": {
@ -227,128 +411,6 @@
], ],
"wayHandling": 2 "wayHandling": 2
}, },
{
"id": "climbing_gym",
"name": {
"de": "Kletterhallen",
"en": "Climbing gyms",
"nl": "Klimzaal"
},
"minzoom": 10,
"overpassTags": {
"and": [
"sport=climbing",
"leisure=sports_centre"
]
},
"title": {
"render": {
"nl": "Klimzaal",
"de": "Kletterhalle",
"en": "Climbing gym"
}
},
"description": {
"de": "Eine Kletterhalle",
"en": "A climbing gym"
},
"tagRenderings": [
{
"render": {
"en": "<strong>{name}</strong>",
"nl": "<strong>{name}</strong>",
"de": "<strong>{name}</strong>"
},
"question": {
"en": "What is the name of this climbing gym?",
"nl": "Wat is de naam van dit Klimzaal?",
"de": "Wie heißt diese Kletterhalle?"
},
"freeform": {
"key": "name"
}
},
"website",
"phone",
"email",
"opening_hours"
],
"hideUnderlayingFeaturesMinPercentage": 0,
"icon": {
"render": "./assets/themes/climbing/climbing_gym.svg"
},
"width": "0",
"iconSize": {
"render": "40,40,center"
},
"wayHandling": 1
},
{
"id": "climbing_route",
"name": {
"en": "Climbing routes",
"de": "Kletterrouten",
"nl": "Klimroute"
},
"minzoom": 18,
"overpassTags": {
"and": [
"climbing=route"
]
},
"title": {
"render": {
"de": "Kleterroute",
"en": "Climbing route",
"nl": "Klimroute"
}
},
"tagRenderings": [
{
"render": {
"en": "<strong>{name}</strong>",
"nl": "<strong>{name}</strong>",
"de": "<strong>{name}</strong>"
},
"question": {
"en": "What is the name of this climbing route?",
"de": "Wie heißt diese Kletterroute?",
"nl": "Hoe heet deze klimroute?"
},
"freeform": {
"key": "name"
},
"mappings": [
{
"if": {
"and": [
"noname=yes",
"name="
]
},
"then": {
"en": "This climbing route doesn't have a name",
"de": "Diese Kletterroute hat keinen Namen",
"nl": "Deze klimroute heeft geen naam"
}
}
]
}
],
"hideUnderlayingFeaturesMinPercentage": 1,
"icon": {
"render": "./assets/themes/climbing/climbing_route.svg"
},
"width": {
"render": "4"
},
"iconSize": {
"render": "20,20,center"
},
"color": {
"render": "#0f0"
}
},
{ {
"id": "maybe_climbing", "id": "maybe_climbing",
"name": { "name": {
@ -432,6 +494,7 @@
], ],
"roamingRenderings": [ "roamingRenderings": [
{ {
"#": "Website",
"question": { "question": {
"en": "Is there a (unofficial) website with more informations (e.g. topos)?", "en": "Is there a (unofficial) website with more informations (e.g. topos)?",
"de": "Gibt es eine (inoffizielle) Website mit mehr Informationen (z.B. Topos)?" "de": "Gibt es eine (inoffizielle) Website mit mehr Informationen (z.B. Topos)?"
@ -451,6 +514,7 @@
} }
}, },
{ {
"#": "Avg length?",
"render": { "render": {
"de": "Die Routen sind durchschnittlich <b>{climbing:length}m</b> lang", "de": "Die Routen sind durchschnittlich <b>{climbing:length}m</b> lang",
"en": "The routes are <b>{climbing:length}m</b> long on average", "en": "The routes are <b>{climbing:length}m</b> long on average",
@ -480,12 +544,54 @@
} }
}, },
{ {
"#": "Difficulty-min",
"question": {
"en": "What is the level of the easiest route here, accoring to the french classification system?",
"nl": "Wat is het niveau van de makkelijkste route, volgens het Franse classificatiesysteem?"
},
"render": {
"en": "The minimal difficulty is {climbing:grade:french} according to the french/belgian system",
"nl": "De minimale klimmoeilijkheid is {climbing:grade:french} volgens het Franse/Belgische systeem"
},
"freeform": {
"key": "climbing:grade:french:min"
},
"condition": {
"and": [
"climbing!~route",
"office=",
"club="
]
}
},
{
"#": "Difficulty-max",
"question": {
"en": "What is the level of the most difficult route here, accoring to the french classification system?",
"nl": "Wat is het niveau van de moeilijkste route, volgens het Franse classificatiesysteem?"
},
"render": {
"en": "The maximal difficulty is {climbing:grade:french} according to the french/belgian system",
"nl": "De maximale klimmoeilijkheid is {climbing:grade:french} volgens het Franse/Belgische systeem"
},
"freeform": {
"key": "climbing:grade:french:max"
},
"condition": {
"and": [
"climbing!~route",
"office=",
"club="
]
}
},
{
"#": "Boldering?",
"question": { "question": {
"de": "Kann hier gebouldert werden?", "de": "Kann hier gebouldert werden?",
"en": "Is bouldering possible here?", "en": "Is bouldering possible here?",
"nl": "Is het mogelijk om hier te bolderen?" "nl": "Is het mogelijk om hier te bolderen?"
}, },
"condition": "sport=climbing",
"mappings": [ "mappings": [
{ {
"if": "climbing:boulder=yes", "if": "climbing:boulder=yes",
@ -503,6 +609,13 @@
"nl": "Bolderen kan hier niet" "nl": "Bolderen kan hier niet"
} }
}, },
{
"if": "climbing:boulder=limited",
"then": {
"en": "Bouldering is possible, allthough there are only a few routes",
"nl": "Bolderen kan hier, maar er zijn niet zoveel routes"
}
},
{ {
"if": "climbing:boulder~*", "if": "climbing:boulder~*",
"then": { "then": {
@ -515,13 +628,14 @@
], ],
"condition": { "condition": {
"and": [ "and": [
"sport=climbing",
"office=", "office=",
"club=" "club="
] ]
} }
}, },
{ {
"condition": "sport=climbing", "#": "Toproping?",
"question": { "question": {
"de": "Ist Toprope-Klettern hier möglich?", "de": "Ist Toprope-Klettern hier möglich?",
"en": "Is toprope climbing possible here?", "en": "Is toprope climbing possible here?",
@ -556,13 +670,14 @@
], ],
"condition": { "condition": {
"and": [ "and": [
"sport=climbing",
"office=", "office=",
"club=" "club="
] ]
} }
}, },
{ {
"condition": "sport=climbing", "#": "Sportclimbing?",
"question": { "question": {
"de": "Ist hier Sportklettern möglich (feste Ankerpunkte)?", "de": "Ist hier Sportklettern möglich (feste Ankerpunkte)?",
"en": "Is sport climbing possible here on fixed anchors?", "en": "Is sport climbing possible here on fixed anchors?",
@ -597,13 +712,14 @@
], ],
"condition": { "condition": {
"and": [ "and": [
"sport=climbing",
"office=", "office=",
"club=" "club="
] ]
} }
}, },
{ {
"condition": "sport=climbing", "#": "Traditional climbing?",
"question": { "question": {
"de": "Ist hier traditionelles Klettern möglich (eigene Sicherung z.B. mit Klemmkleilen)?", "de": "Ist hier traditionelles Klettern möglich (eigene Sicherung z.B. mit Klemmkleilen)?",
"en": "Is traditional climbing possible here (using own gear e.g. chocks)?", "en": "Is traditional climbing possible here (using own gear e.g. chocks)?",
@ -638,12 +754,14 @@
], ],
"condition": { "condition": {
"and": [ "and": [
"sport=climbing",
"office=", "office=",
"club=" "club="
] ]
} }
}, },
{ {
"#": "Speed climbing?",
"question": { "question": {
"de": "Gibt es hier eine Speedkletter-Wand?", "de": "Gibt es hier eine Speedkletter-Wand?",
"en": "Is there a speed climbing wall?", "en": "Is there a speed climbing wall?",

View file

@ -963,8 +963,8 @@
"nl": "Ingelogd als" "nl": "Ingelogd als"
}, },
"i_am_affiliated": { "i_am_affiliated": {
"en": "<div'><span>I am affiliated with this object</span><br/><span class='subtle'>Check if you are an owner, creator, employee, ...</span></div>", "en": "<span>I am affiliated with this object</span><br/><span class='subtle'>Check if you are an owner, creator, employee, ...</span>",
"nl": "<div style='display:inline-block;max-width: 40%;'><span>I am affiliated with this object</span><br/><span class='subtle'>Vink aan indien je de oprichter, maker, werknemer, ... of dergelijke bent</span></div>" "nl": "<span>Ik ben persoonlijk betrokken</span><br/><span class='subtle'>Vink aan indien je de oprichter, maker, werknemer, ... of dergelijke bent</span>"
}, },
"affiliated_reviewer_warning": { "affiliated_reviewer_warning": {
"en": "(Affiliated review)", "en": "(Affiliated review)",

View file

@ -101,11 +101,13 @@
.review-form-top { .review-form-top {
display: flex; display: flex;
flex-wrap: wrap;
justify-content: space-between; justify-content: space-between;
} }
.review-form-rating { .review-form-rating {
display: block ruby;
} }
.review-form .save { .review-form .save {