link settings page
This commit is contained in:
parent
10a4faa2e0
commit
ad52056977
4 changed files with 76 additions and 3 deletions
|
|
@ -1,12 +1,16 @@
|
|||
{% extends "repapp/base.html" %}
|
||||
{% load crispy_forms_tags %}
|
||||
{% block title %}
|
||||
- Eintellungen
|
||||
- Einstellungen
|
||||
{% endblock title %}
|
||||
{% block page_title %}
|
||||
Eintellungen
|
||||
Einstellungen
|
||||
{% endblock page_title %}
|
||||
{% block content %}
|
||||
<p>
|
||||
<a onclick="history.back()" class="btn btn-primary">Zurück</a>
|
||||
</p>
|
||||
<p>User: {{ user.email }}</p>
|
||||
<form action="{% url 'member_settings' %}"
|
||||
method="post"
|
||||
enctype="multipart/form-data">
|
||||
|
|
|
|||
|
|
@ -11,6 +11,7 @@
|
|||
<a href="{% url 'cafe' %}" class="btn btn-primary">Repair-Cafés</a>
|
||||
<a href="{% url 'guest' %}" class="btn btn-primary">Gäste</a>
|
||||
<a href="{% url 'device_questions' %}" class="btn btn-primary">Rückfragen</a>
|
||||
<a href="{% url 'member_settings' %}" class="btn btn-primary">Einstellungen</a>
|
||||
</p>
|
||||
<hr class="mt-0 mb-4">
|
||||
<h1 class="mt-2">Repair-Cafés</h1>
|
||||
|
|
|
|||
|
|
@ -7,4 +7,65 @@
|
|||
Reparateur
|
||||
{% endblock page_title %}
|
||||
{% block content %}
|
||||
<p>
|
||||
<a href="{% url 'member_settings' %}" class="btn btn-primary">Einstellungen</a>
|
||||
</p>
|
||||
<hr class="mt-0 mb-4">
|
||||
<h1 class="mt-2">Repair-Cafés</h1>
|
||||
<table class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th scope="col">Datum</th>
|
||||
<th scope="col">Ort</th>
|
||||
<th scope="col">Teilnahmen zugesagt?</th>
|
||||
<th scope="col"></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for cafe in cafes %}
|
||||
<tr>
|
||||
<td>{{ cafe.event_date|date:"l" }}, {{ cafe.event_date|date }}</td>
|
||||
<td>{{ cafe.location }}</td>
|
||||
<td>Nein</td>
|
||||
<td>
|
||||
<a href="" class="btn btn-primary">teilnehmen</a>
|
||||
</td>
|
||||
</tr>
|
||||
{% empty %}
|
||||
<tr>
|
||||
<td colspan="4">Es gibt keine Repair-Cafés.</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
<hr class="mt-0 mb-4">
|
||||
<h1 class="mt-2">Geräte</h1>
|
||||
<table class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th scope="col">Art des Geräts</th>
|
||||
<th scope="col">Hersteller & Modell/Typ</th>
|
||||
<th scope="col">Repair-Café</th>
|
||||
<th scope="col">Ort</th>
|
||||
<th scope="col"></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for device in devices %}
|
||||
<tr>
|
||||
<td>{{ device.device }}</td>
|
||||
<td>{{ device.manufacturer }}</td>
|
||||
<td>{{ device.cafe.event_date|date:"l" }}, {{ device.cafe.event_date|date }}</td>
|
||||
<td>{{ device.cafe.location }}</td>
|
||||
<td>
|
||||
<a href="" class="btn btn-primary">Details</a>
|
||||
</td>
|
||||
</tr>
|
||||
{% empty %}
|
||||
<tr>
|
||||
<td colspan="4">Es gibt kein Geräte.</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
{% endblock content %}
|
||||
|
|
|
|||
|
|
@ -782,9 +782,16 @@ def repa(request):
|
|||
logger.warning('The user %s is no reparateur!', str(request.user))
|
||||
raise PermissionDenied('Not reparateur!')
|
||||
|
||||
cafes = Cafe.objects.filter(event_date__gte=datetime.date.today())
|
||||
devices = Device.objects.filter(status=3)
|
||||
|
||||
return render(
|
||||
request,
|
||||
"repapp/repa/main.html"
|
||||
"repapp/repa/main.html",
|
||||
{
|
||||
'cafes': cafes,
|
||||
'devices': devices,
|
||||
}
|
||||
)
|
||||
|
||||
|
||||
|
|
|
|||
Reference in a new issue