116 lines
5.3 KiB
Twig
116 lines
5.3 KiB
Twig
{% extends 'admin/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 }) }}"
|
|
{{ stimulus_controller('modal-button', [], [], {'ajax-modal': '#ajax-modal'}) }}
|
|
{{ stimulus_action('modal-button', 'ajax', null, {
|
|
'title': 'Team filtern',
|
|
'url': path('app_common_teamer_filter', { 'r': return_url() })
|
|
}) }}>
|
|
<div class="flex items-center space-x-1">
|
|
{{ 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 %}
|
|
</div>
|
|
</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 %}
|
|
{% include '_partials/_rating_stars.html.twig' with { 'teamer': teamer } %}
|
|
</div>
|
|
</td>
|
|
<td>
|
|
<a href="{{ path('app_admin_teamer_profile', { 'uuid': teamer.uuid }) }}">
|
|
<span class="whitespace-nowrap">{{ teamer.lastName }}</span>
|
|
</a>
|
|
</td>
|
|
<td>
|
|
<a href="{{ path('app_admin_teamer_profile', { 'uuid': teamer.uuid }) }}" class="whitespace-nowrap">
|
|
{{ teamer.firstName }}
|
|
</a>
|
|
</td>
|
|
<td>
|
|
{{ teamer.status|teamer_status_label }}
|
|
</td>
|
|
<td>
|
|
{{ teamer.communication.email }}
|
|
</td>
|
|
<td>
|
|
{% if 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">
|
|
<a href="{{ path('app_admin_teamer_profile', { 'uuid': teamer.uuid }) }}" 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 %} |