minor fixes
This commit is contained in:
@@ -38,56 +38,58 @@
|
||||
<div class="clearfix"></div>
|
||||
<div class="dataTables_wrapper dt-bootstrap4">
|
||||
@include('backend.layouts.partials.messages')
|
||||
<table id="dataTable"
|
||||
class="table table-bordered table-striped table-head-fixed dataTable dtr-inline"
|
||||
style="width:100%">
|
||||
<thead class="bg-light text-capitalize">
|
||||
<tr>
|
||||
<th width="5%">{{ __('Sl') }}</th>
|
||||
<th width="10%">{{ __('Role Name') }}</th>
|
||||
<th width="30%">{{ __('Permission List') }}</th>
|
||||
<th width="10%">{{ __('Action') }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach ($roles as $role)
|
||||
<div class="table-responsive">
|
||||
<table id="dataTable"
|
||||
class="table table-bordered table-striped table-head-fixed dataTable dtr-inline"
|
||||
style="width:100%">
|
||||
<thead class="bg-light text-capitalize">
|
||||
<tr>
|
||||
<td>{{ $loop->index + 1 }}</td>
|
||||
<td>{{ $role->name }}</td>
|
||||
<td>
|
||||
@foreach ($role->permissions as $permission)
|
||||
<span class="badge badge-info mr-1">
|
||||
{{ $permission->name }}
|
||||
</span>
|
||||
@endforeach
|
||||
</td>
|
||||
<td>
|
||||
@if (auth()->user()->can('admin.edit'))
|
||||
<a class="btn btn-success btn-sm text-white"
|
||||
href="{{ route('admin.roles.edit', $role->id) }}">Edit</a>
|
||||
@endif
|
||||
@if (auth()->user()->can('admin.delete'))
|
||||
<a class="btn btn-danger text-white btn-sm" href="javascript:void(0);"
|
||||
onclick="event.preventDefault(); if(confirm('Are you sure you want to delete?')) { document.getElementById('delete-form-{{ $role->id }}').submit(); }">
|
||||
{{ __('Delete') }}
|
||||
</a>
|
||||
|
||||
<form id="delete-form-{{ $role->id }}"
|
||||
action="{{ route('admin.roles.destroy', $role->id) }}"
|
||||
method="POST" style="display: none;">
|
||||
@method('DELETE')
|
||||
@csrf
|
||||
</form>
|
||||
@endif
|
||||
<a class="btn btn-primary btn-sm text-white"
|
||||
href="{{ route('auth.menurole.index', $role->id) }}">Assign
|
||||
Menus</a>
|
||||
|
||||
</td>
|
||||
<th width="5%">{{ __('Sl') }}</th>
|
||||
<th width="10%">{{ __('Role Name') }}</th>
|
||||
<th width="30%">{{ __('Permission List') }}</th>
|
||||
<th width="10%">{{ __('Action') }}</th>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach ($roles as $role)
|
||||
<tr>
|
||||
<td>{{ $loop->index + 1 }}</td>
|
||||
<td>{{ $role->name }}</td>
|
||||
<td>
|
||||
@foreach ($role->permissions as $permission)
|
||||
<span class="badge badge-info mr-1">
|
||||
{{ $permission->name }}
|
||||
</span>
|
||||
@endforeach
|
||||
</td>
|
||||
<td>
|
||||
@if (auth()->user()->can('admin.edit'))
|
||||
<a class="btn btn-success btn-sm text-white"
|
||||
href="{{ route('admin.roles.edit', $role->id) }}">Edit</a>
|
||||
@endif
|
||||
@if (auth()->user()->can('admin.delete'))
|
||||
<a class="btn btn-danger text-white btn-sm" href="javascript:void(0);"
|
||||
onclick="event.preventDefault(); if(confirm('Are you sure you want to delete?')) { document.getElementById('delete-form-{{ $role->id }}').submit(); }">
|
||||
{{ __('Delete') }}
|
||||
</a>
|
||||
|
||||
<form id="delete-form-{{ $role->id }}"
|
||||
action="{{ route('admin.roles.destroy', $role->id) }}"
|
||||
method="POST" style="display: none;">
|
||||
@method('DELETE')
|
||||
@csrf
|
||||
</form>
|
||||
@endif
|
||||
<a class="btn btn-primary btn-sm text-white"
|
||||
href="{{ route('auth.menurole.index', $role->id) }}">Assign
|
||||
Menus</a>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -103,7 +105,7 @@
|
||||
$(document).ready(function () {
|
||||
if ($('#dataTable').length) {
|
||||
$('#dataTable').DataTable({
|
||||
responsive: true,
|
||||
responsive: false,
|
||||
dom: 'Bfrtip',
|
||||
buttons: [
|
||||
'excel', 'pdf', 'print'
|
||||
|
||||
Reference in New Issue
Block a user