mirror of
https://github.com/umap-project/umap.git
synced 2025-04-28 19:42:36 +02:00
wip: add link to open template in a new window
This commit is contained in:
parent
9f2d78caeb
commit
2c8022b422
2 changed files with 8 additions and 2 deletions
|
@ -48,7 +48,7 @@ export class Importer {
|
||||||
const item = Utils.loadTemplate(
|
const item = Utils.loadTemplate(
|
||||||
`<dl>
|
`<dl>
|
||||||
<dt><label><input type="radio" value="${template.id}" name="template" />${template.name}</label></dt>
|
<dt><label><input type="radio" value="${template.id}" name="template" />${template.name}</label></dt>
|
||||||
<dd>${template.description}</dd>
|
<dd>${template.description} <a href="${template.url}" target="_blank">${translate('Open')}</a></dd>
|
||||||
</dl>`
|
</dl>`
|
||||||
)
|
)
|
||||||
body.appendChild(item)
|
body.appendChild(item)
|
||||||
|
|
|
@ -1465,6 +1465,12 @@ class TemplateList(ListView):
|
||||||
elif source == "staff":
|
elif source == "staff":
|
||||||
qs = Map.public.starred_by_staff().filter(is_template=True)
|
qs = Map.public.starred_by_staff().filter(is_template=True)
|
||||||
templates = [
|
templates = [
|
||||||
{"id": m.id, "name": m.name, "description": m.description} for m in qs
|
{
|
||||||
|
"id": m.id,
|
||||||
|
"name": m.name,
|
||||||
|
"description": m.description,
|
||||||
|
"url": m.get_absolute_url(),
|
||||||
|
}
|
||||||
|
for m in qs
|
||||||
]
|
]
|
||||||
return simple_json_response(templates=templates)
|
return simple_json_response(templates=templates)
|
||||||
|
|
Loading…
Reference in a new issue