35 lines
1.2 KiB
HTML
35 lines
1.2 KiB
HTML
|
|
{% extends "base.html" %}
|
||
|
|
|
||
|
|
{% block content %}
|
||
|
|
<div class="section">
|
||
|
|
<h2>Loan History</h2>
|
||
|
|
{% if loans %}
|
||
|
|
<table>
|
||
|
|
<thead>
|
||
|
|
<tr>
|
||
|
|
<th>Tablet</th>
|
||
|
|
<th>Serial Number</th>
|
||
|
|
<th>Borrower</th>
|
||
|
|
<th>Loan Date</th>
|
||
|
|
<th>Return Date</th>
|
||
|
|
<th>Status</th>
|
||
|
|
</tr>
|
||
|
|
</thead>
|
||
|
|
<tbody>
|
||
|
|
{% for loan in loans %}
|
||
|
|
<tr>
|
||
|
|
<td>{{ loan.brand }} {{ loan.model }}</td>
|
||
|
|
<td>{{ loan.serial_number }}</td>
|
||
|
|
<td>{{ loan.name }}</td>
|
||
|
|
<td>{{ loan.loan_date }}</td>
|
||
|
|
<td>{{ loan.return_date or '-' }}</td>
|
||
|
|
<td>{{ loan.status }}</td>
|
||
|
|
</tr>
|
||
|
|
{% endfor %}
|
||
|
|
</tbody>
|
||
|
|
</table>
|
||
|
|
{% else %}
|
||
|
|
<p>No loan history available.</p>
|
||
|
|
{% endif %}
|
||
|
|
</div>
|
||
|
|
{% endblock %}
|