aboutsummaryrefslogtreecommitdiff
path: root/templates/userlistfollow.tmpl
blob: 298142f8615fd299982edbf8d66c01c4fe869078 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
{{with .Data}}
{{if .}}
<table>
{{range .}}
	<tr>
		<td> {{template "userlistitem.tmpl" (WithContext . $.Ctx)}} </td>
		<td>
			{{if (ne $.Ctx.UserID .ID)}}
				{{if .Pleroma.Relationship.Following}}
				<form class="user-list-action" action="/unfollow/{{.ID}}" method="POST">
					<input type="hidden" name="csrf_token" value="{{$.Ctx.CSRFToken}}">
					<input type="hidden" name="referrer" value="{{$.Ctx.Referrer}}">
					<button type="submit">Unfollow</button>
				</form>
				{{else}}
				<form class="user-list-action" action="/follow/{{.ID}}" method="POST">
					<input type="hidden" name="csrf_token" value="{{$.Ctx.CSRFToken}}">
					<input type="hidden" name="referrer" value="{{$.Ctx.Referrer}}">
					<button type="submit">Follow</button>
				</form>
				{{end}}
			{{end}}
		</td>
	</tr>
{{end}}
</table>
{{else}}
<p>No data found</p>
{{end}}
{{end}}