user.tmpl 5.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174
  1. {{with .Data}}
  2. {{template "header.tmpl" (WithContext .CommonData $.Ctx)}}
  3. <div class="page-title"> User </div>
  4. <div class="user-info-container">
  5. <div>
  6. <div class="user-profile-img-container">
  7. <a class="img-link" href="{{.User.AvatarStatic}}" target="_blank">
  8. <img class="user-profile-img" src="{{.User.AvatarStatic}}" alt="profile-avatar" height="96" />
  9. </a>
  10. </div>
  11. <div class="user-profile-details-container">
  12. <div>
  13. <bdi class="status-dname"> {{EmojiFilter .User.DisplayName .User.Emojis}} </bdi>
  14. <span class="status-uname"> @{{.User.Acct}} </span>
  15. <a class="remote-link" href="{{.User.URL}}" target="_blank" title="remote profile">
  16. source
  17. </a>
  18. </div>
  19. {{if not .IsCurrent}}
  20. <div>
  21. <span> {{if .User.Pleroma.Relationship.FollowedBy}} follows you - {{end}} </span>
  22. {{if .User.Pleroma.Relationship.Following}}
  23. <form class="d-inline" action="/unfollow/{{.User.ID}}" method="post">
  24. <input type="hidden" name="csrf_token" value="{{$.Ctx.CSRFToken}}">
  25. <input type="submit" value="unfollow" class="btn-link">
  26. </form>
  27. {{else}}
  28. <form class="d-inline" action="/follow/{{.User.ID}}" method="post">
  29. <input type="hidden" name="csrf_token" value="{{$.Ctx.CSRFToken}}">
  30. <input type="submit" value="{{if .User.Pleroma.Relationship.Requested}}resend request{{else}}follow{{end}}" class="btn-link">
  31. </form>
  32. {{end}}
  33. {{if .User.Pleroma.Relationship.Requested}}
  34. -
  35. <form class="d-inline" action="/unfollow/{{.User.ID}}" method="post">
  36. <input type="hidden" name="csrf_token" value="{{$.Ctx.CSRFToken}}">
  37. <input type="submit" value="cancel request" class="btn-link">
  38. </form>
  39. {{end}}
  40. -
  41. {{if .User.Pleroma.Relationship.Subscribing}}
  42. <form class="d-inline" action="/unsubscribe/{{.User.ID}}" method="post">
  43. <input type="hidden" name="csrf_token" value="{{$.Ctx.CSRFToken}}">
  44. <input type="submit" value="unsubscribe" class="btn-link">
  45. </form>
  46. {{else}}
  47. <form class="d-inline" action="/subscribe/{{.User.ID}}" method="post">
  48. <input type="hidden" name="csrf_token" value="{{$.Ctx.CSRFToken}}">
  49. <input type="submit" value="subscribe" class="btn-link">
  50. </form>
  51. {{end}}
  52. </div>
  53. <div>
  54. {{if .User.Pleroma.Relationship.Blocking}}
  55. <form class="d-inline" action="/unblock/{{.User.ID}}" method="post">
  56. <input type="hidden" name="csrf_token" value="{{$.Ctx.CSRFToken}}">
  57. <input type="submit" value="unblock" class="btn-link">
  58. </form>
  59. {{else}}
  60. <form class="d-inline" action="/block/{{.User.ID}}" method="post">
  61. <input type="hidden" name="csrf_token" value="{{$.Ctx.CSRFToken}}">
  62. <input type="submit" value="block" class="btn-link">
  63. </form>
  64. {{end}}
  65. -
  66. {{if .User.Pleroma.Relationship.Muting}}
  67. <form class="d-inline" action="/unmute/{{.User.ID}}" method="post">
  68. <input type="hidden" name="csrf_token" value="{{$.Ctx.CSRFToken}}">
  69. <input type="submit" value="unmute" class="btn-link">
  70. </form>
  71. {{else}}
  72. <form class="d-inline" action="/mute/{{.User.ID}}" method="post">
  73. <input type="hidden" name="csrf_token" value="{{$.Ctx.CSRFToken}}">
  74. <input type="submit" value="mute" class="btn-link">
  75. </form>
  76. {{end}}
  77. {{if .User.Pleroma.Relationship.Following}}
  78. -
  79. {{if .User.Pleroma.Relationship.ShowingReblogs}}
  80. <form class="d-inline" action="/follow/{{.User.ID}}?reblogs=false" method="post">
  81. <input type="hidden" name="csrf_token" value="{{$.Ctx.CSRFToken}}">
  82. <input type="submit" value="hide retweets" class="btn-link">
  83. </form>
  84. {{else}}
  85. <form class="d-inline" action="/follow/{{.User.ID}}" method="post">
  86. <input type="hidden" name="csrf_token" value="{{$.Ctx.CSRFToken}}">
  87. <input type="submit" value="show retweets" class="btn-link">
  88. </form>
  89. {{end}}
  90. {{end}}
  91. </div>
  92. {{end}}
  93. <div>
  94. <a href="/user/{{.User.ID}}"> statuses ({{.User.StatusesCount}}) </a> -
  95. <a href="/user/{{.User.ID}}/following"> following ({{.User.FollowingCount}}) </a> -
  96. <a href="/user/{{.User.ID}}/followers"> followers ({{.User.FollowersCount}}) </a> -
  97. <a href="/user/{{.User.ID}}/media"> media </a>
  98. </div>
  99. {{if .IsCurrent}}
  100. <div>
  101. <a href="/user/{{.User.ID}}/bookmarks"> bookmarks </a> -
  102. <a href="/user/{{.User.ID}}/likes"> likes </a> -
  103. <a href="/user/{{.User.ID}}/mutes"> mutes </a> -
  104. <a href="/user/{{.User.ID}}/blocks"> blocks </a>
  105. </div>
  106. {{end}}
  107. <div>
  108. <a href="/usersearch/{{.User.ID}}"> search statuses </a>
  109. </div>
  110. </div>
  111. <div class="user-profile-decription">
  112. {{EmojiFilter .User.Note .User.Emojis}}
  113. </div>
  114. </div>
  115. </div>
  116. {{if eq .Type ""}}
  117. <div class="page-title"> Statuses </div>
  118. {{range .Statuses}}
  119. {{template "status.tmpl" (WithContext . $.Ctx)}}
  120. {{else}}
  121. <div class="no-data-found">No data found</div>
  122. {{end}}
  123. {{else if eq .Type "following"}}
  124. <div class="page-title"> Following </div>
  125. {{template "userlist.tmpl" (WithContext .Users $.Ctx)}}
  126. {{else if eq .Type "followers"}}
  127. <div class="page-title"> Followers </div>
  128. {{template "userlist.tmpl" (WithContext .Users $.Ctx)}}
  129. {{else if eq .Type "media"}}
  130. <div class="page-title"> Statuses with media </div>
  131. {{range .Statuses}}
  132. {{template "status.tmpl" (WithContext . $.Ctx)}}
  133. {{else}}
  134. <div class="no-data-found">No data found</div>
  135. {{end}}
  136. {{else if eq .Type "bookmarks"}}
  137. <div class="page-title"> Bookmarks </div>
  138. {{range .Statuses}}
  139. {{template "status.tmpl" (WithContext . $.Ctx)}}
  140. {{else}}
  141. <div class="no-data-found">No data found</div>
  142. {{end}}
  143. {{else if eq .Type "likes"}}
  144. <div class="page-title"> Likes </div>
  145. {{range .Statuses}}
  146. {{template "status.tmpl" (WithContext . $.Ctx)}}
  147. {{else}}
  148. <div class="no-data-found">No data found</div>
  149. {{end}}
  150. {{else if eq .Type "mutes"}}
  151. <div class="page-title"> Mutes </div>
  152. {{template "userlist.tmpl" (WithContext .Users $.Ctx)}}
  153. {{else if eq .Type "blocks"}}
  154. <div class="page-title"> Blocks </div>
  155. {{template "userlist.tmpl" (WithContext .Users $.Ctx)}}
  156. {{end}}
  157. <div class="pagination">
  158. {{if .NextLink}}
  159. <a href="{{.NextLink}}">[next]</a>
  160. {{end}}
  161. </div>
  162. {{template "footer.tmpl"}}
  163. {{end}}