Add poll support
[bloat] / templates / user.tmpl
1 {{with .Data}}
2 {{template "header.tmpl" (WithContext .HeaderData $.Ctx)}}
3 {{template "navigation.tmpl" (WithContext .NavbarData $.Ctx)}}
4 <div class="page-title"> User </div>
5
6 <div class="user-info-container">
7 <div>
8         <div class="user-profile-img-container">
9                 <a class="img-link" href="{{.User.AvatarStatic}}" target="_blank">
10                         <img class="user-profile-img" src="{{.User.AvatarStatic}}" alt="profile-avatar" />
11                 </a>
12         </div>
13         <div class="user-profile-details-container">
14                 <div>
15                         <span class="status-dname"> {{EmojiFilter .User.DisplayName .User.Emojis}} </span>  
16                         <span class="status-uname"> {{.User.Acct}} </span>
17                         <a class="remote-link" href="{{.User.URL}}" target="_blank" title="remote profile">
18                                 source
19                         </a>
20                 </div>
21                 {{if not .IsCurrent}}
22                 <div>
23                         <span> {{if .User.Pleroma.Relationship.FollowedBy}} follows you - {{end}} </span>  
24                         {{if .User.Pleroma.Relationship.Following}} 
25                         <form class="d-inline" action="/unfollow/{{.User.ID}}" method="post">
26                                 <input type="hidden" name="csrf_token" value="{{$.Ctx.CSRFToken}}">
27                                 <input type="submit" value="unfollow" class="btn-link">
28                         </form>
29                         {{else}} 
30                         <form class="d-inline" action="/follow/{{.User.ID}}" method="post">
31                                 <input type="hidden" name="csrf_token" value="{{$.Ctx.CSRFToken}}">
32                                 <input type="submit" value="{{if .User.Pleroma.Relationship.Requested}}resend request{{else}}follow{{end}}" class="btn-link">
33                         </form>
34                         {{end}}
35                         {{if .User.Pleroma.Relationship.Requested}} 
36                         -
37                         <form class="d-inline" action="/unfollow/{{.User.ID}}" method="post">
38                                 <input type="hidden" name="csrf_token" value="{{$.Ctx.CSRFToken}}">
39                                 <input type="submit" value="cancel request" class="btn-link">
40                         </form>
41                         {{end}} 
42                 </div>
43                 <div>
44                         {{if .User.Pleroma.Relationship.Blocking}} 
45                         <form class="d-inline" action="/unblock/{{.User.ID}}" method="post">
46                                 <input type="hidden" name="csrf_token" value="{{$.Ctx.CSRFToken}}">
47                                 <input type="submit" value="unblock" class="btn-link">
48                         </form>
49                         {{else}} 
50                         <form class="d-inline" action="/block/{{.User.ID}}" method="post">
51                                 <input type="hidden" name="csrf_token" value="{{$.Ctx.CSRFToken}}">
52                                 <input type="submit" value="block" class="btn-link">
53                         </form>
54                         {{end}} 
55                         -
56                         {{if .User.Pleroma.Relationship.Muting}} 
57                         <form class="d-inline" action="/unmute/{{.User.ID}}" method="post">
58                                 <input type="hidden" name="csrf_token" value="{{$.Ctx.CSRFToken}}">
59                                 <input type="submit" value="unmute" class="btn-link">
60                         </form>
61                         {{else}} 
62                         <form class="d-inline" action="/mute/{{.User.ID}}" method="post">
63                                 <input type="hidden" name="csrf_token" value="{{$.Ctx.CSRFToken}}">
64                                 <input type="submit" value="mute" class="btn-link">
65                         </form>
66                         {{end}} 
67                 </div>
68                 {{end}}
69                 <div>
70                         <a href="/user/{{.User.ID}}"> statuses ({{.User.StatusesCount}}) </a> - 
71                         <a href="/user/{{.User.ID}}/following"> following ({{.User.FollowingCount}}) </a> - 
72                         <a href="/user/{{.User.ID}}/followers"> followers ({{.User.FollowersCount}}) </a> - 
73                         <a href="/user/{{.User.ID}}/media"> media </a>
74                 </div>
75                 <div>
76                         <a href="/usersearch/{{.User.ID}}"> search statuses </a>
77                 </div>
78         </div>
79         <div class="user-profile-decription">
80         {{.User.Note}}
81         </div>
82 </div>
83 </div>
84
85 {{if eq .Type ""}}
86 <div class="page-title"> Statuses </div>
87 {{range .Statuses}}
88 {{template "status.tmpl" (WithContext . $.Ctx)}}
89 {{end}}
90
91 {{else if eq .Type "following"}}
92 <div class="page-title"> Following </div>
93 {{template "userlist.tmpl" (WithContext .Users $.Ctx)}}
94
95 {{else if eq .Type "followers"}}
96 <div class="page-title"> Followers </div>
97 {{template "userlist.tmpl" (WithContext .Users $.Ctx)}}
98
99 {{else if eq .Type "media"}}
100 <div class="page-title"> Statuses with media </div>
101 {{range .Statuses}}
102 {{template "status.tmpl" (WithContext . $.Ctx)}}
103 {{end}}
104 {{end}}
105
106 <div class="pagination">
107         {{if .NextLink}}
108                 <a href="{{.NextLink}}">next</a>
109         {{end}}
110 </div>
111
112 {{template "footer.tmpl"}}
113 {{end}}