aboutsummaryrefslogtreecommitdiff
path: root/templates
diff options
context:
space:
mode:
authorr <r@freesoftwareextremist.com>2024-01-17 10:25:08 +0000
committerr <r@freesoftwareextremist.com>2024-01-17 10:25:08 +0000
commitce0195a8104f34ff18f831754c428aec904c0f89 (patch)
tree2c9f6c1c7f17b771f8c4cfc4998e9a3d9bb1c623 /templates
parent1792daae63e7798b19109ac819fc0ecf42d34627 (diff)
downloadbloat-ce0195a8104f34ff18f831754c428aec904c0f89.tar.gz
bloat-ce0195a8104f34ff18f831754c428aec904c0f89.zip
Add inline mute/block buttons on mute/block page
Diffstat (limited to 'templates')
-rw-r--r--templates/user.tmpl38
1 files changed, 36 insertions, 2 deletions
diff --git a/templates/user.tmpl b/templates/user.tmpl
index 1ae75f9..8f47929 100644
--- a/templates/user.tmpl
+++ b/templates/user.tmpl
@@ -172,11 +172,45 @@
{{else if eq .Type "mutes"}}
<h1>Mutes</h1>
-{{template "userlist.tmpl" (WithContext .Users $.Ctx)}}
+{{if .Users}}
+<table>
+{{range .Users}}
+ <tr>
+ <td> {{template "userlistitem.tmpl" (WithContext . $.Ctx)}} </td>
+ <td>
+ <form class="user-list-action" action="/unmute/{{.ID}}" method="POST">
+ <input type="hidden" name="csrf_token" value="{{$.Ctx.CSRFToken}}">
+ <input type="hidden" name="referrer" value="{{$.Ctx.Referrer}}">
+ <button type="submit">Unmute</button>
+ </form>
+ </td>
+ </tr>
+{{end}}
+</table>
+{{else}}
+<p>No data found</p>
+{{end}}
{{else if eq .Type "blocks"}}
<h1>Blocks</h1>
-{{template "userlist.tmpl" (WithContext .Users $.Ctx)}}
+{{if .Users}}
+<table>
+{{range .Users}}
+ <tr>
+ <td> {{template "userlistitem.tmpl" (WithContext . $.Ctx)}} </td>
+ <td>
+ <form class="user-list-action" action="/unblock/{{.ID}}" method="POST">
+ <input type="hidden" name="csrf_token" value="{{$.Ctx.CSRFToken}}">
+ <input type="hidden" name="referrer" value="{{$.Ctx.Referrer}}">
+ <button type="submit">Unblock</button>
+ </form>
+ </td>
+ </tr>
+{{end}}
+</table>
+{{else}}
+<p>No data found</p>
+{{end}}
{{else if eq .Type "requests"}}
<h1>Follow requests</h1>