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

{% block content %}

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

{% if hasManyValueLabels %}
<p>
  Here are all the {{hasManyName}} of <a href="{{uriPrefix}}/admin/model/{{domainClassName}}/{{domainObjectKey}}/"><strong>{{domainObject.getLabelValue}}</strong></a>.
</p>
<table>
  <tr>
    <th>{{hasManyClassName}}</th>
    <th>Actions</th>
  </tr>
  {% for item in hasManyValueLabels %}
  <tr>
    <td>
      <a href="{{uriPrefix}}/admin/model/{{domainClassName}}/{{domainObjectKey}}/{{hasManyName}}/{{ item.value }}/">{{ item.label }}</a>
    </td>
    <td>
      <a href="{{uriPrefix}}/admin/model/delete/{{domainClassName}}/{{domainObjectKey}}/{{hasManyName}}/{{item.value}}/" title="Delete this {{hasManyClassName}} ({{item.value}})">
        <img height="20" width="20" src="http://{{ systemMediaSocket }}{{ mediaPrefix }}/images/icon-delete.png" alt="Delete" />
      </a>
      &nbsp;
      <a href="{{uriPrefix}}/admin/model/update/{{domainClassName}}/{{domainObjectKey}}/{{hasManyName}}/{{item.value}}/" title="Update this {{hasManyClassName}} ({{item.value}})">
        <img height="20" width="20" src="http://{{ systemMediaSocket }}{{ mediaPrefix }}/images/icon-edit.png" alt="Update" />
      </a>
    </td>
  </tr>
  {% endfor %}
</table>
{% else %}
<p>
  There are no {{hasManyName}} for <a href="{{uriPrefix}}/admin/model/{{domainClassName}}/{{domainObjectKey}}/"><strong>{{domainObject.getLabelValue}}</strong></a> at this time.
</p>
{% endif %}

<form action="{{uriPrefix}}/admin/model/create/{{domainClassName}}/{{domainObjectKey}}/{{hasManyName}}/" method="post">
  <input type="submit" value="Create {{hasManyClassName}} &raquo;">
</form>

{% endblock %}

