@extends('layouts.app') @section('template_title') {!! trans('usersmanagement.showing-all-users') !!} @endsection @section('template_linked_css') @if(config('usersmanagement.enabledDatatablesJs')) @endif @endsection @section('content')
{!! trans('usersmanagement.showing-all-users') !!}
@if(config('usersmanagement.enableSearchUsers')) @include('partials.search-users-form') @endif
@foreach($users as $user) @endforeach @if(config('usersmanagement.enableSearchUsers')) @endif
{{ trans_choice('usersmanagement.users-table.caption', 1, ['userscount' => $users->count()]) }}
{!! trans('usersmanagement.users-table.id') !!} {!! trans('usersmanagement.users-table.name') !!} {!! trans('usersmanagement.users-table.role') !!} {!! trans('usersmanagement.users-table.actions') !!}
{{$user->id}} {{$user->name}} @foreach ($user->roles as $user_role) @if ($user_role->name == 'User') @php $badgeClass = 'primary' @endphp @elseif ($user_role->name == 'Admin') @php $badgeClass = 'warning' @endphp @elseif ($user_role->name == 'Unverified') @php $badgeClass = 'danger' @endphp @else @php $badgeClass = 'default' @endphp @endif {{ $user_role->name }} @endforeach {!! Form::open(array('url' => 'users/' . $user->id, 'class' => '', 'data-toggle' => 'tooltip', 'title' => 'Delete')) !!} {!! Form::hidden('_method', 'DELETE') !!} {!! Form::button(trans('usersmanagement.buttons.delete'), array('class' => 'btn btn-danger btn-sm','type' => 'button', 'style' =>'width: 100%;' ,'data-toggle' => 'modal', 'data-target' => '#confirmDelete', 'data-title' => 'Delete User', 'data-message' => 'Are you sure you want to delete this user ?')) !!} {!! Form::close() !!} {!! trans('usersmanagement.buttons.show') !!} {!! trans('usersmanagement.buttons.edit') !!}
@if(config('usersmanagement.enablePagination')) {{ $users->links() }} @endif
@include('modals.modal-delete') @endsection @section('footer_scripts') @if ((count($users) > config('usersmanagement.datatablesJsStartCount')) && config('usersmanagement.enabledDatatablesJs')) @include('scripts.datatables') @endif @include('scripts.delete-modal-script') @include('scripts.save-modal-script') @if(config('usersmanagement.tooltipsEnabled')) @include('scripts.tooltips') @endif @if(config('usersmanagement.enableSearchUsers')) @include('scripts.search-users') @endif @endsection