diff options
Diffstat (limited to 'templates/user.tmpl')
-rw-r--r-- | templates/user.tmpl | 35 |
1 files changed, 31 insertions, 4 deletions
diff --git a/templates/user.tmpl b/templates/user.tmpl index af83d4a..de2b5c4 100644 --- a/templates/user.tmpl +++ b/templates/user.tmpl @@ -18,6 +18,7 @@ source </a> </div> + {{if not .IsCurrent}} <div> <span> {{if .User.Pleroma.Relationship.FollowedBy}} follows you - {{end}} </span> {{if .User.Pleroma.Relationship.Following}} @@ -25,20 +26,46 @@ <input type="hidden" name="csrf_token" value="{{$.Ctx.CSRFToken}}"> <input type="submit" value="unfollow" class="btn-link"> </form> - {{end}} + {{else}} + <form class="d-inline" action="/follow/{{.User.ID}}" method="post"> + <input type="hidden" name="csrf_token" value="{{$.Ctx.CSRFToken}}"> + <input type="submit" value="{{if .User.Pleroma.Relationship.Requested}}resend request{{else}}follow{{end}}" class="btn-link"> + </form> + {{end}} {{if .User.Pleroma.Relationship.Requested}} + - <form class="d-inline" action="/unfollow/{{.User.ID}}" method="post"> <input type="hidden" name="csrf_token" value="{{$.Ctx.CSRFToken}}"> <input type="submit" value="cancel request" class="btn-link"> </form> {{end}} - {{if not .User.Pleroma.Relationship.Following}} - <form class="d-inline" action="/follow/{{.User.ID}}" method="post"> + </div> + <div> + {{if .User.Pleroma.Relationship.Blocking}} + <form class="d-inline" action="/unblock/{{.User.ID}}" method="post"> <input type="hidden" name="csrf_token" value="{{$.Ctx.CSRFToken}}"> - <input type="submit" value="{{if .User.Pleroma.Relationship.Requested}}resend request{{else}}follow{{end}}" class="btn-link"> + <input type="submit" value="unblock" class="btn-link"> + </form> + {{else}} + <form class="d-inline" action="/block/{{.User.ID}}" method="post"> + <input type="hidden" name="csrf_token" value="{{$.Ctx.CSRFToken}}"> + <input type="submit" value="block" class="btn-link"> + </form> + {{end}} + - + {{if .User.Pleroma.Relationship.Muting}} + <form class="d-inline" action="/unmute/{{.User.ID}}" method="post"> + <input type="hidden" name="csrf_token" value="{{$.Ctx.CSRFToken}}"> + <input type="submit" value="unmute" class="btn-link"> + </form> + {{else}} + <form class="d-inline" action="/mute/{{.User.ID}}" method="post"> + <input type="hidden" name="csrf_token" value="{{$.Ctx.CSRFToken}}"> + <input type="submit" value="mute" class="btn-link"> </form> {{end}} </div> + {{end}} <div> <a href="/user/{{.User.ID}}"> statuses ({{.User.StatusesCount}}) </a> - <a href="/user/{{.User.ID}}/following"> following ({{.User.FollowingCount}}) </a> - |