mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-07 18:44:08 +00:00
108 lines
4.7 KiB
Twig
108 lines
4.7 KiB
Twig
{% extends '@ChillMain/CRUD/Admin/index.html.twig' %}
|
|
|
|
{% block admin_content %}
|
|
{% embed '@ChillMain/CRUD/_index.html.twig' %}
|
|
|
|
{% block index_header %}
|
|
<h1>{{"Users"|trans}}</h1>
|
|
{% endblock %}
|
|
|
|
{% block filter_order %}{{ filter_order|chill_render_filter_order_helper }}{% endblock %}
|
|
|
|
{% block table_entities_thead_tr %}
|
|
<th>{{ 'Active'|trans }}</th>
|
|
<th>{{ 'absence.Is absent'|trans }}</th>
|
|
<th>{{ 'Username'|trans }}</th>
|
|
<th>{{ 'Datas'|trans }}</th>
|
|
<th>{{ 'Actions'|trans }}</th>
|
|
{% endblock %}
|
|
|
|
{% block table_entities_tbody %}
|
|
{% for entity in entities %}
|
|
<tr>
|
|
<td>
|
|
{% if entity.isEnabled %}
|
|
<i class="fa fa-check-square-o"></i>
|
|
{% else %}
|
|
<i class="fa fa-square-o"></i>
|
|
{% endif %}
|
|
</td>
|
|
<td>
|
|
{% if entity.isAbsent %}
|
|
<i class="fa fa-check-square-o"></i>
|
|
{% else %}
|
|
<i class="fa fa-square-o"></i>
|
|
{% endif %}
|
|
</td>
|
|
<td>
|
|
{#
|
|
{% if entity.civility is not null %}
|
|
{% if entity.civility.name|length > 0 %}
|
|
{{ entity.civility.name|first }}
|
|
{% endif %}
|
|
{% endif %}
|
|
#}
|
|
{{ entity.label }}
|
|
</td>
|
|
<td>
|
|
<ul class="unbullet">
|
|
<li>
|
|
<span class="dt">login:</span>
|
|
{{ entity.username|e('html_attr') }}
|
|
</li>
|
|
<li>
|
|
<span class="dt">email:</span>
|
|
{{ entity.email }}
|
|
</li>
|
|
<li>
|
|
<span class="dt">métier:</span>
|
|
{% if entity.userJob %}{{ entity.userJob.label|localize_translatable_string }}{% endif %}
|
|
</li>
|
|
<li>
|
|
<span class="dt">cercle/centre:</span>
|
|
{% if entity.mainScope %}
|
|
{{ entity.mainScope.name|localize_translatable_string }}
|
|
{% endif %}
|
|
{% if entity.mainCenter %}, {{ entity.mainCenter.name }}{% endif %}
|
|
</li>
|
|
</ul>
|
|
</td>
|
|
<td>
|
|
<ul class="record_actions">
|
|
<li>
|
|
<a class="btn btn-edit" title="{{ 'Edit'|trans }}" href="{{ path('chill_crud_admin_user_edit', { 'id': entity.id }) }}"></a>
|
|
</li>
|
|
|
|
{% if allow_change_password is same as(true) %}
|
|
<li>
|
|
<a class="btn btn-chill-red" href="{{ path('admin_user_edit_password', { 'id' : entity.id }) }}" title="{{ 'Edit password'|trans|e('html_attr') }}"><i class="fa fa-ellipsis-h"></i></a>
|
|
</li>
|
|
{% endif %}
|
|
|
|
{% if is_granted('ROLE_ALLOWED_TO_SWITCH') %}
|
|
<li>
|
|
<a class="btn btn-chill-blue" href="{{ path('chill_main_homepage', {'_switch_user': entity.username }) }}" title="{{ "Impersonate"|trans|e('html_attr') }}"><i class="fa fa-user-secret"></i></a>
|
|
</li>
|
|
{% endif %}
|
|
</ul>
|
|
</td>
|
|
</tr>
|
|
{% endfor %}
|
|
{% endblock %}
|
|
|
|
{% block pagination %}{{ chill_pagination(paginator) }}{% endblock %}
|
|
|
|
{% block list_actions %}
|
|
<ul class="record_actions sticky-form-buttons">
|
|
<li class='cancel'>
|
|
<a href="{{ path('chill_main_admin_central') }}" class="btn btn-cancel">{{'Back to the admin'|trans}}</a>
|
|
</li>
|
|
<li>
|
|
<a href="{{ path('chill_crud_admin_user_new') }}" class="btn btn-create">{{ 'Create'|trans }}</a>
|
|
</li>
|
|
</ul>
|
|
{% endblock list_actions %}
|
|
|
|
{% endembed %}
|
|
{% endblock %}
|