Merge branch 'master' of git.freesoftwareextremist.com:public/bloat
[bloat] / templates / user.tmpl
index af83d4af02513e341a99914bacb864b470bff98e..de2b5c4b4d53ea3d763e10c671cad498fb7a4559 100644 (file)
@@ -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}} 
                                <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> -