115 lines
4.0 KiB
HTML
115 lines
4.0 KiB
HTML
{{define "template-repositories.html"}}
|
|
<!doctype html>
|
|
<html lang="{{.Language}}">
|
|
<head>
|
|
<meta charset="utf-8">
|
|
<meta name="viewport" content="width=device-width,initial-scale=1">
|
|
<title>
|
|
{{.Title}}
|
|
· DoGaMa
|
|
</title>
|
|
<link rel="stylesheet" href="/static/app.v1.css">
|
|
</head>
|
|
<body class="app-body">
|
|
{{template "sidebar" .}}
|
|
<main class="app-main">
|
|
<div class="page-heading">
|
|
<div>
|
|
<p class="eyebrow">
|
|
Administration
|
|
</p>
|
|
<h1>
|
|
{{.Msg "template_repositories.heading"}}
|
|
</h1>
|
|
<p>
|
|
{{.Msg "template_repositories.introduction"}}
|
|
</p>
|
|
</div>
|
|
<a class="button-secondary link-button" href="/administration">
|
|
Administration
|
|
</a>
|
|
</div>
|
|
<nav class="tabs" aria-label="{{.Msg "settings.tabs"}}">
|
|
<a href="/administration/users">
|
|
{{.Msg "template_repositories.users"}}
|
|
</a>
|
|
<a href="/administration#notifications">
|
|
{{.Msg "settings.notifications"}}
|
|
</a>
|
|
<a href="/administration/template-repositories">
|
|
{{.Msg "template_repositories.heading"}}
|
|
</a>
|
|
<a href="/administration#audit">
|
|
{{.Msg "settings.audit"}}
|
|
</a>
|
|
</nav>
|
|
<section class="panel settings-section">
|
|
<details{{if .Error}} open{{end}}>
|
|
<summary class="button-secondary link-button">
|
|
{{.Msg "template_repositories.new"}}
|
|
</summary>
|
|
{{if .Error}}
|
|
<p role="alert">
|
|
{{.Error}}
|
|
</p>
|
|
{{end}}
|
|
<form method="post" action="/administration/template-repositories">
|
|
<div class="form-grid">
|
|
<input type="hidden" name="csrf_token" value="{{.CSRFToken}}">
|
|
<label>
|
|
{{.Msg "template_repositories.name"}}
|
|
<input required maxlength="120" name="name" value="{{.TemplateRepositoryInput.Name}}">
|
|
</label>
|
|
<label>
|
|
{{.Msg "template_repositories.url"}}
|
|
<input required maxlength="2048" type="url" name="url" value="{{.TemplateRepositoryInput.URL}}" placeholder="https://templates.example.com">
|
|
</label>
|
|
</div>
|
|
<button type="submit">
|
|
{{.Msg "template_repositories.add"}}
|
|
</button>
|
|
</form>
|
|
</details>
|
|
</section>
|
|
<section class="panel settings-section">
|
|
<h2>
|
|
{{.Msg "template_repositories.heading"}}
|
|
</h2>
|
|
<p>
|
|
{{.Msg "template_repositories.not_implemented"}}
|
|
</p>
|
|
{{if .TemplateRepositories}}
|
|
<ul class="channel-list">
|
|
{{range .TemplateRepositories}}
|
|
<li>
|
|
<strong>
|
|
{{.Name}}
|
|
</strong>
|
|
<small>
|
|
{{.URL}}
|
|
·
|
|
{{$.Msg "template_repositories.not_implemented"}}
|
|
</small>
|
|
<form method="post" action="/administration/template-repositories/{{.ID}}/delete" onsubmit="return confirm('{{$.Msg "template_repositories.delete_confirm"}}');">
|
|
<input type="hidden" name="csrf_token" value="{{$.CSRFToken}}">
|
|
<button type="submit" aria-label="{{$.Msg "template_repositories.delete"}} {{.Name}}">
|
|
🗑
|
|
{{$.Msg "template_repositories.delete"}}
|
|
</button>
|
|
</form>
|
|
</li>
|
|
{{end}}
|
|
</ul>
|
|
{{else}}
|
|
<p>
|
|
{{.Msg "template_repositories.empty"}}
|
|
</p>
|
|
{{end}}
|
|
</section>
|
|
</main>
|
|
<script src="/static/app.v2.js">
|
|
</script>
|
|
</body>
|
|
</html>
|
|
{{end}}
|