pixelfed/resources/views/admin/reports/home.blade.php

94 lines
3.7 KiB
PHP
Raw Normal View History

2019-01-31 21:24:20 +00:00
@extends('admin.partial.template-full')
2018-08-24 00:58:41 +00:00
@section('section')
2020-01-23 02:49:59 +00:00
<div class="title mb-3">
2019-01-31 21:24:20 +00:00
<h3 class="font-weight-bold d-inline-block">Reports</h3>
<span class="float-right">
2020-01-23 02:49:59 +00:00
<a class="btn btn-{{request()->input('filter')=='all'||request()->input('filter')==null?'primary':'light'}} btn-sm font-weight-bold" href="{{route('admin.reports')}}">
ALL
2019-01-31 21:24:20 +00:00
</a>
2020-01-23 02:49:59 +00:00
<a class="btn btn-{{request()->input('filter')=='open'?'primary':'light'}} btn-sm font-weight-bold" href="{{route('admin.reports',['filter'=>'open', 'page' => request()->input('page') ?? 1])}}">
OPEN
</a>
<a class="btn btn-{{request()->input('filter')=='closed'?'primary':'light'}} btn-sm mr-3 font-weight-bold" href="{{route('admin.reports',['filter'=>'closed', 'page' => request()->input('page') ?? 1])}}">
CLOSED
2019-01-31 21:24:20 +00:00
</a>
</span>
</div>
2020-01-23 02:49:59 +00:00
@if($reports->count())
<div class="card shadow-none border">
<div class="list-group list-group-flush">
@foreach($reports as $report)
<div class="list-group-item {{$report->admin_seen ? 'bg-light' : 'bg-white'}}">
<div class="p-4">
<div class="media d-flex align-items-center">
<div class="mr-3 border rounded d-flex justify-content-center align-items-center media-avatar">
<span class="text-lighter lead"><i class="fas fa-camera"></i></span>
</div>
<div class="media-body">
<p class="mb-1 small"><span class="font-weight-bold text-uppercase">{{$report->type}}</span></p>
@if($report->reporter && $report->status)
<p class="mb-0 lead"><a class="font-weight-bold text-dark" href="{{$report->reporter->url()}}">{{$report->reporter->username}}</a> reported this <a href="{{$report->status->url()}}" class="font-weight-bold text-dark">post</a></p>
@else
<p class="mb-0 lead">
@if(!$report->reporter)
<span class="font-weight-bold text-dark">Deleted user</span>
@else
<a class="font-weight-bold text-dark" href="{{$report->reporter->url()}}">{{$report->reporter->username}}</a>
@endif
reported this
@if(!$report->status)
<span class="font-weight-bold text-muted">deleted post</span>
@else
<a href="{{$report->status->url()}}" class="font-weight-bold text-dark">post</a>
@endif
2018-08-24 00:58:41 +00:00
2020-01-23 02:49:59 +00:00
</p>
2018-08-24 00:58:41 +00:00
2020-01-23 02:49:59 +00:00
@endif
2018-09-02 03:50:54 +00:00
</div>
2020-01-23 02:49:59 +00:00
<div class="float-right">
{{-- @if($report->admin_seen == null)
<a class="btn btn-outline-primary btn-sm font-weight-bold py-1 px-2 mr-2" href="{{$report->url()}}/action"><i class="fas fa-check"></i></a>
@endif
<a class="btn btn-outline-primary btn-sm font-weight-bold py-1 px-2 mr-2" href="{{$report->url()}}/action"><i class="fas fa-cog"></i></a> --}}
@if($report->status)
<a class="btn btn-primary btn-sm font-weight-bold py-1 px-3" href="{{$report->url()}}">VIEW</a>
2019-02-11 00:12:02 +00:00
@endif
2020-01-23 02:49:59 +00:00
</div>
2019-02-11 00:12:02 +00:00
</div>
</div>
</div>
2020-01-23 02:49:59 +00:00
@endforeach
</div>
</div>
@else
<div class="card shadow-none border">
<div class="card-body">
<p class="mb-0 p-5 text-center font-weight-bold lead">No reports found</p>
</div>
2019-02-11 00:12:02 +00:00
</div>
2020-01-23 02:49:59 +00:00
@endif
2018-08-24 00:58:41 +00:00
<div class="d-flex justify-content-center mt-5 small">
2019-02-11 00:12:02 +00:00
{{$reports->appends(['layout'=>request()->layout, 'filter' => request()->filter])->links()}}
2018-08-24 00:58:41 +00:00
</div>
@endsection
2018-09-02 03:50:54 +00:00
@push('styles')
<style type="text/css">
.custom-control-label:after, .custom-control-label:before {
top: auto;
bottom: auto;
}
2020-01-23 02:49:59 +00:00
.media-avatar {
width:64px;
height:64px;
background:#e9ecef;
}
2018-09-02 03:50:54 +00:00
</style>
@endpush
2018-08-24 00:58:41 +00:00
@push('scripts')
2018-09-02 03:50:54 +00:00
2018-08-24 00:58:41 +00:00
@endpush