spam.blade.php 2.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. @extends('admin.partial.template-full')
  2. @section('section')
  3. <div class="title mb-4">
  4. <h3 class="font-weight-bold d-inline-block">Autospam</h3>
  5. <p class="lead">Posts flagged as spam</p>
  6. <span class="float-right">
  7. </span>
  8. </div>
  9. <div class="row">
  10. <div class="col-12 col-md-3 mb-3">
  11. <div class="card border bg-primary text-white rounded-pill shadow">
  12. <div class="card-body pl-4 ml-3">
  13. <p class="h1 font-weight-bold mb-1" style="font-weight: 700">{{App\AccountInterstitial::whereNull('appeal_handled_at')->whereType('post.autospam')->count()}}</p>
  14. <p class="lead mb-0 font-weight-lighter">active cases</p>
  15. </div>
  16. </div>
  17. <div class="mt-3 card border bg-warning text-dark rounded-pill shadow">
  18. <div class="card-body pl-4 ml-3">
  19. <p class="h1 font-weight-bold mb-1" style="font-weight: 700">{{App\AccountInterstitial::whereType('post.autospam')->count()}}</p>
  20. <p class="lead mb-0 font-weight-lighter">total cases</p>
  21. </div>
  22. </div>
  23. </div>
  24. <div class="col-12 col-md-8 offset-md-1">
  25. <ul class="list-group">
  26. @if($appeals->count() == 0)
  27. <li class="list-group-item text-center py-5">
  28. <p class="mb-0 py-5 font-weight-bold">No autospam cases found!</p>
  29. </li>
  30. @endif
  31. @foreach($appeals as $appeal)
  32. <a class="list-group-item text-decoration-none text-dark" href="/i/admin/reports/autospam/{{$appeal->id}}">
  33. <div class="d-flex justify-content-between align-items-center">
  34. <div class="d-flex align-items-center">
  35. <img src="{{$appeal->has_media ? $appeal->status->thumb(true) : '/storage/no-preview.png'}}" width="64" height="64" class="rounded border">
  36. <div class="ml-2">
  37. <span class="d-inline-block text-truncate">
  38. <p class="mb-0 small font-weight-bold text-primary">{{$appeal->type}}</p>
  39. @if($appeal->item_type)
  40. <p class="mb-0 font-weight-bold">{{starts_with($appeal->item_type, 'App\\') ? explode('\\',$appeal->item_type)[1] : $appeal->item_type}}</p>
  41. @endif
  42. </span>
  43. </div>
  44. </div>
  45. <div class="d-block">
  46. <p class="mb-0 font-weight-bold">&commat;{{$appeal->user->username}}</p>
  47. <p class="mb-0 small text-muted font-weight-bold">{{$appeal->created_at->diffForHumans(null, null, true)}}</p>
  48. </div>
  49. <div class="d-inline-block">
  50. <p class="mb-0 small">
  51. <i class="fas fa-chevron-right fa-2x text-lighter"></i>
  52. </p>
  53. </div>
  54. </div>
  55. </a>
  56. @endforeach
  57. </ul>
  58. <p>{!!$appeals->render()!!}</p>
  59. </div>
  60. </div>
  61. @endsection