|
1 | | -@aware(['isTailwind','isBootstrap','isBootstrap4','isBootstrap5']) |
2 | | - |
3 | 1 | @includeWhen( |
4 | 2 | $this->hasConfigurableAreaFor('before-pagination'), |
5 | 3 | $this->getConfigurableAreaFor('before-pagination'), |
6 | 4 | $this->getParametersForConfigurableArea('before-pagination') |
7 | 5 | ) |
8 | 6 |
|
9 | | -@if ($this->isTailwind) |
10 | | - <div {{ $this->getPaginationWrapperAttributesBag() }}> |
11 | | - @if ($this->paginationVisibilityIsEnabled()) |
| 7 | +<div {{ $this->getPaginationWrapperAttributesBag() }}> |
| 8 | + @if ($this->paginationVisibilityIsEnabled()) |
| 9 | + @if ($this->isTailwind) |
12 | 10 | <div class="mt-4 px-4 md:p-0 sm:flex justify-between items-center space-y-4 sm:space-y-0"> |
13 | 11 | <div> |
14 | | - @if ($this->paginationIsEnabled() && $this->isPaginationMethod('standard') && $this->getRows->lastPage() > 1) |
| 12 | + @if ($this->paginationIsEnabled && $this->isPaginationMethod('standard') && $this->getRows->lastPage() > 1 && $this->showPaginationDetails) |
15 | 13 | <p class="paged-pagination-results text-sm text-gray-700 leading-5 dark:text-white"> |
16 | | - @if($this->showPaginationDetails()) |
17 | 14 | <span>{{ __($this->getLocalisationPath.'Showing') }}</span> |
18 | 15 | <span class="font-medium">{{ $this->getRows->firstItem() }}</span> |
19 | 16 | <span>{{ __($this->getLocalisationPath.'to') }}</span> |
20 | 17 | <span class="font-medium">{{ $this->getRows->lastItem() }}</span> |
21 | 18 | <span>{{ __($this->getLocalisationPath.'of') }}</span> |
22 | 19 | <span class="font-medium"><span x-text="paginationTotalItemCount"></span></span> |
23 | 20 | <span>{{ __($this->getLocalisationPath.'results') }}</span> |
24 | | - @endif |
25 | 21 | </p> |
26 | | - @elseif ($this->paginationIsEnabled() && $this->isPaginationMethod('simple')) |
| 22 | + @elseif ($this->paginationIsEnabled && $this->isPaginationMethod('simple') && $this->showPaginationDetails) |
27 | 23 | <p class="paged-pagination-results text-sm text-gray-700 leading-5 dark:text-white"> |
28 | | - @if($this->showPaginationDetails()) |
29 | | - <span>{{ __($this->getLocalisationPath.'Showing') }}</span> |
30 | | - <span class="font-medium">{{ $this->getRows->firstItem() }}</span> |
31 | | - <span>{{ __($this->getLocalisationPath.'to') }}</span> |
32 | | - <span class="font-medium">{{ $this->getRows->lastItem() }}</span> |
33 | | - @endif |
| 24 | + <span>{{ __($this->getLocalisationPath.'Showing') }}</span> |
| 25 | + <span class="font-medium">{{ $this->getRows->firstItem() }}</span> |
| 26 | + <span>{{ __($this->getLocalisationPath.'to') }}</span> |
| 27 | + <span class="font-medium">{{ $this->getRows->lastItem() }}</span> |
34 | 28 | </p> |
35 | | - @elseif ($this->paginationIsEnabled() && $this->isPaginationMethod('cursor')) |
| 29 | + @elseif ($this->paginationIsEnabled && $this->isPaginationMethod('cursor')) |
36 | 30 | @else |
37 | | - <p class="total-pagination-results text-sm text-gray-700 leading-5 dark:text-white"> |
38 | | - {{ __($this->getLocalisationPath.'Showing') }} |
39 | | - <span class="font-medium">{{ $this->getRows->count() }}</span> |
40 | | - {{ __($this->getLocalisationPath.'results') }} |
41 | | - </p> |
| 31 | + @if($this->showPaginationDetails) |
| 32 | + <p class="total-pagination-results text-sm text-gray-700 leading-5 dark:text-white"> |
| 33 | + <span>{{ __($this->getLocalisationPath.'Showing') }}</span> |
| 34 | + <span class="font-medium">{{ $this->getRows->count() }}</span> |
| 35 | + <span>{{ __($this->getLocalisationPath.'results') }}</span> |
| 36 | + </p> |
| 37 | + @endif |
42 | 38 | @endif |
43 | 39 | </div> |
44 | 40 |
|
45 | | - @if ($this->paginationIsEnabled()) |
| 41 | + @if ($this->paginationIsEnabled) |
46 | 42 | {{ $this->getRows->links('livewire-tables::specific.tailwind.'.(!$this->isPaginationMethod('standard') ? 'simple-' : '').'pagination') }} |
47 | 43 | @endif |
48 | 44 | </div> |
49 | | - @endif |
50 | | - </div> |
51 | | -@elseif ($this->isBootstrap4) |
52 | | - <div {{ $this->getPaginationWrapperAttributesBag() }}> |
53 | | - @if ($this->paginationVisibilityIsEnabled()) |
54 | | - @if ($this->paginationIsEnabled() && $this->isPaginationMethod('standard') && $this->getRows->lastPage() > 1) |
| 45 | + @else |
| 46 | + @if ($this->paginationIsEnabled && $this->isPaginationMethod('standard') && $this->getRows->lastPage() > 1) |
55 | 47 | <div class="row mt-3"> |
56 | 48 | <div class="col-12 col-md-6 overflow-auto"> |
57 | 49 | {{ $this->getRows->links('livewire-tables::specific.bootstrap-4.pagination') }} |
58 | 50 | </div> |
59 | 51 |
|
60 | | - <div class="col-12 col-md-6 text-center text-md-right text-muted"> |
61 | | - @if($this->showPaginationDetails()) |
| 52 | + <div @class([ |
| 53 | + "col-12 col-md-6 text-center text-muted", |
| 54 | + "text-md-right" => $this->isBootstrap4, |
| 55 | + "text-md-end" => $this->isBootstrap5, |
| 56 | + ])> |
| 57 | + @if($this->showPaginationDetails) |
62 | 58 | <span>{{ __($this->getLocalisationPath.'Showing') }}</span> |
63 | 59 | <strong>{{ $this->getRows->count() ? $this->getRows->firstItem() : 0 }}</strong> |
64 | 60 | <span>{{ __($this->getLocalisationPath.'to') }}</span> |
|
69 | 65 | @endif |
70 | 66 | </div> |
71 | 67 | </div> |
72 | | - @elseif ($this->paginationIsEnabled() && $this->isPaginationMethod('simple')) |
| 68 | + @elseif ($this->paginationIsEnabled && $this->isPaginationMethod('simple')) |
73 | 69 | <div class="row mt-3"> |
74 | 70 | <div class="col-12 col-md-6 overflow-auto"> |
75 | 71 | {{ $this->getRows->links('livewire-tables::specific.bootstrap-4.simple-pagination') }} |
76 | 72 | </div> |
77 | 73 |
|
78 | | - <div class="col-12 col-md-6 text-center text-md-right text-muted"> |
79 | | - @if($this->showPaginationDetails()) |
| 74 | + <div @class([ |
| 75 | + "col-12 col-md-6 text-center text-muted", |
| 76 | + "text-md-right" => $this->isBootstrap4, |
| 77 | + "text-md-end" => $this->isBootstrap5, |
| 78 | + ])> |
| 79 | + @if($this->showPaginationDetails) |
80 | 80 | <span>{{ __($this->getLocalisationPath.'Showing') }}</span> |
81 | 81 | <strong>{{ $this->getRows->count() ? $this->getRows->firstItem() : 0 }}</strong> |
82 | 82 | <span>{{ __($this->getLocalisationPath.'to') }}</span> |
83 | 83 | <strong>{{ $this->getRows->count() ? $this->getRows->lastItem() : 0 }}</strong> |
84 | 84 | @endif |
85 | 85 | </div> |
86 | 86 | </div> |
87 | | - @elseif ($this->paginationIsEnabled() && $this->isPaginationMethod('cursor')) |
| 87 | + @elseif ($this->paginationIsEnabled && $this->isPaginationMethod('cursor')) |
88 | 88 | <div class="row mt-3"> |
89 | 89 | <div class="col-12 col-md-6 overflow-auto"> |
90 | 90 | {{ $this->getRows->links('livewire-tables::specific.bootstrap-4.simple-pagination') }} |
|
93 | 93 | @else |
94 | 94 | <div class="row mt-3"> |
95 | 95 | <div class="col-12 text-muted"> |
96 | | - {{ __($this->getLocalisationPath.'Showing') }} |
97 | | - <strong>{{ $this->getRows->count() }}</strong> |
98 | | - {{ __($this->getLocalisationPath.'results') }} |
99 | | - </div> |
100 | | - </div> |
101 | | - @endif |
102 | | - @endif |
103 | | - </div> |
104 | | -@elseif ($this->isBootstrap5) |
105 | | - <div {{ $this->getPaginationWrapperAttributesBag() }} > |
106 | | - @if ($this->paginationVisibilityIsEnabled()) |
107 | | - @if ($this->paginationIsEnabled() && $this->isPaginationMethod('standard') && $this->getRows->lastPage() > 1) |
108 | | - <div class="row mt-3"> |
109 | | - <div class="col-12 col-md-6 overflow-auto"> |
110 | | - {{ $this->getRows->links('livewire-tables::specific.bootstrap-4.pagination') }} |
111 | | - </div> |
112 | | - <div class="col-12 col-md-6 text-center text-md-end text-muted"> |
113 | | - @if($this->showPaginationDetails()) |
114 | | - <span>{{ __($this->getLocalisationPath.'Showing') }}</span> |
115 | | - <strong>{{ $this->getRows->count() ? $this->getRows->firstItem() : 0 }}</strong> |
116 | | - <span>{{ __($this->getLocalisationPath.'to') }}</span> |
117 | | - <strong>{{ $this->getRows->count() ? $this->getRows->lastItem() : 0 }}</strong> |
118 | | - <span>{{ __($this->getLocalisationPath.'of') }}</span> |
119 | | - <strong><span x-text="paginationTotalItemCount"></span></strong> |
120 | | - <span>{{ __($this->getLocalisationPath.'results') }}</span> |
121 | | - @endif |
122 | | - </div> |
123 | | - </div> |
124 | | - @elseif ($this->paginationIsEnabled() && $this->isPaginationMethod('simple')) |
125 | | - <div class="row mt-3"> |
126 | | - <div class="col-12 col-md-6 overflow-auto"> |
127 | | - {{ $this->getRows->links('livewire-tables::specific.bootstrap-4.simple-pagination') }} |
128 | | - </div> |
129 | | - <div class="col-12 col-md-6 text-center text-md-end text-muted"> |
130 | | - @if($this->showPaginationDetails()) |
131 | | - <span>{{ __($this->getLocalisationPath.'Showing') }}</span> |
132 | | - <strong>{{ $this->getRows->count() ? $this->getRows->firstItem() : 0 }}</strong> |
133 | | - <span>{{ __($this->getLocalisationPath.'to') }}</span> |
134 | | - <strong>{{ $this->getRows->count() ? $this->getRows->lastItem() : 0 }}</strong> |
| 96 | + @if($this->showPaginationDetails) |
| 97 | + {{ __($this->getLocalisationPath.'Showing') }} |
| 98 | + <strong>{{ $this->getRows->count() }}</strong> |
| 99 | + {{ __($this->getLocalisationPath.'results') }} |
135 | 100 | @endif |
136 | 101 | </div> |
137 | 102 | </div> |
138 | | - @elseif ($this->paginationIsEnabled() && $this->isPaginationMethod('cursor')) |
139 | | - <div class="row mt-3"> |
140 | | - <div class="col-12 col-md-6 overflow-auto"> |
141 | | - {{ $this->getRows->links('livewire-tables::specific.bootstrap-4.simple-pagination') }} |
142 | | - </div> |
143 | | - </div> |
144 | | - @else |
145 | | - <div class="row mt-3"> |
146 | | - <div class="col-12 text-muted"> |
147 | | - {{ __($this->getLocalisationPath.'Showing') }} |
148 | | - <strong>{{ $this->getRows->count() }}</strong> |
149 | | - {{ __($this->getLocalisationPath.'results') }} |
150 | | - </div> |
151 | | - </div> |
152 | 103 | @endif |
153 | 104 | @endif |
154 | | - </div> |
155 | | -@endif |
| 105 | + @endif |
| 106 | +</div> |
156 | 107 |
|
157 | 108 | @includeWhen( |
158 | 109 | $this->hasConfigurableAreaFor('after-pagination'), |
|
0 commit comments