<div class="main-card mb-3 card">
<div class="card-body"><h5 class="card-title">E-maile</h5>
<div class="table-responsive">
<table class="mb-0 table">
<thead>
<tr>
<th>#</th>
<th>Tytuł</th>
<th>Nadawca</th>
<th>Data</th>
{% if not detailsView %}
<th>Klient</th>
{% endif %}
</tr>
</thead>
<tbody>
{% for email in emails %}
<tr>
<th scope="row"><a href="{{ 'mailSingle?id=' ~ email.id }}"> {{ email.messageUid }}</a></th>
<td><a href="{{ 'mailSingle?id=' ~ email.id }}">{{ email.subject }}</a></td>
<td><a href="{{ 'mailSingle?id=' ~ email.id }}">{{ email.sender }}</a></td>
<td><a href="{{ 'mailSingle?id=' ~ email.id }}">{{ email.receiveDate }}</a></td>
{% if detailsView %}
{% elseif email.customer==null %}
<td> 'brak'</td>
{% else %}
<td>
<a href="{{ 'details?id=' ~ email.customer.id }}"> {{ email.customer.firstname }} {{ email.customer.lastname }}
({{ email.customer.email }} ,{{ email.customer.id }}) </a></td>
{% endif %}
</tr>
{% endfor %}
{# {% for xpage in xpages %}#}
{# <a {% if not xpage.current %} href="{{ xpage.action }} {% endif %}">{{ xpage.number }}</a> #}
{# {% endfor %}#}
</tbody>
</table>
</div>
</div>
</div>