{# Search form results list #}
{% extends "contact/base.html" %}{% load molly_utils %}
{% load i18n %}
{% block title %}{% trans "Contact Search" %}{% if query %}: {{ query }}{% endif %}{% endblock %}

{% block content %}

{% include "contact/search_form.html" %}

{% if form.is_valid %}
<div class="section">
  <div class="header">
    <h2>{% trans "Results" %}</h2>
  </div>
    {% if message %}
      <div class="section-content">
          <div class="note"><div class="bubble pad-10">
            {{ message }}
          </div></div>
      </div>
    {% endif %}
    <div class="section-content">
      <div class="note"><div class="bubble pad-10">
        {% blocktrans count results|length as counter %}Your search returned one item.{% plural %}Your search returned {{ counter }} items.{% endblocktrans %}
		{# If there are too many results suggest that the user uses more specific criteria #}
        {% if results|length|gte:40 %}
          {% trans "Try adding an initial to get more specific results." %}
        {% endif %}
      </div></div>
    </div>
    {% if results %}
      <ul class="link-list" id="people">
        {% for person in results %}
          <li class="contact-person">
            {% include "contact/result.html" %}
          </li>
        {% endfor %}
      </ul>
    {% endif %}
    </div>
</div>
{% endif %}

{% endblock %}
