126 lines
6.0 KiB
Twig
126 lines
6.0 KiB
Twig
{% extends 'administrative/layout.html.twig' %}
|
|
|
|
{% block title %}Teamübersicht{% endblock %}
|
|
|
|
{% block content %}
|
|
<div class="flex items-start justify-between pb-4">
|
|
<h1 class="text-2xl font-bold">
|
|
Teamübersicht
|
|
</h1>
|
|
<div class="flex flex-col items-end space-y-2 md:flex-row md:items-center md:space-x-2 md:space-y-0">
|
|
<button type="button"
|
|
class="{{ html_classes('btn btn--small', { 'btn--secondary': filterDto.active }) }}"
|
|
title="Team filtern"
|
|
hx-get="{{ path('app_common_teamer_filter', { 'r': return_url() }) }}"
|
|
hx-target="body"
|
|
hx-swap="beforeend">
|
|
{{ icon('filter', 'w-4 h-4 shrink-0') }}
|
|
{% if filterDto.active %}
|
|
<span class="whitespace-nowrap">{{ filterDto.activeFiltersCount }} Filter aktiv</span>
|
|
{% else %}
|
|
<span>Filter</span>
|
|
{% endif %}
|
|
</button>
|
|
{% if filterDto.active %}
|
|
<a href="{{ path('app_common_teamer_filter_reset', { 'r': return_url() }) }}" class="btn btn--small btn--secondary">
|
|
Reset
|
|
</a>
|
|
{% endif %}
|
|
</div>
|
|
</div>
|
|
<div class="data-table-wrapper">
|
|
<div class="data-table-wrapper__inner">
|
|
<table class="data-table">
|
|
<thead>
|
|
<tr>
|
|
<th></th>
|
|
<th>
|
|
{{ knp_pagination_sortable(pagination, 'Name', 'teamer.lastName') }}
|
|
</th>
|
|
<th>
|
|
Vorname
|
|
</th>
|
|
<th>
|
|
{{ knp_pagination_sortable(pagination, 'Status', 'teamer.status') }}
|
|
</th>
|
|
<th>
|
|
{{ knp_pagination_sortable(pagination, 'E-Mail', 'teamer.communication.email') }}
|
|
</th>
|
|
<th>
|
|
{{ knp_pagination_sortable(pagination, 'Letzter Login', 'user.lastLoginAt') }}
|
|
</th>
|
|
<th></th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
{% for teamer in pagination %}
|
|
<tr>
|
|
<td>
|
|
<div class="flex flex-col items-center space-y-2">
|
|
{% if teamer.photo %}
|
|
<img src="{{ asset(teamer.photo.filename | imagine_filter('profile')) }}"
|
|
class="w-12 h-auto rounded-full"
|
|
alt="{{ teamer.firstName }}">
|
|
{% else %}
|
|
<div class="flex flex-col items-center justify-center w-12 h-12 border-2 border-gray-200 rounded-full">
|
|
{{ icon('user', 'w-10 h-10 text-gray-200') }}
|
|
</div>
|
|
{% endif %}
|
|
<twig:RatingStars rating="{{ teamer.averageRating }}" />
|
|
</div>
|
|
</td>
|
|
<td>
|
|
<a href="{{ path('app_administrative_teamer_profile', { 'uuid': teamer.uuid, 'r': return_url() }) }}">
|
|
<span class="whitespace-nowrap">{{ teamer.lastName }}</span>
|
|
</a>
|
|
</td>
|
|
<td>
|
|
<a href="{{ path('app_administrative_teamer_profile', { 'uuid': teamer.uuid, 'r': return_url() }) }}" class="whitespace-nowrap">
|
|
{{ teamer.firstName }}
|
|
</a>
|
|
</td>
|
|
<td>
|
|
{{ teamer|teamer_status_label }}
|
|
</td>
|
|
<td>
|
|
{{ teamer.communication.email }}
|
|
</td>
|
|
<td>
|
|
{% if teamer.user is not null and teamer.user.lastLoginAt is not null %}
|
|
{{ teamer.user.lastLoginAt | date('d.m.Y') }}
|
|
{% else %}
|
|
-
|
|
{% endif %}
|
|
</td>
|
|
<td>
|
|
<div class="flex items-center space-x-1 justify-end">
|
|
{% if not teamer.viewed %}
|
|
<button type="button"
|
|
hx-post="{{ path('app_administrative_teamer_viewed', { 'uuid': teamer.uuid }) }}"
|
|
title="Teamer als gesichtet markieren">
|
|
{{ icon('check') }}
|
|
</button>
|
|
{% endif %}
|
|
{% if is_granted('CAN_IMPERSONATE', teamer.user) %}
|
|
<a href="{{ path('app_teamer_index', { '_switch_user': teamer.user.email }) }}" title="Als Teamer:in maskieren">
|
|
{{ icon('mask') }}
|
|
</a>
|
|
{% endif %}
|
|
<a href="{{ path('app_administrative_teamer_profile', { 'uuid': teamer.uuid, 'r': return_url() }) }}" title="Teamer:innenprofil {{ teamer }}">
|
|
{{ icon('user') }}
|
|
</a>
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
{% else %}
|
|
<td colspan="7">
|
|
Keine Daten...
|
|
</td>
|
|
{% endfor %}
|
|
</tbody>
|
|
</table>
|
|
{{ knp_pagination_render(pagination) }}
|
|
</div>
|
|
</div>
|
|
{% endblock %}
|