
{% if collection_name %}
  <form method="GET" action="{% url 'search_indexes:collection_haystack_search' collection_name %}" role="search">
    {% else %}
  <form method="GET" action="{% url 'search_indexes:haystack_search' %}" role="search">
{% endif %}
  <div class="row">
    <div class="col-sm-8">
      <input name="q" type="text" class="form-control" placeholder="Trouver ...">
    </div>
    <div class="col-sm-3">
      <select name="model_type" class="form-control">
          <option value="images">Images</option>
          <option value="annotations">Annotations</option>
      </select>
    </div>
    <div class="col-sm-1">
      <button type="submit" class="btn btn-default btn-block"><i class="fa fa-search" aria-hidden="true"></i></button>
    </div>
  </div>
</form>
