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

{% block table_key_name %}
<th>Ethics Code</th>
{% endblock %}

{% block table_head_extn %}
<th>Balance</th>
<th>Principal</th>
<th>Researchers</th>
<th>Projects</th>
{% endblock %}

{% block table_key_value %}
<td>
  <a href="{{uriPrefix}}/{{registryPath}}/{{domainObject.getRegisterKeyValue}}/" title="{{domainObject.getRegisterKeyValue}}">{{domainObject.code}}</a>
</td>
{% endblock %}

{% block table_row_extn %}
<td>
  {{ domainObject.numberRemaining }}
</td>
<td>
  {% for domainObject in domainObject.principalInvestigators %}
    {% if domainObject.researcher.getRegisterKeyValue %}
    <a href="{{uriPrefix}}/researchers/{{domainObject.researcher.getRegisterKeyValue}}/" title="{{domainObject.researcher.getRegisterKeyValue}}">{{domainObject.researcher.getLabelValue}}</a>
    {% endif %}
  {% endfor %}
</td>
<td>
  {% for domainObject in domainObject.additionalResearchers %}
    {% if domainObject.researcher.getRegisterKeyValue %}
    <a href="{{uriPrefix}}/researchers/{{domainObject.researcher.getRegisterKeyValue}}/" title="{{domainObject.researcher.getRegisterKeyValue}}">{{domainObject.researcher.getLabelValue}}</a>
    {% endif %}
  {% endfor %}
</td>
<td>
  {% for domainObject in domainObject.projects %}
    {% if domainObject.project.getRegisterKeyValue %}
    <a href="{{uriPrefix}}/projects/{{domainObject.project.getRegisterKeyValue}}/" title="{{domainObject.project.getRegisterKeyValue}}">{{domainObject.project.getLabelValue}}</a>
    {% endif %}
  {% endfor %}
</td>
{% endblock %}

{% block table_item_delete_btn %}{% endblock %}

