summaryrefslogtreecommitdiff
path: root/resources/views/table.blade.php
diff options
context:
space:
mode:
authorSam Light <samlight1994@gmail.com>2023-11-06 00:06:39 +0000
committerSam Light <samlight1994@gmail.com>2023-11-06 00:06:39 +0000
commit8f69cb7f3df70c40cbae47a5661dc9ae67aae728 (patch)
tree8ce246d53dc428c1fe95fad04e631a89048ddea0 /resources/views/table.blade.php
parent5c24746657ac23c7a65c4e4efc89cf6bfcb5a52c (diff)
Lots of table improvments
Diffstat (limited to 'resources/views/table.blade.php')
-rw-r--r--resources/views/table.blade.php36
1 files changed, 36 insertions, 0 deletions
diff --git a/resources/views/table.blade.php b/resources/views/table.blade.php
index 1938b48..5f6df75 100644
--- a/resources/views/table.blade.php
+++ b/resources/views/table.blade.php
@@ -1,4 +1,40 @@
<div>
+ <div class="table-controls pb-2 d-flex justify-content-between align-items-center">
+ @if($searchable)
+ <div>
+ <input class="form-control border-secondary" type="search"
+ wire:model.live.debounce.{{ $searchDebounce}}="search"
+ placeholder="{{ __('Search') }}..." />
+ </div>
+ @endif
+ <div class="d-flex gap-3">
+ @if($showColumnSelect)
+ <div class="dropdown">
+ <button type="button" class="btn btn-outline-secondary border-secondary"
+ data-bs-toggle="dropdown" aria-expanded="false"
+ data-bs-auto-close="outside">
+ {{ __('Columns') }}
+ </button>
+ <div class="dropdown-menu p-4">
+ @foreach($allColumns->filter(fn($c) => $c->getShowInSelect()) as $column)
+ <label class="d-block">
+ <input type="checkbox" wire:model.live="activeColumns"
+ value="{{ $column->name }}" />
+ {{ $column->title }}
+ </label>
+ @endforeach
+ </div>
+ </div>
+ @endif
+ @if($showPageSizeSelect)
+ <select wire:model.live="pageSize" class="form-select border-secondary">
+ @foreach($pageSizes as $size)
+ <option value="{{ $size }}">{{ $size }}</option>
+ @endforeach
+ </select>
+ @endif
+ </div>
+ </div>
<table class="table">
<thead>
<tr>