mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-09-26 16:45:01 +00:00
fix-admin and crudify user admin
This commit is contained in:
@@ -1,9 +1,66 @@
|
||||
{% extends '@ChillMain/Admin/layout_permissions.html.twig' %}
|
||||
|
||||
{% block title %}{{ 'user list'|trans|capitalize }}{% endblock %}
|
||||
{% extends '@ChillMain/Admin/Permission/layout_crud_permission_index.html.twig' %}
|
||||
|
||||
{% block admin_content -%}
|
||||
<h1>{{ 'user list'|trans|capitalize }}</h1>
|
||||
{% embed '@ChillMain/CRUD/_index.html.twig' %}
|
||||
{% block table_entites_thead_tr %}
|
||||
<th>{{ 'crud.admin_user.index.is_active'|trans }}</th>
|
||||
<th>{{ 'crud.admin_user.index.usernames'|trans }}</th>
|
||||
<th>{{ 'crud.admin_user.index.mains'|trans }}</th>
|
||||
<th> </th>
|
||||
{% endblock %}
|
||||
{% block table_entities_tbody %}
|
||||
{% for entity in entities %}
|
||||
<tr>
|
||||
<td>
|
||||
{% if entity.isEnabled %}
|
||||
<i class="fa fa-check chill-green"></i>
|
||||
{% else %}
|
||||
<i class="fa fa-times chill-red"></i>
|
||||
{% endif %}
|
||||
</td>
|
||||
<td>
|
||||
{{ entity.username }}
|
||||
<br/>
|
||||
{{ entity.label }}
|
||||
<br/>
|
||||
{{ entity.email }}
|
||||
</td>
|
||||
<td>
|
||||
{% if entity.userJob %}
|
||||
{{ entity.userJob.label|localize_translatable_string }}
|
||||
<br/>
|
||||
{% endif %}
|
||||
{% if entity.mainScope %}
|
||||
{{ entity.mainScope.name|localize_translatable_string }}
|
||||
<br/>
|
||||
{% endif %}
|
||||
{% if entity.mainCenter %}
|
||||
{{ entity.mainCenter.name }}
|
||||
{% endif %}
|
||||
</td>
|
||||
<td>
|
||||
<ul class="record_actions">
|
||||
<li>
|
||||
<a class="btn btn-edit" href="{{ path('admin_user_edit', { 'id': entity.id }) }}"></a>
|
||||
</li>
|
||||
<li>
|
||||
<a class="btn btn-edit chill-red" href="{{ path('admin_user_edit_password', { 'id' : entity.id }) }}">{{ 'Edit password'|trans }}</a>
|
||||
</li>
|
||||
{% if is_granted('ROLE_ALLOWED_TO_SWITCH') %}
|
||||
<li>
|
||||
<a class="btn chill-blue" href="{{ path('chill_main_homepage', {'_switch_user': entity.username }) }}" title="{{ "Impersonate"|trans|e('html_attr') }}"><i class="fa fa-universal-access"></i></a>
|
||||
</li>
|
||||
{% endif %}
|
||||
</ul>
|
||||
</td>
|
||||
|
||||
</tr>
|
||||
{% endfor %}
|
||||
{% endblock %}
|
||||
{% endembed %}
|
||||
{% endblock %}
|
||||
|
||||
{#
|
||||
|
||||
<table class="records_list">
|
||||
<thead>
|
||||
@@ -51,3 +108,5 @@
|
||||
</ul>
|
||||
|
||||
{% endblock admin_content %}
|
||||
|
||||
#}
|
||||
|
Reference in New Issue
Block a user