Files
myep/templates/admin/user/modal_permissions.html.twig
T

57 lines
2.2 KiB
Twig
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
{% extends 'htmx_modal_admin.html.twig' %}
{% block title %}
Berechtigungen
{% endblock %}
{% block content %}
<div class="pb-4 text-sm text-gray-500">
{{ user.email }}
</div>
<div class="font-bold pb-2">Aus BusPro</div>
<div class="pb-6 text-sm text-gray-500">
<dl class="grid grid-cols-[8rem_1fr] gap-y-1">
<dt>Rollen</dt>
<dd>{{ user.roles | effective_roles | join(', ') | default('') }}</dd>
<dt>Häuser</dt>
<dd>{{ user.hotelCodes | join(', ') | default('') }}</dd>
<dt>Letzter Login</dt>
<dd>{{ user.lastLoginAt ? user.lastLoginAt | date('d.m.Y, H:i') : '' }}</dd>
</dl>
<p class="pt-2">
Rollen und Häuser werden bei jeder Anmeldung aus BusPro übernommen und lassen sich hier nicht ändern.
</p>
</div>
<div class="font-bold pb-2">Freischaltung</div>
{% if approvableRoles is empty and selfRefusedRoles is empty %}
<div class="text-sm text-gray-500">
Keine offenen Freischaltungen.
</div>
{% else %}
<div class="text-sm text-gray-500 pb-4">
BusPro meldet diese Rollen für den Account. Sie sind erst nach der Freischaltung wirksam.
</div>
{% if approvableRoles is not empty %}
<div class="flex flex-wrap gap-2">
{% for role, label in approvableRoles %}
<button type="button"
class="button button--primary button--small"
hx-get="{{ path('app_admin_user_approve_role', { id: user.id, role: role, r: returnUrl }) }}"
hx-target="body"
hx-swap="beforeend">
{{ label }} freischalten
</button>
{% endfor %}
</div>
{% endif %}
{% if selfRefusedRoles is not empty %}
<div class="text-sm text-gray-500 pt-4">
{{ selfRefusedRoles | join(', ') }}: diese Rolle kannst du dir nicht selbst freischalten.
Bitte wende dich an eine:n andere:n Administrator:in.
</div>
{% endif %}
{% endif %}
{% endblock %}