Use tooltips for display attributes

This commit is contained in:
Jeremy Stretch 2023-11-01 14:58:28 -04:00
parent d88a2c599f
commit f181b14858

View File

@ -1,9 +1,9 @@
SEARCH_RESULT_ATTRS = """ SEARCH_RESULT_ATTRS = """
{% for name, value in record.display_attrs.items %} {% for name, value in record.display_attrs.items %}
{% with url=value.get_absolute_url %} {% with url=value.get_absolute_url %}
<span class="badge bg-secondary"> <span class="badge bg-secondary" data-bs-toggle="tooltip" data-bs-placement="bottom" title="{{ name|bettertitle }}">
{% if url %}<a href="{{ url }}">{% endif %} {% if url %}<a href="{{ url }}">{% endif %}
{{ name|bettertitle }}: {{ value }} {{ value }}
{% if url %}</a>{% endif %} {% if url %}</a>{% endif %}
</span> </span>
{% endwith %} {% endwith %}