forked from MapComplete/MapComplete
New question system
This commit is contained in:
parent
1738fc4252
commit
d1f8080c24
45 changed files with 1391 additions and 689 deletions
31
Customizations/Questions/OsmLink.ts
Normal file
31
Customizations/Questions/OsmLink.ts
Normal file
|
@ -0,0 +1,31 @@
|
|||
import {TagRenderingOptions} from "../TagRendering";
|
||||
import {Img} from "../../UI/Img";
|
||||
import {Tag} from "../../Logic/TagsFilter";
|
||||
|
||||
|
||||
export class OsmLink extends TagRenderingOptions {
|
||||
|
||||
|
||||
|
||||
static options = {
|
||||
freeform: {
|
||||
key: "id",
|
||||
template: "$$$",
|
||||
renderTemplate:
|
||||
"<span class='osmlink'><a href='https://osm.org/{id}' target='_blank'>" +
|
||||
Img.osmAbstractLogo +
|
||||
"</a></span>",
|
||||
placeholder: "",
|
||||
},
|
||||
mappings: [
|
||||
{k: new Tag("id", "node/-1"), txt: "<span class='alert'>Uploading</span>"}
|
||||
]
|
||||
|
||||
}
|
||||
|
||||
constructor() {
|
||||
super(OsmLink.options);
|
||||
}
|
||||
|
||||
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue