Lots of changes to the website
This commit is contained in:
47
templates/admin/changelog.html
Normal file
47
templates/admin/changelog.html
Normal file
@@ -0,0 +1,47 @@
|
||||
{{define "title"}}Changelog — Admin{{end}}
|
||||
|
||||
{{define "content"}}
|
||||
<div class="admin-wrap">
|
||||
<div class="admin-header">
|
||||
<h1>Changelog</h1>
|
||||
<div class="admin-actions">
|
||||
<a href="/admin" class="btn btn-outline">Back</a>
|
||||
<a href="/changelog" class="btn btn-outline">View Page</a>
|
||||
<a href="/admin/changelog/new" class="btn">New Entry</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{{if .Flash}}<p class="flash-msg">{{.Flash}}</p>{{end}}
|
||||
|
||||
{{if and .Log .Log.Entries}}
|
||||
<table class="hw-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Date</th>
|
||||
<th>Category</th>
|
||||
<th>Title</th>
|
||||
<th>Actions</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{{range .Log.Entries}}
|
||||
<tr>
|
||||
<td class="hw-spec">{{.Date}}</td>
|
||||
<td><span class="changelog-category changelog-category-{{.Category}}">{{.Category}}</span></td>
|
||||
<td>{{.Title}}</td>
|
||||
<td class="admin-row-actions">
|
||||
<a href="/admin/changelog/edit/{{.ID}}" class="btn btn-outline btn-sm">Edit</a>
|
||||
<form method="POST" action="/admin/changelog/delete/{{.ID}}" style="display:inline">
|
||||
<button type="submit" class="btn btn-danger btn-sm"
|
||||
onclick="return confirm('Delete this entry?')">Delete</button>
|
||||
</form>
|
||||
</td>
|
||||
</tr>
|
||||
{{end}}
|
||||
</tbody>
|
||||
</table>
|
||||
{{else}}
|
||||
<p class="empty-state">No entries yet. <a href="/admin/changelog/new">Create one.</a></p>
|
||||
{{end}}
|
||||
</div>
|
||||
{{end}}
|
||||
Reference in New Issue
Block a user