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

{% block content %}

  <h2>{{domainClassName}} {{domainObjectPersonalLabel}}</h2>

  {% if view.canUpdateDomainObject %}
  <form action="{{uriPrefix}}/{{registryPath}}/update/" method="post">
      <input type="submit" value="Update &raquo;" />
      <br /><br />
  </form>
    {% endif %}
  <form>

  <fieldset>
  {% block fieldset_details_before %}{% endblock %}
  {% block fieldset_details %}
    <legend>
      details
    </legend>
    <ul id="attributes">
  {% block content_prepend_attributes %}{% endblock %}
  {% for namedValue in domainObjectNamedValues %}
    <li>
    <label for="id_{{ namedValue.name }}">
    {% firstof namedValue.title namedValue.name %}
    </label><br />
    <p><b>
    
    {% if namedValue.isDomainObjectRef %}
      {% if namedValue.isSimpleOption %}
      {% firstof namedValue.label "&nbsp;" %}
      {% else %}
    <a href="{{uriPrefix}}/{{namedValue.registryAttrName}}/{{namedValue.value}}/">{{namedValue.label }}</a>
      {% endif %}
    {% else %}
      {% if namedValue.isAssociateList %}
        {% if namedValue.associatedNamedValues %}
          {% for associatedNamedValue in namedValue.associatedNamedValues %}
    <a href="{{uriPrefix}}/{{associatedNamedValue.associatedObject.getRegistryAttrName}}/{{associatedNamedValue.key}}/">{{associatedNamedValue.label }}</a>
          {% endfor %}
        {% else %}
        &nbsp;
        {% endif %}
      {% else %}
      {% firstof namedValue.label "&nbsp;" %}
      {% endif %}
    {% endif %}
    </b></p>
    </li>
  {% endfor %}
    </ul>
  </fieldset>
  {% endblock %}
  {% block fieldset_details_after %}{% endblock %}
  </form>

  {% if view.canUpdateDomainObject %}
  <form action="{{uriPrefix}}/{{registryPath}}/update/" method="post">
    <strong>Do you wish to update this {{domainClassName}}?</strong><br />
    <p>
      <input type="submit" value="Update {{domainClassName}} &raquo;" />
    </p>
  </form>
    {% endif %}
    {% if view.canDeleteDomainObject %}
  <form action="{{uriPrefix}}/{{registryPath}}/delete/" method="post">
    <strong>Do you wish to delete this {{domainClassName}}?</strong><br />
    <p>
      <input type="submit" value="Delete {{domainClassName}} &raquo;" />
    </p>
  </form>
  {% endif %}

{% block read_form_after %}{% endblock %}

{% endblock %}

{% block primarysidebar %}
<div class="box">
  <h2>{{domainObjectPersonalLabel}}</h2>
  <p>
  {% if nextObject %}
  Next: <a href="../{{nextObject.getRegisterKeyValue}}/">{{nextObject.getLabelValue}}</a>
  <br />
  {% else %}
    {% if previousObject %}
  Previous: <a href="../{{previousObject.getRegisterKeyValue}}/">{{previousObject.getLabelValue}}</a>
  <br />
    {% else %}
  This is the only record in the register.
    {% endif %}
  {% endif %}
  </p>
</div>

{% block primarysidebarextn %}{% endblock %}

{% endblock %}

  

