dont show search-icon/exclude specific non-searchable fields from overviews

Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
This commit is contained in:
Michael Kaufmann
2022-10-16 13:13:26 +02:00
parent 21954505b2
commit 64142d2158
6 changed files with 16 additions and 6 deletions

View File

@@ -11,10 +11,12 @@
{% else %}
<div class="d-flex flex-column align-items-end mt-n2">
<div class="rounded-top bg-white small py-1 px-2 me-3 opacity-75 text-dark">
{% if gSearchText is not empty %}
<span class="me-2"><a href="{{ linker(listing.self_overview) }}"><i class="fa-solid fa-xmark"></i></a> Filter: <strong>{{ gSearchText }}</strong></span>
{% if listing.no_search is not defined or (listing.no_search is defined and listing.no_search == false) %}
{% if gSearchText is not empty %}
<span class="me-2"><a href="{{ linker(listing.self_overview) }}"><i class="fa-solid fa-xmark"></i></a> Filter: <strong>{{ gSearchText }}</strong></span>
{% endif %}
<span type="button" data-bs-toggle="modal" data-bs-target="#searchColumnsModal" class="me-2"><i class="fa-solid fa-search"></i></span>
{% endif %}
<span type="button" data-bs-toggle="modal" data-bs-target="#searchColumnsModal" class="me-2"><i class="fa-solid fa-search"></i></span>
<span type="button" data-bs-toggle="modal" data-bs-target="#manageColumnsModal"><i class="fa-solid fa-cog"></i></span>
</div>
</div>
@@ -94,6 +96,7 @@
</div>
</div>
{% if listing.no_search is not defined or (listing.no_search is defined and listing.no_search == false) %}
<!-- Modal -->
<div class="modal fade" id="searchColumnsModal" tabindex="-1" aria-labelledby="searchColumnsModalLabel" aria-hidden="true">
<div class="modal-dialog">
@@ -130,4 +133,5 @@
</form>
</div>
</div>
{% endif %}
{% endmacro %}

View File

@@ -24,7 +24,7 @@
{% block actions %}
{% if listing.is_search and listing.self_overview is defined and listing.self_overview is iterable %}
{% set actions_tmp = actions_links %}
{% set actions_tmp = actions_links|default([]) %}
{% set actions_links = {'href': linker(listing.self_overview), 'icon': 'fa-solid fa-reply','label': lng('panel.backtooverview')} %}
{% set actions_links = {actions_links}|merge(actions_tmp) %}
{% endif %}