{% extends "nui/_base.html" %}
{% block content %}
{% if collection_search.count %}
<h2>Collections:</h2>
<ul>
    {% for collection in collection_search %}
    <li><a href="{% url "nui:collection" collection.pk %}">{{collection.title}}</a></li>
    {% endfor %}
</ul>
{% endif %}

{% if resource_search.count %}
<h2>Ressources:</h2>
<ul>
    {% for resource in resource_search %}
        {% for collection in resource.available_collections %}
        <li><a href="{% url "nui:resource" collection.pk resource.pk %}">{{resource.title}}</a></li>
        {% endfor %}
    {% endfor %}
</ul>
{% endif %}

{% endblock content %}