75 lines
3.7 KiB
Django/Jinja
75 lines
3.7 KiB
Django/Jinja
{% extends 'realm/realm_detailed.jinja2' %}
|
|
{% import 'macros/form_macros.jinja2' as mform %}
|
|
|
|
{% block detail_content %}
|
|
<h3>{{ user.username }}</h3>
|
|
{% if not form %}
|
|
<ul class="list-group list-group-flush w-100">
|
|
<li class="list-group-item">Ldap Domain: {{ user.dn }}</li>
|
|
<li class="list-group-item"> Anzeigename:
|
|
{% if user.display_name %}
|
|
{{ user.display_name }}
|
|
{% else %}
|
|
<span class="text-warning"> Noch nicht generiert </span>
|
|
{% endif %}
|
|
</li>
|
|
<li class="list-group-item">Vorname: {{ user.first_name }}</li>
|
|
<li class="list-group-item">Nachname: {{ user.last_name }}</li>
|
|
<li class="list-group-item">Email: {{ user.email }}</li>
|
|
<li class="list-group-item">Passwort: <a
|
|
href="{{ url('realm-user-password-reset', args = [realm.id, user.dn]) }}" class="float-right">Nutzerpasswort
|
|
zurücksetzen</a></li>
|
|
<li class="list-group-item">Telefon: {{ user.phone }}</li>
|
|
<li class="list-group-item">Mobiltelefon: {{ user.mobile_phone }}</li>
|
|
<li class="list-group-item">Gruppen:
|
|
{% if groups %}
|
|
{% for group in groups %}
|
|
<a href="{{ url('realm-group-detail', args=[realm.id, group.dn]) }}"
|
|
data-toggle="tooltip"
|
|
data-placement="right"
|
|
title="{{ group.description }}"
|
|
class="badge badge-secondary p-1">{{ group.name }}</a>
|
|
{% endfor %}
|
|
{% else %}
|
|
<span class="text-warning">Keine zugewiesen</span>
|
|
{% endif %}
|
|
<a href="{{ url('realm-user-group-update', args=[realm.id, user.dn]) }}" class="float-right">
|
|
Gruppen zuweisen</a>
|
|
</li>
|
|
<li class="list-group-item">Zuletzt eingeloggt:
|
|
{% if user.last_login %}
|
|
{{ user.last_login.strftime('%d.%m.%Y') }}
|
|
{% else %}
|
|
<i class="far fa-times-circle text-danger"></i><span class="d-none">+</span>
|
|
{% endif %}</li>
|
|
</ul>
|
|
<div class="d-flex mt-3">
|
|
<a href="{{ url('realm-user-update', args = [realm.id, user.dn]) }}" class="btn btn-primary mr-auto p-2">
|
|
<i class="fas fa-user-cog"></i> Nutzer bearbeiten
|
|
</a>
|
|
{% if not user.last_login %}
|
|
<a href="{{ url('realm-user-resend-welcome-mail', args = [realm.id, user.dn]) }}"
|
|
class="btn btn-secondary p-2 mr-2">
|
|
<i class="fas fa-paper-plane"></i> Wilkommensmail erneut senden
|
|
</a>
|
|
{% endif %}
|
|
<a href="{{ url('realm-user-delete-confirm', args = [realm.id, user.dn]) }}" class="btn btn-danger p-2">
|
|
<i class="fas fa-trash"></i> Nutzer löschen
|
|
</a>
|
|
</div>
|
|
{% else %}
|
|
<form method="post">
|
|
<input type="hidden" name="csrfmiddlewaretoken" value="{{ csrf_token }}">
|
|
{{ mform.text_input(form.username) }}
|
|
{{ mform.email_input(form.email) }}
|
|
{{ mform.text_input(form.first_name) }}
|
|
{{ mform.text_input(form.last_name) }}
|
|
<div class="d-flex mt-4">
|
|
<button type="submit" class="btn btn-primary mr-auto p-2">Speichern</button>
|
|
<a href="{{ url('realm-user-detail', args = [realm.id, user.dn]) }}"
|
|
class="btn btn-secondary p-2">Abbrechen</a>
|
|
</div>
|
|
</form>
|
|
{% endif %}
|
|
{% endblock %}
|