mirror of
https://git.freesoftwareextremist.com/bloat
synced 2024-10-30 03:50:34 +00:00
65 lines
1.7 KiB
Cheetah
65 lines
1.7 KiB
Cheetah
{{with .Data}}
|
|
{{template "header.tmpl" (WithContext .CommonData $.Ctx)}}
|
|
<h1>List {{.List.Title}}</h1>
|
|
|
|
<form action="/list/{{.List.ID}}/rename" method="POST">
|
|
<input type="hidden" name="csrf_token" value="{{$.Ctx.CSRFToken}}">
|
|
<input type="hidden" name="referrer" value="{{$.Ctx.Referrer}}">
|
|
<div class="form-field">
|
|
<input type="text" id="title" name="title" value="{{.List.Title}}">
|
|
<button type="submit"> Rename </button>
|
|
</div>
|
|
</form>
|
|
|
|
<h1>Users</h1>
|
|
{{if .Accounts}}
|
|
<table>
|
|
{{range .Accounts}}
|
|
<tr>
|
|
<td>{{template "userlistitem.tmpl" (WithContext . $.Ctx)}}</td>
|
|
<td>
|
|
<form class="user-list-action" action="/list/{{$.Data.List.ID}}/removeuser?uid={{.ID}}" method="POST">
|
|
<input type="hidden" name="csrf_token" value="{{$.Ctx.CSRFToken}}">
|
|
<input type="hidden" name="referrer" value="{{$.Ctx.Referrer}}">
|
|
<button type="submit"> Remove </button>
|
|
</form>
|
|
</td>
|
|
</tr>
|
|
{{end}}
|
|
</table>
|
|
{{else}}
|
|
<p>No data found</p>
|
|
{{end}}
|
|
|
|
<h1>Add User</h1>
|
|
<form action="/list/{{.List.ID}}" method="GET">
|
|
<div class="form-field">
|
|
<label for="query"> Query </label>
|
|
<input type="text" id="query" name="q" value="{{.Q}}">
|
|
<button type="submit"> Search </button>
|
|
</div>
|
|
</form>
|
|
|
|
{{if .Q}}
|
|
{{if .SearchAccounts}}
|
|
<table>
|
|
{{range .SearchAccounts}}
|
|
<tr>
|
|
<td> {{template "userlistitem.tmpl" (WithContext . $.Ctx)}} </td>
|
|
<td>
|
|
<form class="user-list-action" action="/list/{{$.Data.List.ID}}/adduser?uid={{.ID}}" method="POST">
|
|
<input type="hidden" name="csrf_token" value="{{$.Ctx.CSRFToken}}">
|
|
<input type="hidden" name="referrer" value="{{$.Ctx.Referrer}}">
|
|
<button type="submit"> Add </button>
|
|
</form>
|
|
</td>
|
|
</tr>
|
|
{{end}}
|
|
</table>
|
|
{{else}}
|
|
<p>No data found</p>
|
|
{{end}}
|
|
{{end}}
|
|
|
|
{{template "footer.tmpl"}}
|
|
{{end}}
|