mirror of
https://github.com/pixelfed/pixelfed.git
synced 2024-12-23 21:43:17 +00:00
commit
32a9afc7ac
2 changed files with 15 additions and 10 deletions
|
@ -67,7 +67,10 @@ class AdminController extends Controller
|
||||||
public function reports(Request $request)
|
public function reports(Request $request)
|
||||||
{
|
{
|
||||||
$filter = $request->input('filter') == 'closed' ? 'closed' : 'open';
|
$filter = $request->input('filter') == 'closed' ? 'closed' : 'open';
|
||||||
$reports = Report::orderBy('created_at','desc')
|
$reports = Report::whereHas('status')
|
||||||
|
->whereHas('reportedUser')
|
||||||
|
->whereHas('reporter')
|
||||||
|
->orderBy('created_at','desc')
|
||||||
->when($filter, function($q, $filter) {
|
->when($filter, function($q, $filter) {
|
||||||
return $filter == 'open' ?
|
return $filter == 'open' ?
|
||||||
$q->whereNull('admin_seen') :
|
$q->whereNull('admin_seen') :
|
||||||
|
|
|
@ -18,6 +18,7 @@
|
||||||
@php($ai = App\AccountInterstitial::whereNotNull('appeal_requested_at')->whereNull('appeal_handled_at')->count())
|
@php($ai = App\AccountInterstitial::whereNotNull('appeal_requested_at')->whereNull('appeal_handled_at')->count())
|
||||||
@php($spam = App\AccountInterstitial::whereType('post.autospam')->whereNull('appeal_handled_at')->count())
|
@php($spam = App\AccountInterstitial::whereType('post.autospam')->whereNull('appeal_handled_at')->count())
|
||||||
@if($ai || $spam)
|
@if($ai || $spam)
|
||||||
|
<div class="col-12 col-md-8 offset-md-2">
|
||||||
<div class="mb-4">
|
<div class="mb-4">
|
||||||
<a class="btn btn-outline-primary px-5 py-3 mr-3" href="/i/admin/reports/appeals">
|
<a class="btn btn-outline-primary px-5 py-3 mr-3" href="/i/admin/reports/appeals">
|
||||||
<p class="font-weight-bold h4 mb-0">{{$ai}}</p>
|
<p class="font-weight-bold h4 mb-0">{{$ai}}</p>
|
||||||
|
@ -28,6 +29,7 @@
|
||||||
Flagged {{$ai == 1 ? 'Post' : 'Posts'}}
|
Flagged {{$ai == 1 ? 'Post' : 'Posts'}}
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
@endif
|
@endif
|
||||||
@if($reports->count())
|
@if($reports->count())
|
||||||
<div class="col-12 col-md-8 offset-md-2">
|
<div class="col-12 col-md-8 offset-md-2">
|
||||||
|
|
Loading…
Reference in a new issue