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

{% block content %}

<h2>{{registerNameTitle}}</h2>

{% if isRegisterCountZero %}

  <p>There are no {{registerName}} at this time.</p>

{% else %}
{% if isRegisterCountSingle %}

  <p>There is one {{registerName}}.</p>
  
{% else %}

  <p>There are {{ registerCount }} {{registerName}}.</p>

{% endif %}
{% endif %}

{% if registerCount %}
{% if isRegisterCountLow %}
  <ul>
  {% for domainObject in objectRegister %}
    <li><a href="{{uriPrefix}}/{{registryPath}}/{{domainObject.getRegisterKeyValue}}/" title="{{domainObject.getRegisterKeyValue}}">{{domainObject.getLabelValue}}</a>
    </li>
  {% endfor %}
  </ul>
<p class="desc">Select from the list to view individual {{registerName}}</p>
{% else %}
<div id="alphasearch">
  <a href="{{uriPrefix}}/{{registryPath}}/find/a/">A</a>
  <a href="{{uriPrefix}}/{{registryPath}}/find/b/">B</a>
  <a href="{{uriPrefix}}/{{registryPath}}/find/c/">C</a>
  <a href="{{uriPrefix}}/{{registryPath}}/find/d/">D</a>
  <a href="{{uriPrefix}}/{{registryPath}}/find/e/">E</a>
  <a href="{{uriPrefix}}/{{registryPath}}/find/f/">F</a>
  <a href="{{uriPrefix}}/{{registryPath}}/find/g/">G</a>
  <a href="{{uriPrefix}}/{{registryPath}}/find/h/">H</a>
  <a href="{{uriPrefix}}/{{registryPath}}/find/i/">I</a>
  <a href="{{uriPrefix}}/{{registryPath}}/find/j/">J</a>
  <a href="{{uriPrefix}}/{{registryPath}}/find/k/">K</a>
  <a href="{{uriPrefix}}/{{registryPath}}/find/l/">L</a>
  <a href="{{uriPrefix}}/{{registryPath}}/find/m/">M</a>
  <a href="{{uriPrefix}}/{{registryPath}}/find/n/">N</a>
  <a href="{{uriPrefix}}/{{registryPath}}/find/o/">O</a>
  <a href="{{uriPrefix}}/{{registryPath}}/find/p/">P</a>
  <a href="{{uriPrefix}}/{{registryPath}}/find/q/">Q</a>
  <a href="{{uriPrefix}}/{{registryPath}}/find/r/">R</a>
  <a href="{{uriPrefix}}/{{registryPath}}/find/s/">S</a>
  <a href="{{uriPrefix}}/{{registryPath}}/find/t/">T</a>
  <a href="{{uriPrefix}}/{{registryPath}}/find/u/">U</a>
  <a href="{{uriPrefix}}/{{registryPath}}/find/v/">V</a>
  <a href="{{uriPrefix}}/{{registryPath}}/find/x/">X</a>
  <a href="{{uriPrefix}}/{{registryPath}}/find/y/">Y</a>
  <a href="{{uriPrefix}}/{{registryPath}}/find/z/">Z</a>
</div><!-- /alphasearch -->
{% endif %}
{% endif %}

{% if view.canCreateDomainObject %}
  <h3>Register new {{registerName}}</h3>
  <form action="{{uriPrefix}}/{{registryPath}}/create/" method="post
">
    Do you wish to register a new {{domainClassName}}?<br />
    <p>
      <input type="submit" value="Register new {{domainClassName}} &raquo;" />
    </p>
  </form>
  <p class="desc">Fill in the following form to register new {{registerName}}</p>
  <br>
{% endif %}

{% if 0 %}
  <h3>Search {{registerName}}</h3>
  <form action="{{uriPrefix}}/{{registryPath}}/search/" method="post">
    <input type="text" id="domainObject-search-terms" name="userQuery" value="{{ userQuery }}" />
    <input type="submit" name="search" value="Search &raquo;" />
  </form>
  <p class="desc">Please enter a search term and press 'Search'</p>
  <br>
{% endif %}

{% endblock %}

