{% extends "registry/master.html" %}

{% block title %}Search {{registryAttribute}}{% endblock %}

{% block content %}

<h2>Search {{registryAttribute}}</h2>

  {% if isResultsRequest %}
    {% if resultsCount %}
      {% if isResultSingular %}
<p>There was one {{domainClassName}} found.</p>
      {% else %}
<p>There were {{resultsCount}} {{registryAttribute}} found.</p>
      {% endif %}
    {% else %}
      {% if userQuery %}
<p><em>Sorry, no {{registryAttribute}} were found in that search.</em></p>
      {% else %}
<p><em>Sorry, no {{registryAttribute}} were found under this letter.</em></p>
      {% endif %}
    {% endif %}
  {% else %}

<p>Please search for registered {{registryAttribute}} below.</p>
  {% endif %}
<div id="alphasearch">
  <a href="/{{registryAttribute}}/find/a/">A</a>
  <a href="/{{registryAttribute}}/find/b/">B</a>
  <a href="/{{registryAttribute}}/find/c/">C</a>
  <a href="/{{registryAttribute}}/find/d/">D</a>
  <a href="/{{registryAttribute}}/find/e/">E</a>
  <a href="/{{registryAttribute}}/find/f/">F</a>
  <a href="/{{registryAttribute}}/find/g/">G</a>
  <a href="/{{registryAttribute}}/find/h/">H</a>
  <a href="/{{registryAttribute}}/find/i/">I</a>
  <a href="/{{registryAttribute}}/find/j/">J</a>
  <a href="/{{registryAttribute}}/find/k/">K</a>
  <a href="/{{registryAttribute}}/find/l/">L</a>
  <a href="/{{registryAttribute}}/find/m/">M</a>
  <a href="/{{registryAttribute}}/find/n/">N</a>
  <a href="/{{registryAttribute}}/find/o/">O</a>
  <a href="/{{registryAttribute}}/find/p/">P</a>
  <a href="/{{registryAttribute}}/find/q/">Q</a>
  <a href="/{{registryAttribute}}/find/r/">R</a>
  <a href="/{{registryAttribute}}/find/s/">S</a>
  <a href="/{{registryAttribute}}/find/t/">T</a>
  <a href="/{{registryAttribute}}/find/u/">U</a>
  <a href="/{{registryAttribute}}/find/v/">V</a>
  <a href="/{{registryAttribute}}/find/x/">X</a>
  <a href="/{{registryAttribute}}/find/y/">Y</a>
  <a href="/{{registryAttribute}}/find/z/">Z</a>
</div><!-- /alphasearch -->

<form action="/{{registryAttribute}}/search/" method="post">
<input type="text" id="user-search-terms" name="userQuery" value="{{ userQuery }}" />
<input type="submit" name="search" value="Search &raquo;" />
</form>

  {% if resultsCount %}
<ul>
    {% for object in domainObjectList %}
  <li><a href="/{{registryAttribute}}/{{ object.name }}/" title="{{ object.fullname }}">{% firstof object.fullname object.name %}</a>
  </li>
    {% endfor %}
</ul>
  {% endif %}

{% endblock %}

