mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-07 18:44:08 +00:00
Create twig templates for admin jobs/scopes histories
This commit is contained in:
parent
096fb6219f
commit
124abf563e
@ -56,6 +56,8 @@ use Chill\MainBundle\Entity\Regroupment;
|
|||||||
use Chill\MainBundle\Entity\User;
|
use Chill\MainBundle\Entity\User;
|
||||||
use Chill\MainBundle\Entity\UserJob;
|
use Chill\MainBundle\Entity\UserJob;
|
||||||
use Chill\MainBundle\Form\CenterType;
|
use Chill\MainBundle\Form\CenterType;
|
||||||
|
use Chill\MainBundle\Entity\User\UserJobHistory;
|
||||||
|
use Chill\MainBundle\Entity\User\UserScopeHistory;
|
||||||
use Chill\MainBundle\Form\CivilityType;
|
use Chill\MainBundle\Form\CivilityType;
|
||||||
use Chill\MainBundle\Form\CountryType;
|
use Chill\MainBundle\Form\CountryType;
|
||||||
use Chill\MainBundle\Form\LanguageType;
|
use Chill\MainBundle\Form\LanguageType;
|
||||||
@ -371,6 +373,32 @@ class ChillMainExtension extends Extension implements
|
|||||||
],
|
],
|
||||||
],
|
],
|
||||||
],
|
],
|
||||||
|
[
|
||||||
|
'class' => UserJobHistory::class,
|
||||||
|
//'controller' => UserJobHistoryController::class,
|
||||||
|
'name' => 'admin_user_job_history',
|
||||||
|
'base_path' => '/admin/main/user-job-history',
|
||||||
|
'base_role' => 'ROLE_ADMIN',
|
||||||
|
'actions' => [
|
||||||
|
'index' => [
|
||||||
|
'role' => 'ROLE_ADMIN',
|
||||||
|
'template' => '@ChillMain/UserJob/history.html.twig',
|
||||||
|
],
|
||||||
|
],
|
||||||
|
],
|
||||||
|
[
|
||||||
|
'class' => UserScopeHistory::class,
|
||||||
|
//'controller' => UserScopeHistoryController::class,
|
||||||
|
'name' => 'admin_user_scope_history',
|
||||||
|
'base_path' => '/admin/main/user-scope-history',
|
||||||
|
'base_role' => 'ROLE_ADMIN',
|
||||||
|
'actions' => [
|
||||||
|
'index' => [
|
||||||
|
'role' => 'ROLE_ADMIN',
|
||||||
|
'template' => '@ChillMain/Scope/history.html.twig',
|
||||||
|
],
|
||||||
|
],
|
||||||
|
],
|
||||||
[
|
[
|
||||||
'class' => User::class,
|
'class' => User::class,
|
||||||
'controller' => UserController::class,
|
'controller' => UserController::class,
|
||||||
|
@ -0,0 +1,59 @@
|
|||||||
|
{% extends '@ChillMain/CRUD/Admin/index.html.twig' %}
|
||||||
|
|
||||||
|
{% block admin_content %}
|
||||||
|
{% embed '@ChillMain/CRUD/_index.html.twig' %}
|
||||||
|
|
||||||
|
{% block table_entities_thead_tr %}
|
||||||
|
<th>{{ 'crud.admin_user_scope_history.index.start'|trans }}</th>
|
||||||
|
<th>{{ 'crud.admin_user_scope_history.index.end'|trans }}</th>
|
||||||
|
<th>{{ 'crud.admin_user_scope_history.index.user'|trans }}</th>
|
||||||
|
<th>{{ 'crud.admin_user_scope_history.index.scope'|trans }}</th>
|
||||||
|
{% endblock %}
|
||||||
|
|
||||||
|
{% block table_entities_tbody %}
|
||||||
|
{{ dump(entities) }}
|
||||||
|
{#
|
||||||
|
#}
|
||||||
|
{% for entity in entities %}
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
{# {{ dump(entity.id) }} #}
|
||||||
|
{{ entity.startDate|format_datetime('medium') }}
|
||||||
|
</td>
|
||||||
|
<td>{{ entity.endDate|format_datetime('medium') }}</td>
|
||||||
|
<td>
|
||||||
|
{% for scope in entity.scope %}
|
||||||
|
{#
|
||||||
|
#}
|
||||||
|
{{ dump(scope) }}
|
||||||
|
{{ scope.label|localize_translatable_string }}
|
||||||
|
{% endfor %}
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
{% for user in entity.user %}
|
||||||
|
{#
|
||||||
|
#}
|
||||||
|
{{ dump(user.id) }}
|
||||||
|
{{ user.usernameCanonical }}
|
||||||
|
{% endfor %}
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
{% endfor %}
|
||||||
|
{% endblock %}
|
||||||
|
|
||||||
|
{% block actions_before %}
|
||||||
|
<li class='cancel'>
|
||||||
|
<a href="{{ path('chill_main_admin_central') }}" class="btn btn-cancel">{{'Back to the admin'|trans }}</a>
|
||||||
|
</li>
|
||||||
|
{% endblock %}
|
||||||
|
|
||||||
|
{% block list_actions %}
|
||||||
|
<ul class="record_actions sticky-form-buttons">
|
||||||
|
<li class='cancel'>
|
||||||
|
<a href="{{ path('admin_scope') }}" class="btn btn-cancel">{{'crud.admin_user_scope_history.Back to user scope'|trans }}</a>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
{% endblock %}
|
||||||
|
{% endembed %}
|
||||||
|
{% endblock %}
|
||||||
|
|
@ -48,6 +48,9 @@
|
|||||||
<li class='cancel'>
|
<li class='cancel'>
|
||||||
<a href="{{ path('chill_main_admin_central') }}" class="btn btn-cancel">{{'Back to the admin'|trans}}</a>
|
<a href="{{ path('chill_main_admin_central') }}" class="btn btn-cancel">{{'Back to the admin'|trans}}</a>
|
||||||
</li>
|
</li>
|
||||||
|
<li>
|
||||||
|
<a href="{{ path('chill_crud_admin_user_scope_history_index') }}" class="btn btn-show">{{ 'crud.admin_user_scope_history.Show scope history'|trans }}</a>
|
||||||
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<a href="{{ path('admin_scope_new') }}" class="btn btn-create">{{ 'Create a new circle'|trans }}</a>
|
<a href="{{ path('admin_scope_new') }}" class="btn btn-create">{{ 'Create a new circle'|trans }}</a>
|
||||||
</li>
|
</li>
|
||||||
|
@ -0,0 +1,59 @@
|
|||||||
|
{% extends '@ChillMain/CRUD/Admin/index.html.twig' %}
|
||||||
|
|
||||||
|
{% block admin_content %}
|
||||||
|
{% embed '@ChillMain/CRUD/_index.html.twig' %}
|
||||||
|
|
||||||
|
{% block table_entities_thead_tr %}
|
||||||
|
<th>{{ 'crud.admin_user_job_history.index.start'|trans }}</th>
|
||||||
|
<th>{{ 'crud.admin_user_job_history.index.end'|trans }}</th>
|
||||||
|
<th>{{ 'crud.admin_user_job_history.index.user'|trans }}</th>
|
||||||
|
<th>{{ 'crud.admin_user_job_history.index.job'|trans }}</th>
|
||||||
|
{% endblock %}
|
||||||
|
|
||||||
|
{% block table_entities_tbody %}
|
||||||
|
{{ dump(entities) }}
|
||||||
|
{#
|
||||||
|
#}
|
||||||
|
{% for entity in entities %}
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
{# {{ dump(entity.id) }} #}
|
||||||
|
{{ entity.startDate|format_datetime('medium') }}
|
||||||
|
</td>
|
||||||
|
<td>{{ entity.endDate|format_datetime('medium') }}</td>
|
||||||
|
<td>
|
||||||
|
{% for job in entity.job %}
|
||||||
|
{#
|
||||||
|
#}
|
||||||
|
{{ dump(job) }}
|
||||||
|
{{ job.label|localize_translatable_string }}
|
||||||
|
{% endfor %}
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
{% for user in entity.user %}
|
||||||
|
{#
|
||||||
|
#}
|
||||||
|
{{ dump(user.id) }}
|
||||||
|
{{ user.usernameCanonical }}
|
||||||
|
{% endfor %}
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
{% endfor %}
|
||||||
|
{% endblock %}
|
||||||
|
|
||||||
|
{% block actions_before %}
|
||||||
|
<li class='cancel'>
|
||||||
|
<a href="{{ path('chill_main_admin_central') }}" class="btn btn-cancel">{{'Back to the admin'|trans }}</a>
|
||||||
|
</li>
|
||||||
|
{% endblock %}
|
||||||
|
|
||||||
|
{% block list_actions %}
|
||||||
|
<ul class="record_actions sticky-form-buttons">
|
||||||
|
<li class='cancel'>
|
||||||
|
<a href="{{ path('chill_crud_admin_user_job_index') }}" class="btn btn-cancel">{{'crud.admin_user_job_history.Back to user job'|trans }}</a>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
{% endblock %}
|
||||||
|
{% endembed %}
|
||||||
|
{% endblock %}
|
||||||
|
|
@ -35,7 +35,10 @@
|
|||||||
|
|
||||||
{% block actions_before %}
|
{% block actions_before %}
|
||||||
<li class='cancel'>
|
<li class='cancel'>
|
||||||
<a href="{{ path('chill_main_admin_central') }}" class="btn btn-cancel">{{'Back to the admin'|trans}}</a>
|
<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_job_history_index') }}" class="btn btn-show">{{ 'crud.admin_user_job_history.Show job history'|trans }}</a>
|
||||||
</li>
|
</li>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
|
@ -389,6 +389,24 @@ crud:
|
|||||||
add_new: Créer
|
add_new: Créer
|
||||||
title_new: Nouveau métier
|
title_new: Nouveau métier
|
||||||
title_edit: Modifier un métier
|
title_edit: Modifier un métier
|
||||||
|
admin_user_job_history:
|
||||||
|
index:
|
||||||
|
title: Historique des métiers
|
||||||
|
start: Du
|
||||||
|
end: Au
|
||||||
|
user: Utilisateur
|
||||||
|
job: Métier
|
||||||
|
Show job history: Voir l'historique
|
||||||
|
Back to user job: Revenir aux métiers
|
||||||
|
admin_user_scope_history:
|
||||||
|
index:
|
||||||
|
title: Historique des cercles
|
||||||
|
start: Du
|
||||||
|
end: Au
|
||||||
|
user: Utilisateur
|
||||||
|
scope: Cercle
|
||||||
|
Show scope history: Voir l'historique
|
||||||
|
Back to user scope: Revenir aux cercles
|
||||||
main_location_type:
|
main_location_type:
|
||||||
index:
|
index:
|
||||||
title: Liste des types de localisations
|
title: Liste des types de localisations
|
||||||
|
Loading…
x
Reference in New Issue
Block a user