Update admin views

This commit is contained in:
Daniel Supernault 2019-01-31 14:24:20 -07:00
parent 8cb93074ad
commit 79aa88ada5
No known key found for this signature in database
GPG key ID: 0DEF1C662C9033F7
2 changed files with 40 additions and 20 deletions

View file

@ -1,19 +1,42 @@
@extends('admin.partial.template')
@extends('admin.partial.template-full')
@section('section')
<div class="title font-weight-bold">
<h3 class="font-weight-bold">Reports</h3>
<p>
<span class="pr-3">
<span>Open:</span>
<span class="text-danger">{{App\Report::whereNull('admin_seen')->count()}}</span>
</span>
<span class="">
<span>Closed:</span>
<span class="text-success">{{App\Report::whereNotNull('admin_seen')->count()}}</span>
</span>
</p>
<div class="title">
<h3 class="font-weight-bold d-inline-block">Reports</h3>
<span class="float-right">
<a class="btn btn-{{request()->input('layout')!=='list'?'primary':'light'}} btn-sm" href="{{route('admin.reports')}}">
<i class="fas fa-th"></i>
</a>
<a class="btn btn-{{request()->input('layout')=='list'?'primary':'light'}} btn-sm mr-3" href="{{route('admin.reports',['layout'=>'list', 'page' => request()->input('page') ?? 1])}}">
<i class="fas fa-list"></i>
</a>
<div class="dropdown d-inline-block">
<button class="btn btn-light btn-sm dropdown-toggle font-weight-bold" type="button" id="filterDropdown" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
<i class="fas fa-filter"></i>
</button>
<div class="dropdown-menu dropdown-menu-right" aria-labelledby="filterDropdown" style="width: 300px;">
<div class="dropdown-item">
<form>
<input type="hidden" name="layout" value="{{request()->input('layout')}}"></input>
<input type="hidden" name="page" value="{{request()->input('page')}}"></input>
<div class="input-group input-group-sm">
<input class="form-control" name="search" placeholder="Filter by username, mime type" autocomplete="off"></input>
<div class="input-group-append">
<button class="btn btn-outline-primary" type="submit">Filter</button>
</div>
</div>
</form>
</div>
<div class="dropdown-divider"></div>
<div class="dropdown-divider"></div>
<a class="dropdown-item font-weight-light" href="?filter=open&layout={{request()->input('layout')}}">Open Reports Only</a>
<a class="dropdown-item font-weight-light" href="?filter=closed&layout={{request()->input('layout')}}">Closed Reports Only</a>
<div class="dropdown-divider"></div>
<a class="dropdown-item font-weight-light" href="?layout={{request()->input('layout')}}">Show all</a>
</div>
</div>
</span>
</div>
<hr>
@ -61,9 +84,9 @@
<tbody>
@foreach($reports as $report)
<tr>
<td class="py-0">
<td class="">
<div class="custom-control custom-checkbox">
<input type="checkbox" class="custom-control-input row-check-item" id="row-check-{{$report->id}}" data-resolved="{{$report->admin_seen?'true':'false'}}" data-id="{{$report->id}}">
<input type="checkbox" class="custom-control-input" id="row-check-{{$report->id}}" data-resolved="{{$report->admin_seen?'true':'false'}}" data-id="{{$report->id}}">
<label class="custom-control-label" for="row-check-{{$report->id}}"></label>
</div>
</td>
@ -97,9 +120,6 @@
top: auto;
bottom: auto;
}
.table-check .custom-control-label {
top: -11px;
}
</style>
@endpush

View file

@ -1,4 +1,4 @@
@extends('admin.partial.template')
@extends('admin.partial.template-full')
@section('section')
<div class="title">