?
@extends('layoutsdashboard.dashboard-design',[
'webtitle'=> 'Manage Widget'
])
@section('content')
<div class="section-userdata">
<div class="container py-2">
<div class="card shadow mt-4">
<div class="card-header card-title bg-transparent d-flex justify-content-between">
<h4 class="mb-2 ">Widget Manager</h4>
</div>
<div class="table-responsive border-0">
<table class="table table-dark-gray align-middle p-4 mb-0 table-hover">
<!-- Table head -->
<thead>
<tr>
<th scope="col" class="rounded-start" width="5%">Id</th>
<th scope="col" width="20%" class="">Type</th>
<th scope="col" class="" width="50%">Title</th>
<th scope="col" class="rounded-end" width="20%">Action</th>
</tr>
</thead>
<tbody>
{{-- @php
echo ($data)
@endphp --}}
@foreach($data as $widget)
<tr>
<td>{{$loop->iteration}}
</td>
<td class="text-center text-sm-start">
<div class="d-flex align-items-center position-relative">
<div class="mb-0 ms-3">
<h6 class="mb-0"><a href="#" class="name-link">{{$widget['type']}}</a></h6>
</div>
</div>
</td>
<td> {{$widget['title']}}
<div class="mb-0 ms-3">
</div>
</td>
<td width='20%'>
@if(!empty($widget['help']))
<i class="bi bi-info-circle-fill" data-bs-toggle="tooltip" title="{{$widget['help']}}"></i>
@endif
{{-- {{$widget['DoNotEdit'] }} --}}
@if(($widget['DoNotEdit'] == 1))
<a href="{{url('')}}/widget/{{$widget['id']}}" class="btn btn-light btn-round me-1 mb-1 mb-md-0" data-bs-toggle="tooltip"title="Blocks">
<i class="bi bi bi-pencil-square"></i>
</a>
@endif
</td>
</tr>
@endforeach
</tbody>
</table>
</div>
</div>
</div>
</div>
@if($data->isNotEmpty())
<div class='container'>
<div class="d-flex justify-content-center">
{{$data->links() }}
</div>
</div>
@endif
<script>
var tooltipTriggerList = [].slice.call(document.querySelectorAll('[data-bs-toggle="tooltip"]'))
var tooltipList = tooltipTriggerList.map(function (tooltipTriggerEl) {
return new bootstrap.Tooltip(tooltipTriggerEl)
})
</script>
@stop