2019-12-01 00:22:33 +01:00
|
|
|
@extends('layouts.adminpanel')
|
|
|
|
|
2019-12-06 22:34:25 +01:00
|
|
|
@section('title') Panel admina - Prowadzący @endsection
|
2019-12-01 00:22:33 +01:00
|
|
|
|
|
|
|
@section('admin_content')
|
2019-12-01 19:31:49 +01:00
|
|
|
<div class="row justify-content-center">
|
|
|
|
<div class="col-md-12">
|
|
|
|
@if ($users->count() > 0)
|
2019-12-06 22:34:25 +01:00
|
|
|
<h5> Wszyscy prowadzący: ({{ $users->count() }}) </h5>
|
2019-12-01 19:31:49 +01:00
|
|
|
<table class="table table-striped">
|
|
|
|
<tr class="thead-dark">
|
|
|
|
<th>ID</th>
|
2019-12-06 22:34:25 +01:00
|
|
|
<th> Imię </th>
|
|
|
|
<th> Nazwisko </th>
|
2019-12-01 19:31:49 +01:00
|
|
|
<th> Email </th>
|
2019-12-06 22:34:25 +01:00
|
|
|
<th> Admin? </th>
|
2019-12-01 19:31:49 +01:00
|
|
|
<th></th>
|
|
|
|
<th></th>
|
|
|
|
</tr>
|
|
|
|
@foreach ($users as $user)
|
2019-12-01 00:22:33 +01:00
|
|
|
<tr>
|
2019-12-01 19:31:49 +01:00
|
|
|
<td> {{ $user->id }}</td>
|
|
|
|
<td> {{ $user->name }} </td>
|
|
|
|
<td> {{ $user->surname }} </td>
|
|
|
|
<td> {{ $user->email }} </td>
|
|
|
|
<td> {{ $user->is_Admin }} </td>
|
|
|
|
@if (!$user->is_Admin)
|
|
|
|
<td>
|
2019-12-06 22:34:25 +01:00
|
|
|
<a href="{{ route('admin_delete_user', [$user->id]) }}" name="delete-user-btn" class="btn btn-danger"> Usuń </a>
|
2019-12-01 19:31:49 +01:00
|
|
|
</td>
|
|
|
|
<td>
|
2019-12-06 22:34:25 +01:00
|
|
|
<a href="{{ route('admin_edit_user', [$user->id]) }}" name="edit-user-btn" class="btn btn-secondary"> Edytuj </a>
|
2019-12-01 19:31:49 +01:00
|
|
|
</td>
|
|
|
|
@endif
|
2019-12-01 00:22:33 +01:00
|
|
|
</tr>
|
2019-12-01 19:31:49 +01:00
|
|
|
@endforeach
|
|
|
|
</table>
|
|
|
|
@else
|
2019-12-06 22:34:25 +01:00
|
|
|
<p> Brak prowadzących. </p>
|
2019-12-01 19:31:49 +01:00
|
|
|
@endif
|
2019-12-01 00:22:33 +01:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
@endsection
|