mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-09-06 14:54:57 +00:00
[admin][templates] move job/scope history in an unique template and display history for a given user
This commit is contained in:
@@ -1,51 +0,0 @@
|
||||
{% 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 %}
|
||||
{% for entity in entities %}
|
||||
<tr>
|
||||
<td>{{ entity.startDate|format_datetime('medium') }}</td>
|
||||
<td>
|
||||
{% if entity.endDate is not null %}
|
||||
{{ entity.endDate|format_datetime('medium') }}
|
||||
{% else %}
|
||||
<i class="opacity-50">{{ "crud.admin_user_scope_history.index.today"|trans }}</i>
|
||||
{% endif %}
|
||||
</td>
|
||||
<td>{{ entity.user.usernameCanonical }}</td>
|
||||
<td>
|
||||
{% if entity.scope %}
|
||||
{{ entity.scope.name|localize_translatable_string }}
|
||||
{% else %}
|
||||
<i class="opacity-50">{{ 'crud.admin_user_scope_history.index.undefined'|trans }}</i>
|
||||
{% endif %}
|
||||
</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,9 +48,6 @@
|
||||
<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_scope_history_index') }}" class="btn btn-show">{{ 'crud.admin_user_scope_history.Show scope history'|trans }}</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="{{ path('admin_scope_new') }}" class="btn btn-create">{{ 'Create a new circle'|trans }}</a>
|
||||
</li>
|
||||
|
@@ -1,7 +1,8 @@
|
||||
{% extends '@ChillMain/Admin/layoutWithVerticalMenu.html.twig' %}
|
||||
{% extends '@ChillMain/CRUD/Admin/index.html.twig' %}
|
||||
|
||||
{% block admin_content -%}
|
||||
{% embed '@ChillMain/CRUD/_edit_content.html.twig' %}
|
||||
|
||||
{% block crud_content_after_form %}
|
||||
{% if access_permissions_group_list %}
|
||||
<h2 class="mt-5">{{ 'Permissions granted'|trans }}</h2>
|
||||
@@ -54,5 +55,14 @@
|
||||
{% endblock %}
|
||||
|
||||
{% block content_form_actions_save_and_show %}{% endblock %}
|
||||
|
||||
{% block content_form_actions_view %}
|
||||
<li>
|
||||
<a href="{{ path('admin_user_job_scope_history', {id: entity.id}) }}" class="btn btn-show">
|
||||
{{ 'admin.users.job_scope_histories.Show history'|trans }}
|
||||
</a>
|
||||
</li>
|
||||
{% endblock %}
|
||||
|
||||
{% endembed %}
|
||||
{% endblock %}
|
||||
|
@@ -0,0 +1,81 @@
|
||||
{% extends '@ChillMain/Admin/layoutWithVerticalMenu.html.twig' %}
|
||||
|
||||
{% block title %}{{ 'admin.users.job_scope_histories.index.histories'|trans }}{% endblock title %}
|
||||
|
||||
{% block admin_content %}
|
||||
<h2>{{ user.usernameCanonical }}</h2>
|
||||
<h1>{{ 'admin.users.job_scope_histories.index.histories'|trans }}</h1>
|
||||
|
||||
<h3 class="mt-5">{{ 'admin.users.job_scope_histories.index.job_history.title'|trans }}</h3>
|
||||
<table class="records_list table table-bordered border-dark">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="w-25">{{ 'admin.users.job_scope_histories.index.job_history.start'|trans }}</th>
|
||||
<th class="w-25">{{ 'admin.users.job_scope_histories.index.job_history.end'|trans }}</th>
|
||||
<th>{{ 'admin.users.job_scope_histories.index.job_history.job'|trans }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for entity in jobHistories|reverse %}
|
||||
<tr>
|
||||
<td>{{ entity.startDate|format_datetime('medium') }}</td>
|
||||
<td>
|
||||
{% if entity.endDate is not null %}
|
||||
{{ entity.endDate|format_datetime('medium') }}
|
||||
{% else %}
|
||||
<i class="opacity-50">{{ "admin.users.job_scope_histories.index.job_history.today"|trans }}</i>
|
||||
{% endif %}
|
||||
</td>
|
||||
<td>
|
||||
{% if entity.job %}
|
||||
{{ entity.job.label|localize_translatable_string }}
|
||||
{% else %}
|
||||
<i class="opacity-50">{{ 'admin.users.job_scope_histories.index.job_history.undefined'|trans }}</i>
|
||||
{% endif %}
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<h3 class="mt-5">{{ 'admin.users.job_scope_histories.index.scope_history.title'|trans }}</h3>
|
||||
<table class="records_list table table-bordered border-dark">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="w-25">{{ 'admin.users.job_scope_histories.index.scope_history.start'|trans }}</th>
|
||||
<th class="w-25">{{ 'admin.users.job_scope_histories.index.scope_history.end'|trans }}</th>
|
||||
<th>{{ 'admin.users.job_scope_histories.index.scope_history.scope'|trans }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for entity in scopeHistories|reverse %}
|
||||
<tr>
|
||||
<td>{{ entity.startDate|format_datetime('medium') }}</td>
|
||||
<td>
|
||||
{% if entity.endDate is not null %}
|
||||
{{ entity.endDate|format_datetime('medium') }}
|
||||
{% else %}
|
||||
<i class="opacity-50">{{ "admin.users.job_scope_histories.index.scope_history.today"|trans }}</i>
|
||||
{% endif %}
|
||||
</td>
|
||||
<td>
|
||||
{% if entity.scope %}
|
||||
{{ entity.scope.name|localize_translatable_string }}
|
||||
{% else %}
|
||||
<i class="opacity-50">{{ 'admin.users.job_scope_histories.index.scope_history.undefined'|trans }}</i>
|
||||
{% endif %}
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<ul class="record_actions sticky-form-buttons">
|
||||
<li class='cancel'>
|
||||
<a href="{{ path('chill_crud_admin_user_edit', {id: user.id}) }}" class="btn btn-cancel">
|
||||
{{'admin.users.job_scope_histories.index.Back to user job'|trans }}
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
{% endblock %}
|
@@ -1,51 +0,0 @@
|
||||
{% 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 %}
|
||||
{% for entity in entities %}
|
||||
<tr>
|
||||
<td>{{ entity.startDate|format_datetime('medium') }}</td>
|
||||
<td>
|
||||
{% if entity.endDate is not null %}
|
||||
{{ entity.endDate|format_datetime('medium') }}
|
||||
{% else %}
|
||||
<i class="opacity-50">{{ "crud.admin_user_job_history.index.today"|trans }}</i>
|
||||
{% endif %}
|
||||
</td>
|
||||
<td>{{ entity.user.usernameCanonical }}</td>
|
||||
<td>
|
||||
{% if entity.job %}
|
||||
{{ entity.job.label|localize_translatable_string }}
|
||||
{% else %}
|
||||
<i class="opacity-50">{{ 'crud.admin_user_job_history.index.undefined'|trans }}</i>
|
||||
{% endif %}
|
||||
</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 %}
|
||||
|
@@ -37,9 +37,6 @@
|
||||
<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_job_history_index') }}" class="btn btn-show">{{ 'crud.admin_user_job_history.Show job history'|trans }}</a>
|
||||
</li>
|
||||
{% endblock %}
|
||||
|
||||
{% endembed %}
|
||||
|
Reference in New Issue
Block a user