2021-04-16 01:00:00 +02:00
|
|
|
@extends('layouts.sidebar')
|
|
|
|
|
|
|
|
@section('content')
|
|
|
|
|
2022-07-11 21:11:49 +02:00
|
|
|
<style>.delete{color:#fff; background-color:tomato; border-radius:5px; padding:8px 12px; cursor: pointer;}.delete:hover{color:#fff;background-color:#f13d1d;} @media(max-width: 1450px){.hide-mobile-del{display:none;}}</style>
|
2022-07-11 16:52:28 +02:00
|
|
|
|
2021-04-16 01:00:00 +02:00
|
|
|
<h2 class="mb-4"><i class="bi bi-person"> Users</i></h2>
|
|
|
|
|
|
|
|
<form action="{{ route('searchUser') }}" method="post">
|
|
|
|
@csrf
|
|
|
|
<div class="form-group col-lg-8 mb-5">
|
|
|
|
<input type="text" name="name" placeholder="search user">
|
|
|
|
<button type="submit" class="btn-primary"><i class="bi bi-search"></i></button>
|
|
|
|
</div>
|
|
|
|
</form>
|
|
|
|
Users:
|
2022-02-27 19:33:19 +01:00
|
|
|
<a href="{{ url('') }}/panel/users/all">All</a> -
|
|
|
|
<a href="{{ url('') }}/panel/users/user">User</a> -
|
|
|
|
<a href="{{ url('') }}/panel/users/vip">Vip</a> -
|
|
|
|
<a href="{{ url('') }}/panel/users/admin">Admin</a>
|
2021-04-16 01:00:00 +02:00
|
|
|
|
|
|
|
<table class="table table-bordered">
|
|
|
|
<thead>
|
|
|
|
<tr>
|
2021-07-06 10:50:47 +02:00
|
|
|
<th scope="col">Name</th>
|
2022-07-12 16:10:49 +02:00
|
|
|
<th scope="col">E-Mail</th>
|
2021-07-06 10:50:47 +02:00
|
|
|
<th scope="col">Page</th>
|
2021-04-16 01:00:00 +02:00
|
|
|
<th scope="col">Role</th>
|
2021-07-06 10:50:47 +02:00
|
|
|
<th scope="col">Edit</th>
|
2022-05-30 15:11:01 +02:00
|
|
|
<th scope="col">Links</th>
|
2022-07-11 16:52:28 +02:00
|
|
|
@if(env('REGISTER_AUTH') !== 'auth')<th style="width:15%" scope="col">E-Mail Verified</th>@endif
|
2021-04-16 01:00:00 +02:00
|
|
|
<th scope="col">Block</th>
|
2022-07-11 16:52:28 +02:00
|
|
|
<th scope="col">Delete user</th>
|
2021-04-16 01:00:00 +02:00
|
|
|
</tr>
|
|
|
|
</thead>
|
|
|
|
<tbody>
|
|
|
|
@foreach($users as $user)
|
|
|
|
<tr>
|
2021-07-06 10:50:47 +02:00
|
|
|
<td> {{ $user->name }} </td>
|
2022-07-12 16:10:49 +02:00
|
|
|
<td> {{ $user->email }} </td>
|
2022-02-27 19:33:19 +01:00
|
|
|
<td><a href="{{ url('') }}/@<?= $user->littlelink_name ?>" target="_blank" class="text-info"><i class="bi bi-box-arrow-up-right"></i> {{ $user->littlelink_name }} </a></td>
|
2021-04-16 01:00:00 +02:00
|
|
|
<td>{{ $user->role }}</td>
|
2021-07-06 10:50:47 +02:00
|
|
|
<td><a href="{{ route('editUser', $user->id ) }}">Edit</a></td>
|
2022-05-30 15:18:17 +02:00
|
|
|
<td><a href="{{ route('showLinksUser', $user->id ) }}" class="text-primary">View</a></td>
|
2022-07-11 18:00:22 +02:00
|
|
|
@if(env('REGISTER_AUTH') !== 'auth')
|
|
|
|
<td>@if($user->find($user->id)->role == 'admin' and $user->email_verified_at != '')yes @else
|
|
|
|
<a href="{{ route('verifyUser', ['verify' => '-' . $user->email_verified_at, 'id' => $user->id] ) }}" class="text-danger">@if($user->email_verified_at == '')<span>no</span>@else<span style="color:#228B22">yes</span></a>@endif</td>
|
|
|
|
@endif
|
|
|
|
@endif
|
|
|
|
<td>@if($user->find($user->id)->role == 'admin')-@else<a href="{{ route('blockUser', ['block' => $user->block, 'id' => $user->id] ) }}" class="text-danger">{{ $user->block }}</a>@endif</td>
|
|
|
|
<td>@if($user->find($user->id)->role == 'admin')<center>-</center>@else<center><a href="{{ route('deleteUser', ['id' => $user->id] ) }}" class="confirmation delete"><i class="bi bi-trash-fill del-icon"></i><span class="hide-mobile-del"> Delete</span></a></center>@endif</td>
|
2022-07-11 17:21:19 +02:00
|
|
|
</tr>
|
|
|
|
@endforeach
|
|
|
|
</tbody>
|
|
|
|
</table>
|
|
|
|
<a href="{{ url('') }}/panel/new-user">+ Add new user</a>
|
|
|
|
|
2022-07-11 16:25:26 +02:00
|
|
|
<script type="text/javascript">
|
|
|
|
var elems = document.getElementsByClassName('confirmation');
|
|
|
|
var confirmIt = function (e) {
|
|
|
|
if (!confirm('Are you sure you want to delete this user? \nThis action cannot be undone!')) e.preventDefault();
|
|
|
|
};
|
|
|
|
for (var i = 0, l = elems.length; i < l; i++) {
|
|
|
|
elems[i].addEventListener('click', confirmIt, false);
|
|
|
|
}
|
|
|
|
</script>
|
2021-04-16 01:00:00 +02:00
|
|
|
|
|
|
|
@endsection
|