63 lines
2.1 KiB
HTML
63 lines
2.1 KiB
HTML
|
|
{% extends "base.html" %}
|
||
|
|
|
||
|
|
{% block content %}
|
||
|
|
<div class="section">
|
||
|
|
<h2>Available Tablets</h2>
|
||
|
|
{% if available_tablets %}
|
||
|
|
<table>
|
||
|
|
<thead>
|
||
|
|
<tr>
|
||
|
|
<th>Brand</th>
|
||
|
|
<th>Model</th>
|
||
|
|
<th>Serial Number</th>
|
||
|
|
<th>Notes</th>
|
||
|
|
</tr>
|
||
|
|
</thead>
|
||
|
|
<tbody>
|
||
|
|
{% for tablet in available_tablets %}
|
||
|
|
<tr>
|
||
|
|
<td>{{ tablet.brand }}</td>
|
||
|
|
<td>{{ tablet.model }}</td>
|
||
|
|
<td>{{ tablet.serial_number }}</td>
|
||
|
|
<td>{{ tablet.notes or '-' }}</td>
|
||
|
|
</tr>
|
||
|
|
{% endfor %}
|
||
|
|
</tbody>
|
||
|
|
</table>
|
||
|
|
{% else %}
|
||
|
|
<p>No available tablets.</p>
|
||
|
|
{% endif %}
|
||
|
|
</div>
|
||
|
|
|
||
|
|
<div class="section">
|
||
|
|
<h2>Active Loans</h2>
|
||
|
|
{% if active_loans %}
|
||
|
|
<table>
|
||
|
|
<thead>
|
||
|
|
<tr>
|
||
|
|
<th>Tablet</th>
|
||
|
|
<th>Serial Number</th>
|
||
|
|
<th>Borrower</th>
|
||
|
|
<th>Loan Date</th>
|
||
|
|
<th>Actions</th>
|
||
|
|
</tr>
|
||
|
|
</thead>
|
||
|
|
<tbody>
|
||
|
|
{% for loan in active_loans %}
|
||
|
|
<tr>
|
||
|
|
<td>{{ loan.brand }} {{ loan.model }}</td>
|
||
|
|
<td>{{ loan.serial_number }}</td>
|
||
|
|
<td>{{ loan.name }}</td>
|
||
|
|
<td>{{ loan.loan_date }}</td>
|
||
|
|
<td>
|
||
|
|
<a href="/return_tablet/{{ loan.id }}" class="btn btn-danger">Return</a>
|
||
|
|
</td>
|
||
|
|
</tr>
|
||
|
|
{% endfor %}
|
||
|
|
</tbody>
|
||
|
|
</table>
|
||
|
|
{% else %}
|
||
|
|
<p>No active loans.</p>
|
||
|
|
{% endif %}
|
||
|
|
</div>
|
||
|
|
{% endblock %}
|