show.blade.php 5.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121
  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.users')}}" class="btn btn-outline-secondary btn-sm font-weight-bold">Back</a></span>
  5. <span class="text-center">
  6. <h3 class="font-weight-bold mb-0">&commat;{{$profile->username}}</h3>
  7. <p class="mb-0 small text-muted text-uppercase font-weight-bold">
  8. <span>{{$profile->statuses()->count()}} Posts</span>
  9. <span class="px-1">|</span>
  10. <span>{{$profile->followers()->count()}} Followers</span>
  11. <span class="px-1">|</span>
  12. <span>{{$profile->following()->count()}} Following</span>
  13. </p>
  14. </span>
  15. <span>
  16. <div class="dropdown">
  17. <button class="btn btn-outline-secondary btn-sm font-weight-bold dropdown-toggle" type="button" id="userActions" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"><i class="fas fa-bars"></i></button>
  18. <div class="dropdown-menu dropdown-menu-right" aria-labelledby="userActions">
  19. <a class="dropdown-item" href="/i/admin/users/activity/{{$user->id}}">
  20. <span class="font-weight-bold">Activity</span>
  21. </a>
  22. <a class="dropdown-item" href="/i/admin/users/message/{{$user->id}}">
  23. <span class="font-weight-bold">Send Message</span>
  24. </a>
  25. <a class="dropdown-item" href="{{$profile->url()}}">
  26. <span class="font-weight-bold">View Profile</span>
  27. </a>
  28. <div class="dropdown-divider"></div>
  29. <a class="dropdown-item" href="/i/admin/users/edit/{{$user->id}}">
  30. <span class="font-weight-bold">Edit</span>
  31. </a>
  32. <a class="dropdown-item" href="/i/admin/users/modtools/{{$user->id}}">
  33. <span class="font-weight-bold">Mod Tools</span>
  34. </a>
  35. <a class="dropdown-item" href="/i/admin/users/modlogs/{{$user->id}}">
  36. <span class="font-weight-bold">Mod Logs</span>
  37. </a>
  38. <div class="dropdown-divider"></div>
  39. <a class="dropdown-item" href="/i/admin/users/delete/{{$user->id}}">
  40. <span class="text-danger font-weight-bold">Delete Account</span>
  41. </a>
  42. </div>
  43. </div>
  44. </span>
  45. </div>
  46. <hr>
  47. <div class="row mb-3">
  48. <div class="col-12 col-md-4">
  49. <div class="card shadow-none border">
  50. <div class="card-body text-center">
  51. <img src="{{$profile->avatarUrl()}}" class="box-shadow rounded-circle" width="128px" height="128px">
  52. <p class="mt-3 mb-0 lead">
  53. <span class="font-weight-bold">{{$profile->name}}</span>
  54. </p>
  55. @if($user->is_admin == true)
  56. <p class="mb-0">
  57. <span class="badge badge-danger badge-sm">ADMIN</span>
  58. </p>
  59. @endif
  60. <p class="mb-0 text-center text-muted">
  61. Joined {{$profile->created_at->diffForHumans()}}
  62. </p>
  63. </div>
  64. <table class="table mb-0">
  65. <tbody>
  66. <tr>
  67. <th scope="row" class="font-weight-bold text-muted text-uppercase pl-3 small" style="line-height: 2;">bookmarks</th>
  68. <td class="text-right font-weight-bold">{{$profile->bookmarks()->count()}}</td>
  69. </tr>
  70. <tr>
  71. <th scope="row" class="font-weight-bold text-muted text-uppercase pl-3 small" style="line-height: 2;">collections</th>
  72. <td class="text-right font-weight-bold">{{$profile->collections()->count()}}</td>
  73. </tr>
  74. <tr>
  75. <th scope="row" class="font-weight-bold text-muted text-uppercase pl-3 small" style="line-height: 2;">likes</th>
  76. <td class="text-right font-weight-bold">{{$profile->likes()->count()}}</td>
  77. </tr>
  78. <tr>
  79. <th scope="row" class="font-weight-bold text-muted text-uppercase pl-3 small" style="line-height: 2;">reports</th>
  80. <td class="text-right font-weight-bold">{{$profile->reports()->count()}}</td>
  81. </tr>
  82. <tr>
  83. <th scope="row" class="font-weight-bold text-muted text-uppercase pl-3 small" style="line-height: 2;">reported</th>
  84. <td class="text-right font-weight-bold">{{$profile->reported()->count()}}</td>
  85. </tr>
  86. <tr>
  87. <th scope="row" class="font-weight-bold text-muted text-uppercase pl-3 small" style="line-height: 2;">Active stories</th>
  88. <td class="text-right font-weight-bold">{{$profile->stories()->count()}}</td>
  89. </tr>
  90. <tr>
  91. <th scope="row" class="font-weight-bold text-muted text-uppercase pl-3 small" style="line-height: 2;">storage used</th>
  92. <td class="text-right font-weight-bold">{{PrettyNumber::size($profile->media()->sum('size'))}}<span class="text-muted"> / {{PrettyNumber::size(config('pixelfed.max_account_size') * 1000)}}</span></td>
  93. </tr>
  94. </tbody>
  95. </table>
  96. </div>
  97. </div>
  98. <div class="col-12 col-md-8">
  99. <p class="title h4 font-weight-bold mt-2 py-2">Recent Posts</p>
  100. <hr>
  101. <div class="row">
  102. @foreach($profile->statuses()->whereHas('media')->latest()->take(9)->get() as $item)
  103. <div class="col-12 col-md-4 col-sm-6 px-0" style="margin-bottom: 1px;">
  104. <a href="{{$item->url()}}">
  105. <img src="{{$item->thumb(true)}}" width="200px" height="200px">
  106. </a>
  107. </div>
  108. @endforeach
  109. @if($profile->statuses()->whereHas('media')->count() == 0)
  110. <div class="col-12">
  111. <div class="card card-body border shadow-none bg-transparent">
  112. <p class="text-center mb-0 text-muted">No statuses found</p>
  113. </div>
  114. </div>
  115. @endif
  116. </div>
  117. </div>
  118. </div>
  119. @endsection