|
26 | 26 |
|
27 | 27 | <hr> |
28 | 28 |
|
29 | | - <table class="table table-striped"> |
30 | | - <thead> |
31 | | - <tr> |
32 | | - <th scope="col">{{ 'Username'|trans }}</th> |
33 | | - <th scope="col">{{ 'Roles'|trans }}</th> |
34 | | - <th scope="col">{{ 'Confirmed'|trans }}</th> |
35 | | - <th scope="col">{{ 'Enabled'|trans }}</th> |
36 | | - <th scope="col"></th> |
37 | | - <th scope="col"></th> |
38 | | - </tr> |
39 | | - </thead> |
40 | | - <tbody> |
| 29 | + <div class="row g-3 mb-4"> |
41 | 30 | {% for user in users %} |
42 | | - <tr> |
43 | | - <th scope="row">{{ user.username }}</th> |
44 | | - <td> |
45 | | - {% for role in user.getDisplayRoles %} |
46 | | - {% if loop.index0 > 0 %},{% endif %} |
47 | | - {{ role|trans }} |
48 | | - {% endfor %} |
49 | | - </td> |
50 | | - <td> |
51 | | - {% if user.confirmed %} |
52 | | - <i class="text-success fas fa-check"></i> |
53 | | - {% else %} |
54 | | - <i class="text-danger fas fa-times"></i> |
55 | | - {% endif %} |
56 | | - </td> |
57 | | - <td> |
58 | | - {% if user.enabled %} |
59 | | - <i class="text-success fas fa-check"></i> |
60 | | - {% else %} |
61 | | - <i class="text-danger fas fa-times"></i> |
62 | | - {% endif %} |
63 | | - </td> |
64 | | - <td> |
65 | | - <a class="text-nowrap" href="{{ path('user_admin_edit', {user: user.id}) }}"> |
66 | | - <i class="fas fa-edit" title="{{ 'Edit user'|trans }}" data-controller="tooltip" data-bs-placement="top"></i> |
67 | | - </a> |
68 | | - </td> |
69 | | - {% if is_granted('ROLE_ADMIN') %} |
70 | | - <td> |
71 | | - <a class="text-nowrap" href="{{ impersonation_path(user.username) }}" data-turbo-prefetch="false"> |
72 | | - <i class="fas fa-sign-in-alt" title="{{ 'Switch to user'|trans }}" data-controller="tooltip" data-bs-placement="top"></i> |
| 31 | + <div class="col-md-6 col-lg-4"> |
| 32 | + <div class="card"> |
| 33 | + <div class="card-body"> |
| 34 | + <h3 class="card-title mb-3">{{ user.username }}</h3> |
| 35 | + <p> |
| 36 | + {{ 'Roles'|trans }}: |
| 37 | + {% for role in user.getDisplayRoles %} |
| 38 | + {{ role|trans }} |
| 39 | + {% if not loop.last %},{% endif %} |
| 40 | + {% endfor %} |
| 41 | + </p> |
| 42 | + <div class="d-flex justify-content-between"> |
| 43 | + <div>{{ 'Confirmed'|trans }}</div> |
| 44 | + <div> |
| 45 | + {% if user.confirmed %} |
| 46 | + <i class="text-success fas fa-check"></i> |
| 47 | + {% else %} |
| 48 | + <i class="text-danger fas fa-times"></i> |
| 49 | + {% endif %} |
| 50 | + </div> |
| 51 | + </div> |
| 52 | + <div class="d-flex justify-content-between"> |
| 53 | + <div>{{ 'Enabled'|trans }}</div> |
| 54 | + <div> |
| 55 | + {% if user.enabled %} |
| 56 | + <i class="text-success fas fa-check"></i> |
| 57 | + {% else %} |
| 58 | + <i class="text-danger fas fa-times"></i> |
| 59 | + {% endif %} |
| 60 | + </div> |
| 61 | + </div> |
| 62 | + </div> |
| 63 | + <div class="card-footer"> |
| 64 | + <a class="text-nowrap btn btn-outline-primary me-3 px-3" href="{{ path('user_admin_edit', {user: user.id}) }}"> |
| 65 | + <i class="fas fa-edit" title="{{ 'Edit user'|trans }}" data-controller="tooltip" data-bs-placement="top"></i> |
73 | 66 | </a> |
74 | | - </td> |
75 | | - {% endif %} |
76 | | - </tr> |
| 67 | + {% if is_granted('ROLE_ADMIN') %} |
| 68 | + <a class="text-nowrap btn btn-outline-primary px-3" href="{{ impersonation_path(user.username) }}" data-turbo-prefetch="false"> |
| 69 | + <i class="fas fa-sign-in-alt" title="{{ 'Switch to user'|trans }}" data-controller="tooltip" data-bs-placement="top"></i> |
| 70 | + </a> |
| 71 | + {% endif %} |
| 72 | + </div> |
| 73 | + </div> |
| 74 | + </div> |
77 | 75 | {% endfor %} |
78 | | - </tbody> |
79 | | - </table> |
| 76 | + </div> |
80 | 77 |
|
81 | 78 | <div class="d-flex justify-content-center"> |
82 | 79 | {{ pagination(users) }} |
|
0 commit comments