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') @section('section')
<div class="title font-weight-bold"> <div class="title">
<h3 class="font-weight-bold">Reports</h3> <h3 class="font-weight-bold d-inline-block">Reports</h3>
<p> <span class="float-right">
<span class="pr-3"> <a class="btn btn-{{request()->input('layout')!=='list'?'primary':'light'}} btn-sm" href="{{route('admin.reports')}}">
<span>Open:</span> <i class="fas fa-th"></i>
<span class="text-danger">{{App\Report::whereNull('admin_seen')->count()}}</span> </a>
</span> <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])}}">
<span class=""> <i class="fas fa-list"></i>
<span>Closed:</span> </a>
<span class="text-success">{{App\Report::whereNotNull('admin_seen')->count()}}</span> <div class="dropdown d-inline-block">
</span> <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">
</p> <i class="fas fa-filter"></i>
</div> </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> <hr>
@ -61,9 +84,9 @@
<tbody> <tbody>
@foreach($reports as $report) @foreach($reports as $report)
<tr> <tr>
<td class="py-0"> <td class="">
<div class="custom-control custom-checkbox"> <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> <label class="custom-control-label" for="row-check-{{$report->id}}"></label>
</div> </div>
</td> </td>
@ -97,9 +120,6 @@
top: auto; top: auto;
bottom: auto; bottom: auto;
} }
.table-check .custom-control-label {
top: -11px;
}
</style> </style>
@endpush @endpush

View file

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