66 lines
3.0 KiB
Twig
66 lines
3.0 KiB
Twig
{% extends 'admin/index.html.twig' %}
|
|
{% block content %}
|
|
<div class="page admin users" data-controller="admin-users">
|
|
<a href="{{ path('app_admin_user_add') }}" class="btn btn-success">Dodaj użytkownika</a>
|
|
<table class="table table-hover table-bordered">
|
|
<thead>
|
|
<tr>
|
|
<th>#</th>
|
|
<td>Nazwa</td>
|
|
<td>Uprawnienia</td>
|
|
<td>Reset hasła</td>
|
|
<td>Usuń</td>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
{% for user in users %}
|
|
<tr>
|
|
<td>{{ loop.index }}</td>
|
|
<td>{{ user.username }}</td>
|
|
<td>
|
|
{% for role in user.getEnumRoles %}
|
|
{{ role.takeLang }},
|
|
{% endfor %}
|
|
</td>
|
|
<td>
|
|
<a href="{{ path('app_admin_user_edit',{id:user.id}) }}" class="btn btn-success">Edytuj Uprawnienia</a>
|
|
</td>
|
|
<td>
|
|
<a href="{{ path('app_admin_user_add_success',{id:user.id}) }}" class="btn btn-primary">Reset hasła</a>
|
|
</td>
|
|
<td>
|
|
<button class="btn btn-danger confirmRemoveUser"
|
|
type="button"
|
|
data-username="{{ user.username }}"
|
|
data-formlink="{{ path('app_admin_user_remove',{id:user.id}) }}"
|
|
data-bs-toggle="modal"
|
|
data-bs-target="#removeConfirmModal"
|
|
>Usuń</button>
|
|
</td>
|
|
</tr>
|
|
{% endfor %}
|
|
</tbody>
|
|
</table>
|
|
<div class="modal fade" id="removeConfirmModal" tabindex="-1" aria-labelledby="removeConfirmModalLabel" aria-hidden="true">
|
|
<div class="modal-dialog">
|
|
<div class="modal-content">
|
|
<div class="modal-header">
|
|
<h1 class="modal-title fs-5" id="removeConfirmModalLabel">Czy na pewno chcesz usunąć konto <strong class="insertUsername"></strong>?</h1>
|
|
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
|
|
</div>
|
|
<div class="modal-body">
|
|
<h3>Tej operacji nie można cofnąć!</h3>
|
|
</div>
|
|
<div class="modal-footer">
|
|
<button type="button" class="btn btn-secondary" data-bs-dismiss="modal">Close</button>
|
|
<form action="" method="post">
|
|
<input type="hidden" name="token" value="{{ csrf_token('admin-remove-user') }}">
|
|
<button type="submit" class="btn btn-danger">Usuń</button>
|
|
</form>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
{% endblock %}
|