akaunting 3.0 (the last dance)
This commit is contained in:
1
resources/views/vendor/apexcharts/container.blade.php
vendored
Normal file
1
resources/views/vendor/apexcharts/container.blade.php
vendored
Normal file
@@ -0,0 +1 @@
|
||||
<div id="{!! $chart->getId() !!}"></div>
|
||||
7
resources/views/vendor/apexcharts/script.blade.php
vendored
Normal file
7
resources/views/vendor/apexcharts/script.blade.php
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
<script type="text/javascript"><!--
|
||||
var options = {!! json_encode($chart->getOptions()) !!};
|
||||
|
||||
var chart_{{ $chart->getId() }} = new ApexCharts(document.querySelector("#{!! $chart->getId() !!}"), options);
|
||||
|
||||
chart_{{ $chart->getId() }}.render();
|
||||
//--></script>
|
||||
@@ -1,51 +0,0 @@
|
||||
@if(!$model->customId)
|
||||
@include('charts::_partials.container.canvas2')
|
||||
@endif
|
||||
|
||||
@include('charts::_partials.helpers.hex2rgb')
|
||||
|
||||
@push('body_scripts')
|
||||
<script type="text/javascript">
|
||||
var ctx = document.getElementById("{{ $model->id }}");
|
||||
|
||||
var data = {
|
||||
labels: [
|
||||
@foreach ($model->labels as $label)
|
||||
"{!! $label !!}",
|
||||
@endforeach
|
||||
],
|
||||
datasets: [{
|
||||
fill: true,
|
||||
@if ($model->colors)
|
||||
backgroundColor: hex2rgba_convert("{{ $model->colors[0] }}", 50),
|
||||
@endif
|
||||
label: "{!! $model->element_label !!}",
|
||||
lineTension: 0.3,
|
||||
@if ($model->colors)
|
||||
borderColor: "{{ $model->colors[0] }}",
|
||||
@endif
|
||||
data: [
|
||||
@foreach ($model->values as $dta)
|
||||
{{ $dta }},
|
||||
@endforeach
|
||||
]
|
||||
}]
|
||||
};
|
||||
|
||||
var myLineChart = new Chart(ctx, {
|
||||
type: 'line',
|
||||
data: data,
|
||||
options: {
|
||||
responsive: {{ $model->responsive || !$model->width ? 'true' : 'false' }},
|
||||
maintainAspectRatio: false,
|
||||
@if ($model->title)
|
||||
title: {
|
||||
display: true,
|
||||
text: "{!! $model->title !!}",
|
||||
fontSize: 20
|
||||
}
|
||||
@endif
|
||||
}
|
||||
});
|
||||
</script>
|
||||
@endpush
|
||||
@@ -1,58 +0,0 @@
|
||||
@if(!$model->customId)
|
||||
@include('charts::_partials.container.canvas2')
|
||||
@endif
|
||||
|
||||
@push('body_scripts')
|
||||
<script type="text/javascript">
|
||||
var ctx = document.getElementById("{{ $model->id }}");
|
||||
|
||||
var myChart = new Chart(ctx, {
|
||||
type: 'bar',
|
||||
data: {
|
||||
labels: [
|
||||
@foreach ($model->labels as $label)
|
||||
"{!! $label !!}",
|
||||
@endforeach
|
||||
],
|
||||
datasets: [{
|
||||
label: "{!! $model->element_label !!}",
|
||||
backgroundColor: [
|
||||
@if ($model->colors)
|
||||
@foreach ($model->colors as $color)
|
||||
"{{ $color }}",
|
||||
@endforeach
|
||||
@else
|
||||
@foreach ($model->values as $dta)
|
||||
"{{ sprintf('#%06X', mt_rand(0, 0xFFFFFF)) }}",
|
||||
@endforeach
|
||||
@endif
|
||||
],
|
||||
data: [
|
||||
@foreach ($model->values as $dta)
|
||||
{{ $dta }},
|
||||
@endforeach
|
||||
]
|
||||
}]
|
||||
},
|
||||
options: {
|
||||
responsive: {{ $model->responsive || !$model->width ? 'true' : 'false' }},
|
||||
maintainAspectRatio: false,
|
||||
@if ($model->title)
|
||||
title: {
|
||||
display: true,
|
||||
text: "{!! $model->title !!}",
|
||||
fontSize: 20
|
||||
},
|
||||
@endif
|
||||
scales: {
|
||||
yAxes: [{
|
||||
display: true,
|
||||
ticks: {
|
||||
beginAtZero: true
|
||||
}
|
||||
}]
|
||||
}
|
||||
}
|
||||
});
|
||||
</script>
|
||||
@endpush
|
||||
@@ -1,74 +0,0 @@
|
||||
@if(!$model->customId)
|
||||
@include('charts::_partials.container.canvas2')
|
||||
@endif
|
||||
|
||||
@push('body_scripts')
|
||||
<script type="text/javascript">
|
||||
var ctx = document.getElementById("{{ $model->id }}");
|
||||
|
||||
var myChart = new Chart(ctx, {
|
||||
type: 'doughnut',
|
||||
data: {
|
||||
labels: [
|
||||
@foreach ($model->labels as $label)
|
||||
"{!! $label !!}",
|
||||
@endforeach
|
||||
],
|
||||
datasets: [{
|
||||
data: [
|
||||
@foreach ($model->values as $dta)
|
||||
{{ $dta }},
|
||||
@endforeach
|
||||
],
|
||||
backgroundColor: [
|
||||
@if ($model->colors)
|
||||
@foreach ($model->colors as $color)
|
||||
"{{ $color }}",
|
||||
@endforeach
|
||||
@else
|
||||
@foreach ($model->values as $dta)
|
||||
"{{ sprintf('#%06X', mt_rand(0, 0xFFFFFF)) }}",
|
||||
@endforeach
|
||||
@endif
|
||||
]
|
||||
}]
|
||||
},
|
||||
options: {
|
||||
responsive: {{ $model->responsive || !$model->width ? 'true' : 'false' }},
|
||||
maintainAspectRatio: false,
|
||||
legend: {
|
||||
display: true,
|
||||
fullWidth: true,
|
||||
position: 'right'
|
||||
},
|
||||
tooltips: {
|
||||
callbacks: {
|
||||
label: function(tooltipItem, data) {
|
||||
var allData = data.datasets[tooltipItem.datasetIndex].data;
|
||||
var tooltipLabel = data.labels[tooltipItem.index];
|
||||
var tooltipData = allData[tooltipItem.index];
|
||||
var total = 0;
|
||||
|
||||
var label = tooltipLabel.split(" - ");
|
||||
|
||||
for (var i in allData) {
|
||||
total += allData[i];
|
||||
}
|
||||
|
||||
var tooltipPercentage = Math.round((tooltipData / total) * 100);
|
||||
|
||||
return label[1] + ': ' + label[0] + ' (' + tooltipPercentage + '%)';
|
||||
}
|
||||
}
|
||||
},
|
||||
@if ($model->title)
|
||||
title: {
|
||||
display: true,
|
||||
text: "{!! $model->title !!}",
|
||||
fontSize: 20
|
||||
}
|
||||
@endif
|
||||
}
|
||||
});
|
||||
</script>
|
||||
@endpush
|
||||
@@ -1,47 +0,0 @@
|
||||
@if(!$model->customId)
|
||||
@include('charts::_partials.container.canvas2')
|
||||
@endif
|
||||
|
||||
@push('body_scripts')
|
||||
<script type="text/javascript">
|
||||
var ctx = document.getElementById("{{ $model->id }}");
|
||||
|
||||
var data = {
|
||||
labels: [
|
||||
@foreach ($model->labels as $label)
|
||||
"{!! $label !!}",
|
||||
@endforeach
|
||||
],
|
||||
datasets: [{
|
||||
fill: false,
|
||||
label: "{!! $model->element_label !!}",
|
||||
lineTension: 0.3,
|
||||
@if ($model->colors)
|
||||
borderColor: "{{ $model->colors[0] }}",
|
||||
backgroundColor: "{{ $model->colors[0] }}",
|
||||
@endif
|
||||
data: [
|
||||
@foreach ($model->values as $dta)
|
||||
{{ $dta }},
|
||||
@endforeach
|
||||
]
|
||||
}]
|
||||
};
|
||||
|
||||
var myLineChart = new Chart(ctx, {
|
||||
type: 'line',
|
||||
data: data,
|
||||
options: {
|
||||
responsive: {{ $model->responsive || !$model->width ? 'true' : 'false' }},
|
||||
maintainAspectRatio: false,
|
||||
@if ($model->title)
|
||||
title: {
|
||||
display: true,
|
||||
text: "{!! $model->title !!}",
|
||||
fontSize: 20
|
||||
}
|
||||
@endif
|
||||
}
|
||||
});
|
||||
</script>
|
||||
@endpush
|
||||
@@ -1,56 +0,0 @@
|
||||
@if(!$model->customId)
|
||||
@include('charts::_partials.container.canvas2')
|
||||
@endif
|
||||
|
||||
@include('charts::_partials.helpers.hex2rgb')
|
||||
|
||||
@push('body_scripts')
|
||||
<script type="text/javascript">
|
||||
var ctx = document.getElementById("{{ $model->id }}");
|
||||
|
||||
var data = {
|
||||
labels: [
|
||||
@foreach ($model->labels as $label)
|
||||
"{!! $label !!}",
|
||||
@endforeach
|
||||
],
|
||||
datasets: [
|
||||
@for ($i = 0; $i < count($model->datasets); $i++)
|
||||
{
|
||||
fill: true,
|
||||
label: "{!! $model->datasets[$i]['label'] !!}",
|
||||
lineTension: 0.3,
|
||||
@if ($model->colors and count($model->colors) > $i)
|
||||
@php $c = $model->colors[$i]; @endphp
|
||||
@else
|
||||
@php $c = sprintf('#%06X', mt_rand(0, 0xFFFFFF)); @endphp
|
||||
@endif
|
||||
borderColor: "{{ $c }}",
|
||||
backgroundColor: hex2rgba_convert("{{ $c }}", 50),
|
||||
data: [
|
||||
@foreach ($model->datasets[$i]['values'] as $dta)
|
||||
{{ $dta }},
|
||||
@endforeach
|
||||
]
|
||||
},
|
||||
@endfor
|
||||
]
|
||||
};
|
||||
|
||||
var myLineChart = new Chart(ctx, {
|
||||
type: 'line',
|
||||
data: data,
|
||||
options: {
|
||||
responsive: {{ $model->responsive || !$model->width ? 'true' : 'false' }},
|
||||
maintainAspectRatio: false,
|
||||
@if ($model->title)
|
||||
title: {
|
||||
display: true,
|
||||
text: "{!! $model->title !!}",
|
||||
fontSize: 20
|
||||
}
|
||||
@endif
|
||||
}
|
||||
});
|
||||
</script>
|
||||
@endpush
|
||||
@@ -1,61 +0,0 @@
|
||||
@if(!$model->customId)
|
||||
@include('charts::_partials.container.canvas2')
|
||||
@endif
|
||||
|
||||
@push('body_scripts')
|
||||
<script type="text/javascript">
|
||||
var ctx = document.getElementById("{{ $model->id }}");
|
||||
|
||||
var myChart = new Chart(ctx, {
|
||||
type: 'bar',
|
||||
data: {
|
||||
labels: [
|
||||
@foreach ($model->labels as $label)
|
||||
"{!! $label !!}",
|
||||
@endforeach
|
||||
],
|
||||
datasets: [
|
||||
@for ($i = 0; $i < count($model->datasets); $i++)
|
||||
{
|
||||
fill: true,
|
||||
label: "{!! $model->datasets[$i]['label'] !!}",
|
||||
lineTension: 0.3,
|
||||
@if ($model->colors and count($model->colors) > $i)
|
||||
borderColor: "{{ $model->colors[$i] }}",
|
||||
backgroundColor: "{{ $model->colors[$i] }}",
|
||||
@else
|
||||
@php $c = sprintf('#%06X', mt_rand(0, 0xFFFFFF)); @endphp
|
||||
borderColor: "{{ $c }}",
|
||||
backgroundColor: "{{ $c }}",
|
||||
@endif
|
||||
data: [
|
||||
@foreach ($model->datasets[$i]['values'] as $dta)
|
||||
{{ $dta }},
|
||||
@endforeach
|
||||
],
|
||||
},
|
||||
@endfor
|
||||
]
|
||||
},
|
||||
options: {
|
||||
responsive: {{ $model->responsive || !$model->width ? 'true' : 'false' }},
|
||||
maintainAspectRatio: false,
|
||||
@if ($model->title)
|
||||
title: {
|
||||
display: true,
|
||||
text: "{!! $model->title !!}",
|
||||
fontSize: 20,
|
||||
},
|
||||
@endif
|
||||
scales: {
|
||||
yAxes: [{
|
||||
display: true,
|
||||
ticks: {
|
||||
beginAtZero: true,
|
||||
}
|
||||
}]
|
||||
}
|
||||
}
|
||||
});
|
||||
</script>
|
||||
@endpush
|
||||
@@ -1,58 +0,0 @@
|
||||
@if(!$model->customId)
|
||||
@include('charts::_partials.container.canvas2')
|
||||
@endif
|
||||
|
||||
@push('body_scripts')
|
||||
<script type="text/javascript">
|
||||
var ctx = document.getElementById("{{ $model->id }}");
|
||||
|
||||
var data = {
|
||||
labels: [
|
||||
@foreach ($model->labels as $label)
|
||||
"{!! $label !!}",
|
||||
@endforeach
|
||||
],
|
||||
datasets: [
|
||||
@for ($i = 0; $i < count($model->datasets); $i++)
|
||||
{
|
||||
fill: false,
|
||||
label: "{!! $model->datasets[$i]['label'] !!}",
|
||||
lineTension: 0.3,
|
||||
@if ($model->colors and count($model->colors) > $i)
|
||||
@php $c = $model->colors[$i]; @endphp
|
||||
@else
|
||||
@php $c = sprintf('#%06X', mt_rand(0, 0xFFFFFF)); @endphp
|
||||
@endif
|
||||
borderColor: "{{ $c }}",
|
||||
backgroundColor: "{{ $c }}",
|
||||
data: [
|
||||
@foreach ($model->datasets[$i]['values'] as $dta)
|
||||
{{ $dta }},
|
||||
@endforeach
|
||||
]
|
||||
},
|
||||
@endfor
|
||||
]
|
||||
};
|
||||
|
||||
var myLineChart = new Chart(ctx, {
|
||||
type: 'line',
|
||||
data: data,
|
||||
options: {
|
||||
responsive: {{ $model->responsive || !$model->width ? 'true' : 'false' }},
|
||||
maintainAspectRatio: false,
|
||||
legend: {
|
||||
display: true,
|
||||
position: 'top'
|
||||
},
|
||||
@if ($model->title)
|
||||
title: {
|
||||
display: true,
|
||||
text: "{!! $model->title !!}",
|
||||
fontSize: 20
|
||||
}
|
||||
@endif
|
||||
}
|
||||
});
|
||||
</script>
|
||||
@endpush
|
||||
@@ -1,61 +0,0 @@
|
||||
@if(!$model->customId)
|
||||
@include('charts::_partials.container.canvas2')
|
||||
@endif
|
||||
|
||||
@push('body_scripts')
|
||||
<script type="text/javascript">
|
||||
var ctx = document.getElementById("{{ $model->id }}");
|
||||
|
||||
var data = {
|
||||
labels: [
|
||||
@foreach ($model->labels as $label)
|
||||
"{!! $label !!}",
|
||||
@endforeach
|
||||
],
|
||||
datasets: [
|
||||
@for ($i = 0; $i < count($model->datasets); $i++)
|
||||
{
|
||||
fill: false,
|
||||
label: "{!! $model->datasets[$i]['label'] !!}",
|
||||
lineTension: 0.3,
|
||||
@if ($model->colors and count($model->colors) > $i)
|
||||
@php $c = $model->colors[$i]; @endphp
|
||||
@else
|
||||
@php $c = sprintf('#%06X', mt_rand(0, 0xFFFFFF)); @endphp
|
||||
@endif
|
||||
borderColor: "{{ $c }}",
|
||||
backgroundColor: "{{ $c }}",
|
||||
data: [
|
||||
@foreach ($model->datasets[$i]['values'] as $dta)
|
||||
{{ $dta }},
|
||||
@endforeach
|
||||
]
|
||||
},
|
||||
@endfor
|
||||
]
|
||||
};
|
||||
|
||||
var myLineChart = new Chart(ctx, {
|
||||
type: 'line',
|
||||
data: data,
|
||||
options: {
|
||||
responsive: {{ $model->responsive || !$model->width ? 'true' : 'false' }},
|
||||
maintainAspectRatio: false,
|
||||
legend: {
|
||||
display: true,
|
||||
position: 'top'
|
||||
},
|
||||
animation: {
|
||||
duration: 0
|
||||
},
|
||||
@if ($model->title)
|
||||
title: {
|
||||
display: true,
|
||||
text: "{!! $model->title !!}",
|
||||
fontSize: 20
|
||||
}
|
||||
@endif
|
||||
}
|
||||
});
|
||||
</script>
|
||||
@endpush
|
||||
@@ -1,49 +0,0 @@
|
||||
@if(!$model->customId)
|
||||
@include('charts::_partials.container.canvas2')
|
||||
@endif
|
||||
|
||||
@push('body_scripts')
|
||||
<script type="text/javascript">
|
||||
var ctx = document.getElementById("{{ $model->id }}");
|
||||
|
||||
var myChart = new Chart(ctx, {
|
||||
type: 'pie',
|
||||
data: {
|
||||
labels: [
|
||||
@foreach ($model->labels as $label)
|
||||
"{!! $label !!}",
|
||||
@endforeach
|
||||
],
|
||||
datasets: [{
|
||||
data: [
|
||||
@foreach ($model->values as $dta)
|
||||
{{ $dta }},
|
||||
@endforeach
|
||||
],
|
||||
backgroundColor: [
|
||||
@if ($model->colors)
|
||||
@foreach ($model->colors as $color)
|
||||
"{{ $color }}",
|
||||
@endforeach
|
||||
@else
|
||||
@foreach ($model->values as $dta)
|
||||
"{{ sprintf('#%06X', mt_rand(0, 0xFFFFFF)) }}",
|
||||
@endforeach
|
||||
@endif
|
||||
]
|
||||
}]
|
||||
},
|
||||
options: {
|
||||
responsive: {{ $model->responsive || !$model->width ? 'true' : 'false' }},
|
||||
maintainAspectRatio: false,
|
||||
@if ($model->title)
|
||||
title: {
|
||||
display: true,
|
||||
text: "{!! $model->title !!}",
|
||||
fontSize: 20
|
||||
}
|
||||
@endif
|
||||
}
|
||||
});
|
||||
</script>
|
||||
@endpush
|
||||
@@ -4,11 +4,11 @@
|
||||
<ul class="pagination">
|
||||
{{-- Previous Page Link --}}
|
||||
@if ($paginator->onFirstPage())
|
||||
<li class="page-item disabled" aria-disabled="true" aria-label="@lang('pagination.previous')">
|
||||
<li class="font-medium mr-4 disabled" aria-disabled="true" aria-label="@lang('pagination.previous')">
|
||||
<span class="page-link" aria-hidden="true">‹</span>
|
||||
</li>
|
||||
@else
|
||||
<li class="page-item">
|
||||
<li class="font-medium mr-4">
|
||||
<button type="button" dusk="previousPage" class="page-link" wire:click="previousPage" wire:loading.attr="disabled" rel="prev" aria-label="@lang('pagination.previous')">‹</button>
|
||||
</li>
|
||||
@endif
|
||||
@@ -17,16 +17,16 @@
|
||||
@foreach ($elements as $element)
|
||||
{{-- "Three Dots" Separator --}}
|
||||
@if (is_string($element))
|
||||
<li class="page-item disabled" aria-disabled="true"><span class="page-link">{{ $element }}</span></li>
|
||||
<li class="font-medium mr-4 disabled" aria-disabled="true"><span class="page-link">{{ $element }}</span></li>
|
||||
@endif
|
||||
|
||||
{{-- Array Of Links --}}
|
||||
@if (is_array($element))
|
||||
@foreach ($element as $page => $url)
|
||||
@if ($page == $paginator->currentPage())
|
||||
<li class="page-item active" wire:key="paginator-page-{{ $page }}" aria-current="page"><span class="page-link">{{ $page }}</span></li>
|
||||
<li class="font-medium mr-4 active" wire:key="paginator-page-{{ $page }}" aria-current="page"><span class="page-link">{{ $page }}</span></li>
|
||||
@else
|
||||
<li class="page-item" wire:key="paginator-page-{{ $page }}"><button type="button" class="page-link" wire:click="gotoPage({{ $page }})">{{ $page }}</button></li>
|
||||
<li class="font-medium mr-4" wire:key="paginator-page-{{ $page }}"><button type="button" class="page-link" wire:click="gotoPage({{ $page }})">{{ $page }}</button></li>
|
||||
@endif
|
||||
@endforeach
|
||||
@endif
|
||||
@@ -34,11 +34,11 @@
|
||||
|
||||
{{-- Next Page Link --}}
|
||||
@if ($paginator->hasMorePages())
|
||||
<li class="page-item">
|
||||
<li class="font-medium mr-4">
|
||||
<button type="button" dusk="nextPage" class="page-link" wire:click="nextPage" wire:loading.attr="disabled" rel="next" aria-label="@lang('pagination.next')">›</button>
|
||||
</li>
|
||||
@else
|
||||
<li class="page-item disabled" aria-disabled="true" aria-label="@lang('pagination.next')">
|
||||
<li class="font-medium mr-4 disabled" aria-disabled="true" aria-label="@lang('pagination.next')">
|
||||
<span class="page-link" aria-hidden="true">›</span>
|
||||
</li>
|
||||
@endif
|
||||
|
||||
@@ -1,15 +1,15 @@
|
||||
<ul class="pagination justify-content-end mb-0">
|
||||
{{-- Previous Page Link --}}
|
||||
@if ($paginator->onFirstPage())
|
||||
<li class="page-item disabled">
|
||||
<li class="font-medium mr-4 disabled">
|
||||
<a class="page-link" href="#" tabindex="-1">
|
||||
<i class="fas fa-angle-left"></i>
|
||||
<span class="material-icons">chevron_left</span>
|
||||
</a>
|
||||
</li>
|
||||
@else
|
||||
<li class="page-item">
|
||||
<li class="font-medium mr-4">
|
||||
<button type="button" dusk="previousPage" class="page-link" wire:click="previousPage" wire:loading.attr="disabled" rel="prev" aria-label="@lang('pagination.previous')">
|
||||
<i class="fas fa-angle-left"></i>
|
||||
<span class="material-icons">chevron_left</span>
|
||||
</button>
|
||||
</li>
|
||||
@endif
|
||||
@@ -18,16 +18,16 @@
|
||||
@foreach ($elements as $element)
|
||||
{{-- "Three Dots" Separator --}}
|
||||
@if (is_string($element))
|
||||
<li class="page-item disabled" aria-disabled="true"><span class="page-link">{{ $element }}</span></li>
|
||||
<li class="font-medium mr-4 disabled" aria-disabled="true"><span class="page-link">{{ $element }}</span></li>
|
||||
@endif
|
||||
|
||||
{{-- Array Of Links --}}
|
||||
@if (is_array($element))
|
||||
@foreach ($element as $page => $url)
|
||||
@if ($page == $paginator->currentPage())
|
||||
<li class="page-item active" wire:key="paginator-page-{{ $page }}" aria-current="page"><span class="page-link">{{ $page }}</span></li>
|
||||
<li class="font-medium mr-4 active" wire:key="paginator-page-{{ $page }}" aria-current="page"><span class="page-link">{{ $page }}</span></li>
|
||||
@else
|
||||
<li class="page-item" wire:key="paginator-page-{{ $page }}"><button type="button" class="page-link" wire:click="gotoPage({{ $page }})">{{ $page }}</button></li>
|
||||
<li class="font-medium mr-4" wire:key="paginator-page-{{ $page }}"><button type="button" class="page-link" wire:click="gotoPage({{ $page }})">{{ $page }}</button></li>
|
||||
@endif
|
||||
@endforeach
|
||||
@endif
|
||||
@@ -35,14 +35,16 @@
|
||||
|
||||
{{-- Next Page Link --}}
|
||||
@if ($paginator->hasMorePages())
|
||||
<li class="page-item">
|
||||
<li class="font-medium mr-4">
|
||||
<button type="button" dusk="nextPage" class="page-link" wire:click="nextPage" wire:loading.attr="disabled" rel="next" aria-label="@lang('pagination.next')">
|
||||
<i class="fas fa-angle-right"></i>
|
||||
<span class="material-icons">chevron_right</span>
|
||||
</button>
|
||||
</li>
|
||||
@else
|
||||
<li class="page-item disabled" aria-disabled="true" aria-label="@lang('pagination.next')">
|
||||
<span class="page-link" aria-hidden="true"><i class="fas fa-angle-right"></i></span>
|
||||
<li class="font-medium mr-4 disabled" aria-disabled="true" aria-label="@lang('pagination.next')">
|
||||
<span class="page-link" aria-hidden="true">
|
||||
<span class="material-icons">chevron_right</span>
|
||||
</span>
|
||||
</li>
|
||||
@endif
|
||||
</ul>
|
||||
|
||||
@@ -4,22 +4,22 @@
|
||||
<ul class="pagination">
|
||||
{{-- Previous Page Link --}}
|
||||
@if ($paginator->onFirstPage())
|
||||
<li class="page-item disabled" aria-disabled="true">
|
||||
<li class="font-medium mr-4 disabled" aria-disabled="true">
|
||||
<span class="page-link">@lang('pagination.previous')</span>
|
||||
</li>
|
||||
@else
|
||||
<li class="page-item">
|
||||
<li class="font-medium mr-4">
|
||||
<button type="button" class="page-link" wire:click="previousPage" wire:loading.attr="disabled" rel="prev">@lang('pagination.previous')</button>
|
||||
</li>
|
||||
@endif
|
||||
|
||||
{{-- Next Page Link --}}
|
||||
@if ($paginator->hasMorePages())
|
||||
<li class="page-item">
|
||||
<li class="font-medium mr-4">
|
||||
<button type="button" class="page-link" wire:click="nextPage" wire:loading.attr="disabled" rel="next">@lang('pagination.next')</button>
|
||||
</li>
|
||||
@else
|
||||
<li class="page-item disabled" aria-disabled="true">
|
||||
<li class="font-medium mr-4 disabled" aria-disabled="true">
|
||||
<span class="page-link">@lang('pagination.next')</span>
|
||||
</li>
|
||||
@endif
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<html dir="{{ language()->direction() }}" xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
|
||||
|
||||
@@ -1,39 +1,47 @@
|
||||
@if ($paginator->hasPages())
|
||||
<ul class="pagination mb-0">
|
||||
<ul class="pagination flex items-center justify-end text-black text-sm">
|
||||
{{-- Previous Page Link --}}
|
||||
@if ($paginator->onFirstPage())
|
||||
<li class="page-item disabled"><span class="page-link">«</span></li>
|
||||
<li class="font-medium disabled ltr:mr-2 rtl:ml-2"><span class="page-link flex">
|
||||
<span class="material-icons">chevron_left</span>
|
||||
</span></li>
|
||||
@else
|
||||
<li class="page-item"><a class="page-link" href="{{ $paginator->previousPageUrl() }}" rel="prev">«</a></li>
|
||||
<li class="font-medium ltr:mr-2 rtl:ml-2"><a class="page-link flex" href="{{ $paginator->previousPageUrl() }}" rel="prev">
|
||||
<span class="material-icons">chevron_left</span>
|
||||
</a></li>
|
||||
@endif
|
||||
|
||||
@if($paginator->currentPage() > 3)
|
||||
<li class="page-item d-none d-sm-block"><a class="page-link" href="{{ $paginator->url(1) }}">1</a></li>
|
||||
<li class="font-medium d-none d-sm-block ltr:mr-2 rtl:ml-2 px-3 py-1 rounded-lg hover:bg-lilac-300 hover:text-purple"><a class="page-link" href="{{ $paginator->url(1) }}">1</a></li>
|
||||
@endif
|
||||
@if($paginator->currentPage() > 4)
|
||||
<li class="page-item"><span class="page-link">...</span></li>
|
||||
<li class="font-medium ltr:mr-2 rtl:ml-2 px-3 py-1 rounded-lg hover:bg-lilac-300 hover:text-purple"><span class="page-link flex">...</span></li>
|
||||
@endif
|
||||
@foreach(range(1, $paginator->lastPage()) as $i)
|
||||
@if($i >= $paginator->currentPage() - 2 && $i <= $paginator->currentPage() + 2)
|
||||
@if ($i == $paginator->currentPage())
|
||||
<li class="page-item active"><span class="page-link">{{ $i }}</span></li>
|
||||
<li class="font-medium ltr:mr-2 rtl:ml-2 active bg-lilac-300 text-purple px-3 py-1 rounded-lg"><span class="page-link">{{ $i }}</span></li>
|
||||
@else
|
||||
<li class="page-item"><a class="page-link" href="{{ $paginator->url($i) }}">{{ $i }}</a></li>
|
||||
<li class="font-medium ltr:mr-2 rtl:ml-2 px-3 py-1 rounded-lg hover:bg-lilac-300 hover:text-purple"><a class="page-link" href="{{ $paginator->url($i) }}">{{ $i }}</a></li>
|
||||
@endif
|
||||
@endif
|
||||
@endforeach
|
||||
@if($paginator->currentPage() < $paginator->lastPage() - 3)
|
||||
<li class="page-item"><span class="page-link">...</span></li>
|
||||
<li class="font-medium ltr:mr-2 rtl:ml-2 px-3 py-1 rounded-lg hover:bg-lilac-300 hover:text-purple"><span class="page-link flex">...</span></li>
|
||||
@endif
|
||||
@if($paginator->currentPage() < $paginator->lastPage() - 2)
|
||||
<li class="page-item d-none d-sm-block"><a class="page-link" href="{{ $paginator->url($paginator->lastPage()) }}">{{ $paginator->lastPage() }}</a></li>
|
||||
<li class="font-medium ltr:mr-2 rtl:ml-2 px-3 py-1 rounded-lg hover:bg-lilac-300 hover:text-purple hidden sm-block"><a class="page-link" href="{{ $paginator->url($paginator->lastPage()) }}">{{ $paginator->lastPage() }}</a></li>
|
||||
@endif
|
||||
|
||||
{{-- Next Page Link --}}
|
||||
@if ($paginator->hasMorePages())
|
||||
<li class="page-item"><a class="page-link" href="{{ $paginator->nextPageUrl() }}" rel="next">»</a></li>
|
||||
<li class="font-medium"><a class="page-link flex" href="{{ $paginator->nextPageUrl() }}" rel="next">
|
||||
<span class="material-icons">chevron_right</span>
|
||||
</a></li>
|
||||
@else
|
||||
<li class="page-item disabled"><span class="page-link">»</span></li>
|
||||
<li class="font-medium disabled"><span class="page-link flex">
|
||||
<span class="material-icons">chevron_right</span>
|
||||
</span></li>
|
||||
@endif
|
||||
</ul>
|
||||
@endif
|
||||
|
||||
@@ -1,29 +1,31 @@
|
||||
<ul class="pagination justify-content-end mb-0">
|
||||
{{-- Previous Page Link --}}
|
||||
@if ($paginator->onFirstPage())
|
||||
<li class="page-item disabled">
|
||||
<li class="font-medium mr-4 disabled">
|
||||
<a class="page-link" href="#" tabindex="-1">
|
||||
<i class="fas fa-angle-left"></i>
|
||||
<span class="material-icons">chevron_left</span>
|
||||
</a>
|
||||
</li>
|
||||
@else
|
||||
<li class="page-item"><a class="page-link" tabindex="-1" href="{{ $paginator->previousPageUrl() }}" rel="prev"><i class="fas fa-angle-left"></i></a></li>
|
||||
<li class="font-medium mr-4"><a class="page-link" tabindex="-1" href="{{ $paginator->previousPageUrl() }}" rel="prev">
|
||||
<span class="material-icons">chevron_left</span>
|
||||
</a></li>
|
||||
@endif
|
||||
|
||||
{{-- Pagination Elements --}}
|
||||
@foreach ($elements as $element)
|
||||
{{-- "Three Dots" Separator --}}
|
||||
@if (is_string($element))
|
||||
<li class="page-item disabled"><a class="page-link" href="#" tabindex="-1">{{ $element }}</a></li>
|
||||
<li class="font-medium mr-4 disabled"><a class="page-link" href="#" tabindex="-1">{{ $element }}</a></li>
|
||||
@endif
|
||||
|
||||
{{-- Array Of Links --}}
|
||||
@if (is_array($element))
|
||||
@foreach ($element as $page => $url)
|
||||
@if ($page == $paginator->currentPage())
|
||||
<li class="page-item active"><a class="page-link" href="#" tabindex="-1">{{ $page }}</a></li>
|
||||
<li class="font-medium mr-4 active"><a class="page-link" href="#" tabindex="-1">{{ $page }}</a></li>
|
||||
@else
|
||||
<li class="page-item"><a class="page-link" tabindex="-1" href="{{ $url }}">{{ $page }}</a></li>
|
||||
<li class="font-medium mr-4"><a class="page-link" tabindex="-1" href="{{ $url }}">{{ $page }}</a></li>
|
||||
@endif
|
||||
@endforeach
|
||||
@endif
|
||||
@@ -31,11 +33,13 @@
|
||||
|
||||
{{-- Next Page Link --}}
|
||||
@if ($paginator->hasMorePages())
|
||||
<li class="page-item"><a class="page-link" tabindex="-1" href="{{ $paginator->nextPageUrl() }}" rel="next"><i class="fas fa-angle-right"></i></a></li>
|
||||
<li class="font-medium mr-4"><a class="page-link" tabindex="-1" href="{{ $paginator->nextPageUrl() }}" rel="next">
|
||||
<span class="material-icons">chevron_right</span>
|
||||
</a></li>
|
||||
@else
|
||||
<li class="page-item disabled">
|
||||
<li class="font-medium mr-4 disabled">
|
||||
<a class="page-link" href="#" tabindex="-1">
|
||||
<i class="fas fa-angle-right"></i>
|
||||
<span class="material-icons">chevron_right</span>
|
||||
</a>
|
||||
</li>
|
||||
@endif
|
||||
|
||||
@@ -2,16 +2,16 @@
|
||||
<ul class="pagination">
|
||||
{{-- Previous Page Link --}}
|
||||
@if ($paginator->onFirstPage())
|
||||
<li class="page-item disabled"><span class="page-link">@lang('pagination.previous')</span></li>
|
||||
<li class="font-medium mr-4 disabled"><span class="page-link">@lang('pagination.previous')</span></li>
|
||||
@else
|
||||
<li class="page-item"><a class="page-link" href="{{ $paginator->previousPageUrl() }}" rel="prev">@lang('pagination.previous')</a></li>
|
||||
<li class="font-medium mr-4"><a class="page-link" href="{{ $paginator->previousPageUrl() }}" rel="prev">@lang('pagination.previous')</a></li>
|
||||
@endif
|
||||
|
||||
{{-- Next Page Link --}}
|
||||
@if ($paginator->hasMorePages())
|
||||
<li class="page-item"><a class="page-link" href="{{ $paginator->nextPageUrl() }}" rel="next">@lang('pagination.next')</a></li>
|
||||
<li class="font-medium mr-4"><a class="page-link" href="{{ $paginator->nextPageUrl() }}" rel="next">@lang('pagination.next')</a></li>
|
||||
@else
|
||||
<li class="page-item disabled"><span class="page-link">@lang('pagination.next')</span></li>
|
||||
<li class="font-medium mr-4 disabled"><span class="page-link">@lang('pagination.next')</span></li>
|
||||
@endif
|
||||
</ul>
|
||||
@endif
|
||||
|
||||
Reference in New Issue
Block a user