atcheck/resources/views/admin/admin_users.blade.php

44 lines
1.8 KiB
PHP
Raw Normal View History

@extends('layouts.adminpanel')
@section('title') Panel admina - Prowadzący @endsection
@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)
<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>
<th> Imię </th>
<th> Nazwisko </th>
2019-12-01 19:31:49 +01:00
<th> Email </th>
<th> Admin? </th>
2019-12-01 19:31:49 +01:00
<th></th>
<th></th>
</tr>
@foreach ($users as $user)
<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>
<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>
<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
</tr>
2019-12-01 19:31:49 +01:00
@endforeach
</table>
@else
<p> Brak prowadzących. </p>
2019-12-01 19:31:49 +01:00
@endif
</div>
</div>
@endsection