Initial
This commit is contained in:
27
app/base/templates/widgets/alerts.html
Executable file
27
app/base/templates/widgets/alerts.html
Executable file
@@ -0,0 +1,27 @@
|
||||
{% if object.note %}
|
||||
<div class="alert alert-warning d-flex">
|
||||
<span><i class="far fa-message"></i></span>
|
||||
<span class="raw-text ml-2">{{ object.note }}</span>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% if object.agreed_to_terms_of_service is False %}
|
||||
<div class="alert alert-warning">
|
||||
<span>Hat noch nicht in die Nutzungsbedingungen eingewilligt!</span>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% if object.identified is False %}
|
||||
<div class="alert alert-warning">
|
||||
<span>Hat noch kein Ausweisdokument vorgelegt!</span>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% if object.missing_courses|length > 0 %}
|
||||
<div class="alert alert-warning">
|
||||
<span>Es fehlen noch folgende Einweisungen:</span>
|
||||
<hr>
|
||||
<ul>
|
||||
{% for course in object.missing_courses %}
|
||||
<li>{{ course.title }} <a href="{% url 'course-visit:create' %}?user={{ object.pk }}&course={{ course.pk }}&prev={{request.path}}">(hinzufügen)</a></li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</div>
|
||||
{% endif %}
|
||||
22
app/base/templates/widgets/checkin-status.html
Executable file
22
app/base/templates/widgets/checkin-status.html
Executable file
@@ -0,0 +1,22 @@
|
||||
{% load field_utils %}
|
||||
|
||||
<div class="text-center">
|
||||
{% if user.current_checkin %}
|
||||
<div id="checkin-timer" class="text-green mb-3" data-since="{{ user.current_checkin.begin_time|date:'r' }}">0h 0min 0s</div>
|
||||
<div class="checkin-title mb-3"><i class="fas fa-circle text-green"></i> {{ user.first_name }} ist in der Werkstatt.</div>
|
||||
<a class="btn btn-primary btn-block" href="{% url 'toggle-checkin' user.id %}?next={{ request.path }}">{{ user.first_name }} auschecken</a>
|
||||
{% else %}
|
||||
<div class="checkin-title mb-3"><i class="fas fa-circle text-red"></i> {{ user.first_name }} ist zuhause.</div>
|
||||
<form method="GET" action="{% url 'toggle-checkin' user.id %}">
|
||||
<div class="form-group">
|
||||
<label for="plan-select">Tarif:</label>
|
||||
<select class="custom-select mb-2" id="plan-select" name="plan">
|
||||
<option value="basic" selected>BASIC</option>
|
||||
<option value="plus">PLUS</option>
|
||||
</select>
|
||||
<input type="hidden" name="next" value="{{ request.path }}">
|
||||
</div>
|
||||
<button type="submit" class="btn btn-primary btn-block">{{ user.first_name }} einchecken</button>
|
||||
</form>
|
||||
{% endif %}
|
||||
</div>
|
||||
16
app/base/templates/widgets/note-modal.html
Executable file
16
app/base/templates/widgets/note-modal.html
Executable file
@@ -0,0 +1,16 @@
|
||||
<div id="note-modal" class="modal fade">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<form method="POST" action="{% url 'update-note' object.pk %}">
|
||||
{% csrf_token %}
|
||||
<div class="modal-body">
|
||||
<textarea name="text" rows="4" class="form-control" placeholder="(keine Notiz)" autocomplete="off">{{ object.note }}</textarea>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-secondary" onclick="showNoteModal(false)">Abbrechen</button>
|
||||
<button type="submit" class="btn btn-primary">Notiz speichern</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
13
app/base/templates/widgets/table_filter.html
Normal file
13
app/base/templates/widgets/table_filter.html
Normal file
@@ -0,0 +1,13 @@
|
||||
{% load utils %}
|
||||
{% load url_utils %}
|
||||
|
||||
{% if list_filter.user and request.GET.user %}
|
||||
{% lookup_user request.GET.user as usr %}
|
||||
{% elif list_filter.teacher and request.GET.teacher %}
|
||||
{% lookup_user request.GET.teacher as usr %}
|
||||
{% endif %}
|
||||
|
||||
{% if usr %}
|
||||
<h4>Filter: <a href="{{ usr.get_absolute_url }}">{{ usr }}</a></h4>
|
||||
Filter aufheben: <a href=".">alle anzeigen</a>
|
||||
{% endif %}
|
||||
4
app/base/templates/widgets/title-with-icon.html
Normal file
4
app/base/templates/widgets/title-with-icon.html
Normal file
@@ -0,0 +1,4 @@
|
||||
<div class="h1-w-icon">
|
||||
<i class="fas fa-{{ icon }}"></i>
|
||||
<h1>{{ title }}</h1>
|
||||
</div>
|
||||
Reference in New Issue
Block a user