1
0
mirror of https://github.com/Kovah/LinkAce.git synced 2025-01-17 21:28:30 +01:00

Merge pull request #618 from chrissawyerfan4/search-nonoresults

Don't show "no results" when no search was performed
This commit is contained in:
Kevin Woblick 2023-03-16 22:55:21 +01:00 committed by GitHub
commit 0249392b9a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 3 deletions

View File

@ -32,6 +32,7 @@ class SearchController extends Controller
'only_lists' => '',
'only_tags' => '',
'order_by' => $this->orderByOptions[0],
'performed_search' => false,
]);
}
@ -60,6 +61,7 @@ class SearchController extends Controller
'empty_tags' => $this->emptyTags,
'empty_lists' => $this->emptyLists,
'order_by' => $this->searchOrderBy,
'performed_search' => true,
]);
}
}

View File

@ -132,9 +132,11 @@
<div class="card-table mt-4">
@if($results->isEmpty())
<div class="alert alert-info m-3">
@lang('search.no_results')
</div>
@if($query_settings['performed_search'])
<div class="alert alert-info m-3">
@lang('search.no_results')
</div>
@endif
@else
@include('app.search.partials.table', ['results' => $results])
@endif