theraPy/templates/result.html

51 lines
2.2 KiB
HTML
Raw Normal View History

2024-08-26 21:05:34 +02:00
{% extends "base.html" %}
{% block content %}
<div class="container">
<div class="row">
<div class="col-lg-12 col-md-11 col-sm-10">
2024-08-26 21:05:34 +02:00
<h2>Suchergebnisse</h2>
2024-09-07 21:12:55 +02:00
{% if doctors is defined and doctors|length %}
2024-08-26 21:05:34 +02:00
<table class="table table-hover">
<thead>
<tr>
2024-08-28 10:08:46 +02:00
<th scope="col">Index</th>
2024-08-26 21:05:34 +02:00
<th scope="col">Name</th>
<th scope="col">Nächster Telefontag</th>
<th scope="col">Nächste Telefonzeit</th>
<th scope="col">Telefonnummer</th>
<th scope="col">Adresse</th>
</tr>
</thead>
<tbody>
{% set day_classes = {
"1": "table-secondary",
"2": "table-success",
"3": "table-info",
"4": "table-light",
"5": "table-primary",
} %}
2024-08-26 21:05:34 +02:00
{% for doctor in doctors %}
<tr class="{{ day_classes.get(doctor.phone_time.start.strftime("%w")) }}">
<th scope="row">{{ doctor.doctor_nr }}</th>
<th scope="row">{{ doctor.doctor_name }}</th>
<td>{{ doctor.phone_time.start.strftime("%A %d.%m") }}</td>
<td>{{ doctor.phone_time.start.strftime("%H:%M") }}
bis {{ doctor.phone_time.end.strftime("%H:%M") }}</td>
<td>{{ doctor.doctor_phone_number }}</td>
<td>{{ doctor.doctor_address }}</td>
</tr>
2024-08-26 21:05:34 +02:00
{% endfor %}
</tbody>
</table>
2024-09-07 21:12:55 +02:00
{% else %}
<div class="alert alert-dismissible alert-primary">
<strong>Keine Telefonzeiten mit gegebenen Daten gefunden</strong>
<a href="/" class="alert-link">Zurück zur Suche</a>, um es erneut zu versuchen
</div>
{% endif %}
2024-08-26 21:05:34 +02:00
</div>
</div>
</div>
{% endblock %}