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

{% block content %}

<h2>{{domainClassName}} {{domainObject.getLabelValue}} {{hasManyName}} {{hasManyKey}}</h2>

<p>
  Recorded in <a href="{{uriPrefix}}/admin/model/{{domainClassName}}/{{domainObjectKey}}/"><b>{{domainObject.getLabelValue}}</b></a>'s register of <a href="{{uriPrefix}}/admin/model/{{domainClassName}}/{{domainObjectKey}}/{{hasManyName}}/"><b>{{hasManyName}}</b></a> as {{hasManyKey}}.
  <br>
  Recorded in the <a href="{{uriPrefix}}/admin/model/{{hasManyClassName}}/"><b>{{hasManyClassName}}</b></a> register as <a href="{{uriPrefix}}/admin/model/{{hasManyClassName}}/{{associationObject.getRegisterKeyValue}}/"><b>{{ associationObject.getLabelValue }}</b></a>.
  <br>
</p>

<form>
  <fieldset>
    <legend>
      {{hasManyKey}}
    </legend>
  {% for namedValue in associationObjectNamedValues %}
    <label>
    {{ namedValue.name }}
    </label><br />
    <p><b>
    {% if namedValue.isDomainObjectRef %}
        <a href="{{uriPrefix}}/admin/model/{{namedValue.typeName}}/{{namedValue.value}}/">{{namedValue.label}}</a>
    {% else %}{% if namedValue.isAssociateList %}
        <a href="{{uriPrefix}}/admin/model/{{associationObject.meta.name}}/{{associationObject.getRegisterKeyValue}}/{{namedValue.name}}/">{{namedValue.label}}</a>
    {% else %}
        {{ namedValue.value }}
    {% endif %}
    {% endif %}
    </b></p>
  {% endfor %}
  </fieldset>
</form>

<form action="{{uriPrefix}}/admin/model/update/{{domainClassName}}/{{domainObjectKey}}/{{hasManyName}}/{{hasManyKey}}/" method="post">
  <input type="submit" value="Update {{hasManyClassName}} &raquo;">
</form>
<form action="{{uriPrefix}}/admin/model/delete/{{domainClassName}}/{{domainObjectKey}}/{{hasManyName}}/{{hasManyKey}}/" method="post">
  <input type="submit" value="Delete {{hasManyClassName}} &raquo;">
</form>
{% endblock %}

