Lot's of bug fixes
This commit is contained in:
parent
ad320963fc
commit
7718ed6c32
196 changed files with 51167 additions and 3010 deletions
|
@ -2,71 +2,11 @@
|
|||
|
||||
@section('page', 'User Manager')
|
||||
|
||||
@section('navigation')
|
||||
<li class="treeview">
|
||||
<a>
|
||||
<i class="fas fa-user"></i> <span>Account</span>
|
||||
<span class="pull-right-container"><i class="fa fa-angle-left pull-right"></i></span>
|
||||
</a>
|
||||
<ul class="treeview-menu">
|
||||
<li><a href="{{ route('panel.profile') }}"><i class="fas fa-id-badge"></i> Profile</a></li>
|
||||
<li><a href="{{ route('panel.change') }}"><i class="fas fa-clipboard"></i> Change</a></li>
|
||||
<li class="hidden-xs"><a href="{{ route('panel.security') }}"><i class="fas fa-lock"></i> Security</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="header">NAVIGATION</li>
|
||||
<li>
|
||||
<a href="{{ route('panel.home') }}"><i class="fas fa-tachometer-alt"></i> <span>Dashboard</span></a>
|
||||
</li>
|
||||
@canany(['project_see', 'status_see'])
|
||||
<li class="treeview">
|
||||
<a>
|
||||
<i class="fas fa-list"></i> <span>Projects</span>
|
||||
<span class="pull-right-container"><i class="fa fa-angle-left pull-right"></i></span>
|
||||
</a>
|
||||
<ul class="treeview-menu">
|
||||
@can('project_see')<li><a href="{{ route('panel.project') }}"><i class="fas fa-clipboard"></i> Project</a></li>@endcan
|
||||
@can('order_see')<li><a href="{{ route('panel.order') }}"><i class="fas fa-file-invoice"></i> Order</a></li>@endcan
|
||||
@can('status_see')<li><a href="{{ route('panel.status') }}"><i class="fas fa-clipboard"></i> Status</a></li>@endcan
|
||||
</ul>
|
||||
</li>
|
||||
@endcanany
|
||||
<li class="active treeview menu-open">
|
||||
<a>
|
||||
<i class="fas fa-user"></i> <span>Management</span>
|
||||
<span class="pull-right-container"><i class="fa fa-angle-left pull-right"></i></span>
|
||||
</a>
|
||||
<ul class="treeview-menu">
|
||||
<li class="active"><a><i class="fas fa-id-badge"></i> Users</a></li>
|
||||
@can('roles_see')<li><a href="{{ route('panel.role') }}"><i class="fas fa-lock"></i> Roles</a></li>@endcan
|
||||
</ul>
|
||||
</li>
|
||||
@endsection
|
||||
|
||||
@section('content')
|
||||
<div class="col-lg-8 col-lg-offset-2">
|
||||
<div class="box box-primary">
|
||||
<div class="box-header">
|
||||
<h3 class="box-title">Search</h3>
|
||||
</div>
|
||||
<div class="box-body">
|
||||
<form id="searchForm">
|
||||
<div class="input-group">
|
||||
<span class="input-group-addon"><i class="glyphicon glyphicon-tag"></i></span>
|
||||
<input id="search" type="text" class="form-control" name="search" value="{{ $search }}" placeholder="Search for User by name" autofocus>
|
||||
</div>
|
||||
|
||||
<button class="btn btn-block btn-primary">{{ __('Search') }}</button>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-lg-8 col-lg-offset-2">
|
||||
<div class="box box-primary">
|
||||
<div class="box-header">
|
||||
<h3 class="box-title" style="margin-top: 8px">Users</h3>
|
||||
@can('user_edit') <small style="float: right"><a class="btn btn-primary" href="{{ route('panel.ums.add') }}">Add</a></small> @endcan
|
||||
</div>
|
||||
<div class="box-body">
|
||||
@if(session('success'))
|
||||
|
@ -82,35 +22,30 @@
|
|||
</div>
|
||||
|
||||
@endif
|
||||
|
||||
<table class="table table-bordered table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Full Name</th>
|
||||
<th>Role</th>
|
||||
<th class="hidden-xs hidden-sm hidden-md">Last Active</th>
|
||||
<th>#</th>
|
||||
<th style="width: 30px"></th>
|
||||
<th>UUID</th>
|
||||
<th class="text-center">Role</th>
|
||||
<th class="text-center">Verified</th>
|
||||
<th class="hidden-xs hidden-sm hidden-md text-center">Last Active</th>
|
||||
<th class="text-center" style="width: 155px">Action</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@if(count($users) > 0)
|
||||
@foreach($users as $user)
|
||||
<tr>
|
||||
@php($role = $user->getHighestRole())
|
||||
<td>{{ $user->fullname() }}</td>
|
||||
<td><small><span class="role" style="background-color: {{ $role->color }}">{{ $role->readable_name }}</span></small></td>
|
||||
<td class="hidden-xs hidden-sm hidden-md">@if(!empty($user->last_active)) {{ date('H:i:s d-m-Y', $user->id === Auth::id() ? time() : strtotime($user->last_active)) }} @else {{ __('No Activity') }} @endif</td>
|
||||
<td style="width: 155px"><a class="btn btn-primary" style="margin-left: 4px" href="{{ route('panel.ums.info', ['id' => $user->id]) }}"><i class="glyphicon glyphicon-info-sign"></i></a> @can('user_edit') <a class="btn btn-primary" style="margin-left: 4px" href="{{ route('panel.ums.edit', ['id' => $user->id]) }}"><i class="glyphicon glyphicon-pencil"></i></a><a class="btn btn-primary" style="margin-left: 4px" href="{{ route('panel.ums.delete', ['id' => $user->id]) }}"><i class="glyphicon glyphicon-trash"></i></a> @endcan </td>
|
||||
<td>{{ $user->id }}</td>
|
||||
<td style="width: 30px"><img src="{{ $user->photo() }}" style="width: 25px; height: 25px; border-radius: 3px"></td>
|
||||
<td>{{ $user->fixedUUID() }}</td>
|
||||
<td class="text-center"><span class="text-center bg-green-gradient" style="padding: 8px 15px 8px 15px; border-radius: 3px; color: #fff">{{ ($user->is_root ? 'Root' : ($user->is_admin ? 'Admin' : 'Normal')) }}</span></td>
|
||||
<td class="text-center">{!! $user->email_verified_at != null ? '<i class="fas fa-check yes"></i>' : '<i class="fas fa-times no"></i>' !!}</td>
|
||||
<td class="hidden-xs hidden-sm hidden-md text-center">@if(!empty($user->last_active)) {{ date('H:i:s d-m-Y', $user->id === Auth::id() ? time() : strtotime($user->last_active)) }} @else {{ __('No Activity') }} @endif</td>
|
||||
<td style="width: 155px"><a class="btn btn-primary" href="{{ route('panel.ums.info', ['id' => $user->id]) }}"><i class="glyphicon glyphicon-info-sign"></i></a> <a class="btn btn-primary" style="margin-left: 2px" href="{{ route('panel.ums.edit', ['id' => $user->id]) }}"><i class="glyphicon glyphicon-pencil"></i></a> @if(Auth::user()->is_root) <a class="btn btn-primary" style="margin-left: 2px" href="{{ route('panel.ums.delete', ['id' => $user->id]) }}"><i class="glyphicon glyphicon-trash"></i></a> @endif </td>
|
||||
</tr>
|
||||
@endforeach
|
||||
@else
|
||||
<tr>
|
||||
<td>No Users Found</td>
|
||||
<td></td>
|
||||
<td class="hidden-xs hidden-sm hidden-md"></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
@endif
|
||||
</tbody>
|
||||
</table>
|
||||
<nav style="float: right">
|
||||
|
@ -132,18 +67,3 @@
|
|||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
|
||||
@section('javascript')
|
||||
<script>
|
||||
const search = "{{ $search }}";
|
||||
const route = "{{ route('panel.ums', ['page' => 1]) }}";
|
||||
$("form#searchForm").submit(function(e) {
|
||||
e.preventDefault();
|
||||
let term = $("form#searchForm input#search").val();
|
||||
if(term === search)
|
||||
return;
|
||||
|
||||
window.location.replace(route + "/" + term);
|
||||
});
|
||||
</script>
|
||||
@endsection
|
||||
|
|
Reference in a new issue