You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

80 lines
4.0 KiB

<x-app-layout>
<x-slot name="header">
<h2 class="font-semibold text-xl text-gray-800 leading-tight">
{{ __('lang.user_management') }}
</h2>
</x-slot>
<div class="py-12">
<div class="max-w-7xl mx-auto sm:px-6 lg:px-8">
<div class="bg-white overflow-hidden shadow-sm sm:rounded-lg">
<div class="p-6 bg-white border-b border-gray-200">
<div class="row">
<div class="col-md-5">
{{-- <h3 class="modal-title">{{ $result->total() }} {{ str_plural('User', $result->count()) }} </h3> --}}
<h3 class="modal-title">{{ $result->total() }} {{ __('lang.users') }} </h3>
</div>
<div class="col-md-7 page-action text-right">
<div class="search-form float-right ml-3">
<form class="input-group " action="{{ route('users.index') }}" method="get">
<div class="form-outline">
<input type="search" id="form1" class="form-control" placeholder="Email" name='email'/>
<!-- <label class="form-label" for="form1">Search</label> -->
</div>
<button type="submit" class="btn btn-info btn-sm">{{ __('lang.search') }}</button>
</form>
</div>
@can('add_users')
<a href="{{ route('users.create') }}" class="btn btn-primary"> <i class="glyphicon glyphicon-plus-sign"></i> <h3>{{ __('lang.create') }}</h3></a>
@endcan
</div>
</div>
<div class="result-set">
<table class="table table-bordered table-striped table-hover" id="data-table">
<thead>
<tr>
<th>ID</th>
<th>{{ __('lang.name') }}</th>
<th>Email</th>
<th>{{ __('lang.organization') }}</th>
<th>{{ __('lang.roles') }}</th>
<th>{{ __("lang.created_at") }}</th>
@can('edit_users', 'delete_users')
<th class="text-center">{{ __('lang.action') }}</th>
@endcan
</tr>
</thead>
<tbody>
@foreach($result as $item)
<tr>
<td>{{ $item->id }}</td>
<td>{{ $item->name }}</td>
<td>{{ $item->email }}</td>
<td>{{ $item->organization_name }}</td>
<td>{{ $item->roles->implode('name', ', ') }}</td>
<td>{{ $item->created_at->toFormattedDateString() }}</td>
@can('edit_users')
<td class="text-center">
@include('shared._actions', [
'entity' => 'users',
'id' => $item->id
])
</td>
@endcan
</tr>
@endforeach
</tbody>
</table>
<div class="text-center">
{{ $result->links() }}
</div>
</div>
</div>
</div>
</div>
</div>
</x-app-layout>