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

{% block is_domain_object_inactive %}
  {% if domainObject.isInactive %} class="record-inactive"{% endif %}
{% endblock %}

{% block table_head_extn %}
<th>Scans</th>
<th>Last</th>
<th>Age</th>
<th>Date of Birth</th>
<th>Hand</th>
<th>Lang</th>
{% endblock %}

{% block table_row_extn %}
  <td>
    {{ domainObject.scanningSessions.count }}
  </td>
  <td>
    <a href="{{uriPrefix}}/scanningSessions/{{domainObject.lastScan.getRegisterKeyValue}}/" title="{{domainObject.lastScan.getRegisterKeyValue}}"><nobr>{{ domainObject.lastScan.present.starts }}</nobr></a>
  </td>

<td>{{domainObject.age}}</td>
<td>{{domainObject.present.dateOfBirth}}</td>
<td>{{domainObject.hand}}</td>
<td>{{domainObject.language}}</td>
{% endblock %}


{% block table_item_delete_btn %}{% endblock %}

{% block table_item_actions_extn %}
  {% if view.canUpdateDomainObject %}
    {% if not domainObject.onHitlist %}
<a href="{{uriPrefix}}/{{registryPath}}/hitlist/{{domainObject.getRegisterKeyValue}}/add/" title="Add to Hitlist"><img height="20" width="20" src="{{ mediaPrefix }}/images/icon-hitlist-add.png" alt="Add to Hitlist"/></a>
    {% else %}
<a href="{{uriPrefix}}/{{registryPath}}/hitlist/{{domainObject.getRegisterKeyValue}}/remove/" title="Remove from Hitlist "><img height="20" width="20" src="{{ mediaPrefix }}/images/icon-hitlist-remove.png" alt="Remove from Hitlist"/></a>
    {% endif %}
  {% endif %}
  {% if not domainObject.isInactive %}
    {% if view.canCreateVolunteerScanningAppointment %}
<a href="{{uriPrefix}}/{{registryPath}}/booking/{{domainObject.getRegisterKeyValue}}/" title="Book scanning session"><img height="20" width="20" src="{{ mediaPrefix }}/images/icon-booking.png" alt="Book scan"/></a>
    {% endif %}
  {% endif %}
{% endblock %}

