{% extends "base.html" %}
{% load static %}
{% load watson %}
{% load model_name %}

{% block heading %}<h4>
    <img src="{% static "svg/search.svg" %}" width="30" height="30" alt="Search">
    Search results</h4>{%endblock%}

{% block content %}
<p>Search results{% if query %} for &ldquo;{{query}}&rdquo;{% endif %}</p>
{% if search_results %}
<ul class="list-unstyled">
    {% for result in search_results %}
    <li class="media my-4"><img class="mr-3" src="{% get_static_prefix %}svg/{{ result.object.icon }}"
            alt="{{ result.object|model_name|title }}" title="{{ result.object|model_name|title }}" width="30"
            height="30"><a href="{{ result.url }}">{{ result }}</a></li>
    {% endfor %}
</ul>
{% else %}
{% if query %}
<p><em>There are no results to display.</em></p>
<p><em>Try entering a less specific search term.</em></p>
{% else %}
<p><em>Please enter a query in the search form.</em></p>
{% endif %}
{% endif %}
{% endblock %}
