1
0

edit.blade.php 9.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234
  1. @extends('admin.partial.template-full')
  2. @section('section')
  3. <div class="title d-flex justify-content-between align-items-center">
  4. <span><a href="{{route('admin.profiles')}}" class="btn btn-outline-secondary btn-sm font-weight-bold">Back</a></span>
  5. <h3 class="font-weight-bold">Edit Profile</h3>
  6. <span><a href="#" class="btn btn-outline-primary btn-sm font-weight-bold disabled">Enable Editing</a></span>
  7. </div>
  8. <hr>
  9. <div class="row mb-3">
  10. <div class="col-12 col-md-4">
  11. <div class="card">
  12. <div class="card-body text-center">
  13. <img src="{{$profile->avatarUrl()}}" class="box-shadow rounded-circle" width="128px" height="128px">
  14. </div>
  15. {{-- <div class="card-footer bg-white">
  16. <p class="font-weight-bold mb-0 small">Last updated: {{$profile->avatar->updated_at->diffForHumans()}}</p>
  17. </div> --}}
  18. </div>
  19. </div>
  20. <div class="col-12 col-md-8">
  21. <table class="table table-striped table-borderless table-sm">
  22. <tbody>
  23. @if($user)
  24. <tr>
  25. <th scope="row">user id</th>
  26. <td>{{$user->id}}</td>
  27. </tr>
  28. @endif
  29. <tr>
  30. <th scope="row">profile id</th>
  31. <td>{{$profile->id}}</td>
  32. </tr>
  33. <tr>
  34. <th scope="row">username</th>
  35. <td>
  36. {{$profile->username}}
  37. @if($user && $user->is_admin == true)
  38. <span class="badge badge-danger ml-3">Admin</span>
  39. @endif
  40. </td>
  41. </tr>
  42. <tr>
  43. <th scope="row">display name</th>
  44. <td>{{$profile->name}}</td>
  45. </tr>
  46. <tr>
  47. <th scope="row">joined</th>
  48. <td>{{$profile->created_at->format('M j Y')}}</td>
  49. </tr>
  50. @if($user)
  51. <tr>
  52. <th scope="row">email</th>
  53. <td>
  54. {{$user->email}}
  55. @if($user->email_verified_at)
  56. <span class="text-success font-weight-bold small pl-2">Verified</span>
  57. @else
  58. <span class="text-danger font-weight-bold small pl-2">Unverified</span>
  59. @endif
  60. </td>
  61. </tr>
  62. @endif
  63. </tbody>
  64. </table>
  65. {{-- <div class="py-3">
  66. <p class="font-weight-bold mb-0">
  67. {{$profile->username}}
  68. </p>
  69. <p class="h3 font-weight-bold">
  70. {{$profile->emailUrl()}}
  71. </p>
  72. <p class="font-weight-bold mb-0 text-muted">
  73. Member Since: {{$profile->created_at->format('M Y')}}
  74. </p>
  75. </div> --}}
  76. </div>
  77. </div>
  78. <div class="row mb-3">
  79. <div class="col-12 col-md-4 mb-3">
  80. <div class="card">
  81. <div class="card-body text-center">
  82. <p class="h4 mb-0 font-weight-bold">{{$profile->statusCount()}}</p>
  83. <p class="text-muted font-weight-bold small mb-0">Posts</p>
  84. </div>
  85. </div>
  86. </div>
  87. <div class="col-12 col-md-4 mb-3">
  88. <div class="card">
  89. <div class="card-body text-center">
  90. <p class="h4 mb-0 font-weight-bold">{{$profile->followingCount()}}</p>
  91. <p class="text-muted font-weight-bold small mb-0">Following</p>
  92. </div>
  93. </div>
  94. </div>
  95. <div class="col-12 col-md-4 mb-3">
  96. <div class="card">
  97. <div class="card-body text-center">
  98. <p class="h4 mb-0 font-weight-bold">{{$profile->followerCount()}}</p>
  99. <p class="text-muted font-weight-bold small mb-0">Followers</p>
  100. </div>
  101. </div>
  102. </div>
  103. <div class="col-12 col-md-3 mb-3">
  104. <div class="card">
  105. <div class="card-body text-center">
  106. <p class="h4 mb-0 font-weight-bold">{{$profile->bookmarks()->count()}}</p>
  107. <p class="text-muted font-weight-bold small mb-0">Bookmarks</p>
  108. </div>
  109. </div>
  110. </div>
  111. <div class="col-12 col-md-3 mb-3">
  112. <div class="card">
  113. <div class="card-body text-center">
  114. <p class="h4 mb-0 font-weight-bold">{{$profile->likes()->count()}}</p>
  115. <p class="text-muted font-weight-bold small mb-0">Likes</p>
  116. </div>
  117. </div>
  118. </div>
  119. <div class="col-12 col-md-3 mb-3">
  120. <div class="card">
  121. <div class="card-body text-center">
  122. <p class="h4 mb-0 font-weight-bold">{{$profile->reports()->count()}}</p>
  123. <p class="text-muted font-weight-bold small mb-0">Reports Made</p>
  124. </div>
  125. </div>
  126. </div>
  127. <div class="col-12 col-md-3 mb-3">
  128. <div class="card">
  129. <div class="card-body text-center">
  130. <p class="h4 mb-0 font-weight-bold">{{PrettyNumber::size($profile->media()->sum('size'))}}</p>
  131. <p class="text-muted font-weight-bold small mb-0">Storage Used</p>
  132. </div>
  133. </div>
  134. </div>
  135. </div>
  136. <hr>
  137. {{-- <div class="mx-3">
  138. <div class="sub-title h4 font-weight-bold mb-4">
  139. Account Settings
  140. </div>
  141. <form>
  142. <div class="form-group">
  143. <label class="font-weight-bold text-muted">Display Name</label>
  144. <input type="text" class="form-control" value="{{$user->name}}">
  145. </div>
  146. <div class="form-group">
  147. <label class="font-weight-bold text-muted">Username</label>
  148. <input type="text" class="form-control" value="{{$user->username}}">
  149. </div>
  150. <div class="form-group">
  151. <label class="font-weight-bold text-muted">Email address</label>
  152. <input type="email" class="form-control" value="{{$user->email}}" placeholder="Enter email">
  153. <p class="help-text small text-muted font-weight-bold">
  154. @if($user->email_verified_at)
  155. <span class="text-success">Verified</span> for {{$user->email_verified_at->diffForHumans()}}
  156. @else
  157. <span class="text-danger">Unverified</span> email.
  158. @endif
  159. </p>
  160. </div>
  161. </form>
  162. </div>
  163. <hr> --}}
  164. <div class="mx-3">
  165. <div class="sub-title h4 font-weight-bold mb-4">
  166. Account Actions
  167. </div>
  168. <div class="row">
  169. <div class="col-12 col-md-4">
  170. <form method="post" action="/i/admin/users/moderation/update" class="pb-3">
  171. @csrf
  172. <input type="hidden" name="profile_id" value="{{$profile->id}}">
  173. <button class="btn btn-outline-primary py-0 font-weight-bold">Enforce CW</button>
  174. <p class="help-text text-muted font-weight-bold small">Adds a CW to every post made by this account.</p>
  175. </form>
  176. </div>
  177. <div class="col-12 col-md-4">
  178. <form method="post" action="/i/admin/users/moderation/update" class="pb-3">
  179. @csrf
  180. <input type="hidden" name="profile_id" value="{{$profile->id}}">
  181. <button class="btn btn-outline-primary py-0 font-weight-bold">Unlisted Posts</button>
  182. <p class="help-text text-muted font-weight-bold small">Removes account from public/network timelines.</p>
  183. </form>
  184. </div>
  185. <div class="col-12 col-md-4">
  186. <form method="post" action="/i/admin/users/moderation/update" class="pb-3">
  187. @csrf
  188. <input type="hidden" name="profile_id" value="{{$profile->id}}">
  189. <button class="btn btn-outline-primary py-0 font-weight-bold">No Autolinking</button>
  190. <p class="help-text text-muted font-weight-bold small">Do not transform mentions, hashtags or urls into HTML.</p>
  191. </form>
  192. </div>
  193. <div class="col-12 col-md-4">
  194. <form method="post" action="/i/admin/users/moderation/update" class="pb-3">
  195. @csrf
  196. <input type="hidden" name="profile_id" value="{{$profile->id}}">
  197. <button class="btn btn-outline-primary py-0 font-weight-bold">Disable Account</button>
  198. <p class="help-text text-muted font-weight-bold small">Temporarily disable account until next time user log in.</p>
  199. </form>
  200. </div>
  201. <div class="col-12 col-md-4">
  202. <form method="post" action="/i/admin/users/moderation/update" class="pb-3">
  203. @csrf
  204. <input type="hidden" name="profile_id" value="{{$profile->id}}">
  205. <button class="btn btn-outline-primary py-0 font-weight-bold">Suspend Account</button>
  206. <p class="help-text text-muted font-weight-bold small">This prevents any new interactions, without deleting existing data.</p>
  207. </form>
  208. </div>
  209. <div class="col-12 col-md-4">
  210. <form method="post" action="/i/admin/users/moderation/update" class="pb-3">
  211. @csrf
  212. <input type="hidden" name="profile_id" value="{{$profile->id}}">
  213. <button class="btn btn-outline-danger py-0 font-weight-bold">Lock down Account</button>
  214. <p class="help-text text-muted font-weight-bold small">This disables the account and changes the password, forcing account to reset password via verified email.</p>
  215. </form>
  216. </div>
  217. <div class="col-12">
  218. <form method="post" action="/i/admin/users/moderation/update" class="pb-3">
  219. @csrf
  220. <input type="hidden" name="profile_id" value="{{$profile->id}}">
  221. <button class="btn btn-outline-danger font-weight-bold btn-block">Delete Account</button>
  222. <p class="help-text text-muted font-weight-bold small">Permanently delete this account.</p>
  223. </form>
  224. </div>
  225. </div>
  226. </div>
  227. @endsection