{% extends "repapp/base.html" %}
{% block title %}
    - Mitarbeiter Login
{% endblock title %}
{% block content %}
    <h1 class="mt-2">
        Mitarbeiter
        {% if user.is_authenticated %}
            Logout
        {% else %}
            Login
        {% endif %}
    </h1>
    <hr class="mt-0 mb-4">
    <div>
        {% if user.is_authenticated %}
            <p>Angemeldeter Benutzer: {{ user.email }}</p>
            <form action="{% url 'oidc_logout' %}" method="post">
                {% csrf_token %}
                <button type="submit" class="btn btn-primary">Abmelden</button>
            </form>
        {% else %}
            <a href="{% url 'oidc_authentication_init' %}">Anmelden mit Makes-Hacks-Hip</a>
        {% endif %}
    </div>
{% endblock content %}
