notea-de-me/server/public/ui/templates/_namespace.ctmpl

16 lines
475 B
Plaintext

{{ define "_namespace" }}
<script>
function setNamespace() {
document.getElementById("namespace").disabled = true
window.location.href = `${window.location.protocol}`+"//"+`${window.location.host}/ui/files/${document.getElementById("namespace").value}`
}
</script>
{{ if .This.Namespaces }}
<select id="namespace" onchange="setNamespace()" style="max-width: 7rem;">
{{ range .This.Namespaces }}
<option>{{ . }}</option>
{{ end }}
</select>
{{ end }}
{{ end }}