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

{% block content %}

  {% if showRegisterSearch %}
<div style="float: right;">
  <form action="{{uriPrefix}}/{{registryPath}}/search/" method="post">
    <input type="text" id="user-search-terms" name="userQuery"
      value="{{ userQuery }}" />
    <input type="submit" name="search" value="Search &raquo;" />
  </form>
</div>
  {% endif %}

  {% block content_title %}<h2>{{registerNameTitle}}</h2>{% endblock %}
  
 <div id="register-table">

  {% block table_comment %}
  

    {% block table_comment_before %}{% endblock %}

    {% if isCountZero %}
  <p>There are no {{registerName}} at this time.</p>
    {% else %}
      {% if isCountSingle %}
  <p>There is one {{domainClassName}}.</p>
      {% else %}
  <p>
    There are {{ objectCount }} {{registerName}}.
        {% if view.hasListallPage and showRegisterAllLink %}
    <a href="{{uriPrefix}}/{{registryPath}}/listall/">View full list.</a>
        {% endif %}
  </p>
      {% endif %}
    {% endif %}

    {% block table_comment_after %}{% endblock %}

  {% endblock %}

  {% if showRegisterIndex %}

<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/w/">W</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>
  <a href="{{uriPrefix}}/{{registryPath}}/find/0/">0</a>
  <a href="{{uriPrefix}}/{{registryPath}}/find/1/">1</a>
  <a href="{{uriPrefix}}/{{registryPath}}/find/2/">2</a>
  <a href="{{uriPrefix}}/{{registryPath}}/find/3/">3</a>
  <a href="{{uriPrefix}}/{{registryPath}}/find/4/">4</a>
  <a href="{{uriPrefix}}/{{registryPath}}/find/5/">5</a>
  <a href="{{uriPrefix}}/{{registryPath}}/find/6/">6</a>
  <a href="{{uriPrefix}}/{{registryPath}}/find/7/">7</a>
  <a href="{{uriPrefix}}/{{registryPath}}/find/8/">8</a>
  <a href="{{uriPrefix}}/{{registryPath}}/find/9/">9</a>
</div><!-- /alphasearch -->
  {% endif %}

  {% if showRegisterTable %}
<table>
  <tr>
    {% block table_key_name %}<th>{{domainClassName}}</th>{% endblock %}
    {% block table_head_extn %}{% endblock %} 
    {% if view.canUpdateDomainObject %}
    <th>Actions</th>
    {% endif %}
  </tr>
    {% for domainObject in domainObjectList %}
  <tr{% block is_domain_object_inactive%}{% endblock %}>
      {% block table_key_value %}
    <td>
      <a href="{{uriPrefix}}/{{registryPath}}/{{domainObject.getRegisterKeyValue}}/" title="{{domainObject.getRegisterKeyValue}}">{{domainObject.getLabelValue}}</a>
    </td>
      {% endblock %}
      {% block table_row_extn %}{% endblock %}
      {% if view.canUpdateDomainObject %}
    <td><nobr>
        {% block table_item_update_btn %}
      <a href="{{uriPrefix}}/{{registryPath}}/{{domainObject.getRegisterKeyValue}}/update/" title="Update"><img height="20" width="20" src="http://{{ systemMediaSocket }}{{ mediaPrefix }}/images/icon-edit.png" alt="Update"/></a>
        {% endblock %}
        {% block table_item_delete_btn %}
          {% if view.canDeleteDomainObject %}
      <a href="{{uriPrefix}}/{{registryPath}}/{{domainObject.getRegisterKeyValue}}/delete/" title="{{domainObject.getRegisterKeyValue}}" title="Delete">
        <img height="20" width="20" src="http://{{ systemMediaSocket }}{{ mediaPrefix }}/images/icon-delete.png" alt="Delete" />
      </a>
          {% endif %}
        {% endblock %}
        {% block table_item_actions_extn %}{% endblock %}
    </nobr></td>
      {% endif %}
  </tr>
    {% endfor %}
</table>
  {% endif %}
</div>

  {% block creation %}
    {% 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 %}
  {% endblock %}

{% endblock %}

