Web UI: podcasts, radio, shares, bookmarks pages; admin podcast/jukebox management; per-user Subsonic permission editor
This commit is contained in:
@@ -0,0 +1,61 @@
|
||||
{{define "admin_podcasts"}}{{template "header" .}}
|
||||
<div class="card mb-4" style="max-width: 600px;">
|
||||
<div class="card-body">
|
||||
<h2 class="h6">Add channel</h2>
|
||||
<form method="post" action="/admin/podcasts">
|
||||
{{template "csrf_field" .CSRFToken}}
|
||||
<div class="input-group input-group-sm">
|
||||
<input type="text" name="url" class="form-control" placeholder="https://example.com/feed.xml" required>
|
||||
<button type="submit" class="btn btn-primary">Add</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{{range .Data}}
|
||||
<div class="card mb-3">
|
||||
<div class="card-body">
|
||||
<div class="d-flex justify-content-between align-items-start">
|
||||
<div>
|
||||
<h2 class="h6 mb-0">{{.Channel.Title}} <span class="badge text-bg-secondary">{{.Channel.Status}}</span></h2>
|
||||
<div class="text-secondary small">{{.Channel.URL}}</div>
|
||||
{{if .Channel.ErrorMessage}}<div class="text-danger small">{{.Channel.ErrorMessage}}</div>{{end}}
|
||||
</div>
|
||||
<div>
|
||||
<form method="post" action="/admin/podcasts/{{.Channel.ID}}/refresh" class="d-inline">
|
||||
{{template "csrf_field" $.CSRFToken}}
|
||||
<button type="submit" class="btn btn-sm btn-outline-primary">Refresh</button>
|
||||
</form>
|
||||
<form method="post" action="/admin/podcasts/{{.Channel.ID}}/delete" class="d-inline" onsubmit="return confirm('Delete this channel and its episodes?');">
|
||||
{{template "csrf_field" $.CSRFToken}}
|
||||
<button type="submit" class="btn btn-sm btn-outline-danger">Delete</button>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
<table class="table table-sm vs-table mt-2 mb-0">
|
||||
<tbody>
|
||||
{{range .Episodes}}
|
||||
<tr>
|
||||
<td>{{.Title}}</td>
|
||||
<td class="text-secondary small">{{.PublishDate}}</td>
|
||||
<td>{{.Status}}</td>
|
||||
<td class="text-end">
|
||||
{{if ne .Status "completed"}}
|
||||
<form method="post" action="/admin/podcasts/episodes/{{.ID}}/download" class="d-inline">
|
||||
{{template "csrf_field" $.CSRFToken}}
|
||||
<button type="submit" class="btn btn-sm btn-outline-primary">Download</button>
|
||||
</form>
|
||||
{{end}}
|
||||
<form method="post" action="/admin/podcasts/episodes/{{.ID}}/delete" class="d-inline">
|
||||
{{template "csrf_field" $.CSRFToken}}
|
||||
<button type="submit" class="btn btn-sm btn-outline-danger">Delete</button>
|
||||
</form>
|
||||
</td>
|
||||
</tr>
|
||||
{{end}}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
{{end}}
|
||||
{{template "footer" .}}{{end}}
|
||||
Reference in New Issue
Block a user