- Add _() translation function to add_tablet.html, add_user.html, loan_tablet.html - Add _() translation function to add_non_loanable_device.html, edit_non_loanable_device.html - Add _() translation function to history.html, non_loanable_devices.html, project_management.html - Update app.py to use cookie-based language persistence with 1-year expiry - Add /set_language endpoint to handle language switching with cookie + session - Update language switcher in base.html to use new endpoint - Set Spanish (es) as default language for internal app - Import make_response and session from Flask
37 lines
1.4 KiB
HTML
37 lines
1.4 KiB
HTML
{% extends "base.html" %}
|
|
|
|
{% block content %}
|
|
<div class="section">
|
|
<h2>{{ _('Loan History') }}</h2>
|
|
{% if loans %}
|
|
<div class="table-container">
|
|
<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>
|
|
</div>
|
|
{% else %}
|
|
<p>{{ _('No loan history available.') }}</p>
|
|
{% endif %}
|
|
</div>
|
|
{% endblock %}
|