57 lines
2.3 KiB
Twig
57 lines
2.3 KiB
Twig
{% extends 'base.html.twig' %}
|
|
{% import "macros/datatables.html.twig" as tables %}
|
|
{% import "macros/widgets.html.twig" as widgets %}
|
|
{% import "macros/toolbar.html.twig" as toolbar %}
|
|
{% import "macros/actions.html.twig" as actions %}
|
|
|
|
{% set columns = {
|
|
'alias': 'alwaysVisible',
|
|
'username': 'hidden-xs',
|
|
'email': 'hidden-xs hidden-sm',
|
|
'title': 'hidden-xs',
|
|
'roles': 'hidden-xs',
|
|
'active': '',
|
|
'actions': 'actions alwaysVisible',
|
|
} %}
|
|
|
|
{% set tableName = 'user_admin' %}
|
|
|
|
{% block page_title %}{{ 'admin_user.title'|trans }}{% endblock %}
|
|
{% block page_subtitle %}{{ 'admin_user.subtitle'|trans }}{% endblock %}
|
|
{% block page_actions %}{{ actions.users('index') }}{% endblock %}
|
|
|
|
{% block main_before %}
|
|
{{ toolbar.toolbar(toolbarForm, 'collapseUserAdmin', showFilter) }}
|
|
{{ tables.data_table_column_modal(tableName, columns) }}
|
|
{% endblock %}
|
|
|
|
{% block main %}
|
|
|
|
{% if entries.count == 0 %}
|
|
{{ widgets.callout('warning', 'error.no_entries_found') }}
|
|
{% else %}
|
|
{{ tables.data_table_header(tableName, columns) }}
|
|
|
|
{% for entry in entries %}
|
|
<tr{% if is_granted('edit', entry) %} class="open-edit" onclick="location.href='{{ path('user_profile_edit', {'username': entry.username}) }}'"{% endif %}>
|
|
<td>{{ widgets.username(entry) }}</td>
|
|
<td class="{{ tables.data_table_column_class(tableName, columns, 'username') }}">{{ entry.username }}</td>
|
|
<td class="{{ tables.data_table_column_class(tableName, columns, 'email') }}">{{ entry.email }}</td>
|
|
<td class="{{ tables.data_table_column_class(tableName, columns, 'title') }}">{{ entry.title }}</td>
|
|
<td class="{{ tables.data_table_column_class(tableName, columns, 'roles') }}">
|
|
{% for role in entry.roles %}
|
|
{{ widgets.label_role(role) }}
|
|
{% endfor %}
|
|
</td>
|
|
<td class="{{ tables.data_table_column_class(tableName, columns, 'active') }}">{{ widgets.label_visible(entry.enabled) }}</td>
|
|
<td class="actions">
|
|
{{ actions.user(entry, 'index') }}
|
|
</td>
|
|
</tr>
|
|
{% endfor %}
|
|
|
|
{{ tables.data_table_footer(entries, 'admin_user_paginated') }}
|
|
{% endif %}
|
|
|
|
{% endblock %}
|