forked from rappasoft/laravel-livewire-tables
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Filter Trait - Reorganization (rappasoft#2181)
* Initial Commits * Fix styling * Fix namespace * Fix styling * Remove superfluous filter traits * Fixes for Filter Trait Tidy Up * Fix styling * Tweaks for Lazy Tables & Tidying Item * Roll back to allow HTML separator * Add tests for new methods * Fix styling * Remove duplicate traits * Add additional tests * Add filter slidedown tests * Fix styling * Add Filter Slidedown Row Test * Fix styling * Test Adjustments * Add test for filter slidedown row * Fix styling * Merging * Add setFilterDefaultValue Test * Fix styling
- Loading branch information
Showing
44 changed files
with
1,251 additions
and
697 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,33 +1,30 @@ | ||
@aware([ 'tableName','isTailwind','isBootstrap','isBootstrap4','isBootstrap5']) | ||
|
||
@if ($this->filtersAreEnabled() && $this->filterPillsAreEnabled() && $this->hasAppliedVisibleFiltersForPills()) | ||
<div> | ||
<div @class([ | ||
'mb-4 px-4 md:p-0' => $isTailwind, | ||
'mb-3' => $isBootstrap, | ||
]) x-cloak x-show="!currentlyReorderingStatus"> | ||
<small @class([ | ||
'text-gray-700 dark:text-white' => $isTailwind, | ||
'' => $isBootstrap, | ||
])> | ||
{{ __($this->getLocalisationPath.'Applied Filters') }}: | ||
</small> | ||
<div> | ||
<div @class([ | ||
'mb-4 px-4 md:p-0' => $isTailwind, | ||
'mb-3' => $isBootstrap, | ||
]) x-cloak x-show="!currentlyReorderingStatus"> | ||
<small @class([ | ||
'text-gray-700 dark:text-white' => $isTailwind, | ||
'' => $isBootstrap, | ||
])> | ||
{{ __($this->getLocalisationPath.'Applied Filters') }}: | ||
</small> | ||
|
||
@foreach($this->getAppliedFiltersWithValues() as $filterSelectName => $value) | ||
@php($filter = $this->getFilterByKey($filterSelectName)) | ||
@continue(is_null($filter) || $filter->isHiddenFromPills()) | ||
@php( $filterPillTitle = $filter->getFilterPillTitle()) | ||
@php( $filterPillValue = $filter->getFilterPillValue($value)) | ||
@php( $separator = method_exists($filter, 'getPillsSeparator') ? $filter->getPillsSeparator() : ', ') | ||
@continue((is_array($filterPillValue) && empty($filterPillValue))) | ||
|
||
@if ($filter->hasCustomPillBlade()) | ||
@include($filter->getCustomPillBlade(), ['filter' => $filter]) | ||
@else | ||
<x-livewire-tables::tools.filter-pills.item :$filterPillTitle :$filterPillValue :$filterSelectName :$separator/> | ||
@endif | ||
@endforeach | ||
<x-livewire-tables::tools.filter-pills.buttons.reset-all /> | ||
</div> | ||
@tableloop($this->getAppliedFiltersWithValues() as $filterSelectName => $value) | ||
@php($filter = $this->getFilterByKey($filterSelectName)) | ||
@continue(is_null($filter) || $filter->isHiddenFromPills()) | ||
@php( $filterPillValue = $filter->getFilterPillValue($value)) | ||
@continue((is_array($filterPillValue) && empty($filterPillValue))) | ||
@php( $filterPillTitle = $filter->getFilterPillTitle()) | ||
@php( $separator = method_exists($filter, 'getPillsSeparator') ? $filter->getPillsSeparator() : ', ') | ||
@if ($filter->hasCustomPillBlade()) | ||
@include($filter->getCustomPillBlade(), ['filter' => $filter]) | ||
@else | ||
<x-livewire-tables::tools.filter-pills.item :$filterPillTitle :$filterPillValue :$filterSelectName :$separator/> | ||
@endif | ||
@endtableloop | ||
<x-livewire-tables::tools.filter-pills.buttons.reset-all /> | ||
</div> | ||
@endif | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.