V-Beta-1.0.0
Vision is out of alpha !
This commit is contained in:
5
templates/_cells/adminGroupActions.html.twig
Normal file
5
templates/_cells/adminGroupActions.html.twig
Normal file
@@ -0,0 +1,5 @@
|
||||
{% if currentPath != path('admin_group_view', {'id': group.id}) %}
|
||||
<a href="{{ path('admin_group_view', {'id': group.id}) }}" class="btn btn-primary btn-sm" data-bs-toggle="tooltip" data-placement="top" title="{% trans %}tooltip_view{% endtrans %}"><i class="far fa-eye"></i></a>
|
||||
{% endif %}
|
||||
<a href="{{ path('admin_group_edit', {'id': group.id}) }}" class="btn btn-success btn-sm" data-bs-toggle="tooltip" data-placement="top" title="{% trans %}tooltip_edit{% endtrans %}"><i class="far fa-edit"></i></a>
|
||||
<a href="{{ path('admin_group_delete', {'id': group.id}) }}" class="btn btn-danger btn-sm" data-bs-toggle="tooltip" data-placement="top" title="{% trans %}tooltip_delete{% endtrans %}" onclick="return confirm('{% trans %}confirm_ok_delete{% endtrans %}')"><i class="fa fa-trash"></i></a>
|
||||
3
templates/_cells/adminLogsActions.html.twig
Normal file
3
templates/_cells/adminLogsActions.html.twig
Normal file
@@ -0,0 +1,3 @@
|
||||
<a href="{{ path('admin_logs_view', {'filename': filename}) }}" class="btn btn-success btn-sm mx-1" data-bs-toggle="tooltip" data-placement="top" title="{% trans %}tooltip_view{% endtrans %}"><i class="fas fa-eye"></i></a>
|
||||
<a href="{{ path('admin_logs_download', {'filename': filename}) }}" target="_blank" class="btn btn-info btn-sm mx-1" data-bs-toggle="tooltip" data-placement="top" title="{% trans %}tooltip_download{% endtrans %}"><i class="fas fa-file-download"></i></a>
|
||||
<a href="{{ path('admin_logs_delete', {'filename': filename}) }}" class="btn btn-danger btn-sm" data-bs-toggle="tooltip" data-placement="top" title="{% trans %}tooltip_delete{% endtrans %}" onclick="return confirm('{% trans %}confirm_ok_delete{% endtrans %}')"><i class="fa fa-trash"></i></a>
|
||||
6
templates/_cells/adminRankActions.html.twig
Normal file
6
templates/_cells/adminRankActions.html.twig
Normal file
@@ -0,0 +1,6 @@
|
||||
{% if currentPath != path('admin_group_rank_view', {'id': rank.id}) %}
|
||||
<a href="{{ path('admin_group_rank_view', {'id': rank.id}) }}" class="btn btn-primary btn-sm" data-bs-toggle="tooltip" data-placement="top" title="{% trans %}tooltip_view{% endtrans %}"><i class="far fa-eye"></i></a>
|
||||
{% endif %}
|
||||
<a href="{{ path('admin_group_rank_edit', {'id': rank.id}) }}" class="btn btn-success btn-sm" data-bs-toggle="tooltip" data-placement="top" title="{% trans %}tooltip_edit{% endtrans %}"><i class="far fa-edit"></i></a>
|
||||
<a href="{{ path('admin_group_rank_delete', {'id': rank.id}) }}" class="btn btn-danger btn-sm" data-bs-toggle="tooltip" data-placement="top" title="{% trans %}tooltip_delete{% endtrans %}" onclick="return confirm('{% trans %}confirm_ok_delete{% endtrans %}')"><i class="fa fa-trash"></i></a>
|
||||
<a href="{{ path('admin_group_rank_copy', {'id': rank.id}) }}" class="btn btn-info btn-sm" data-bs-toggle="tooltip" data-placement="top" title="{% trans %}tooltip_copy{% endtrans %}"><i class="fas fa-copy"></i></a>
|
||||
5
templates/_cells/adminSubGroupActions.html.twig
Normal file
5
templates/_cells/adminSubGroupActions.html.twig
Normal file
@@ -0,0 +1,5 @@
|
||||
{% if currentPath != path('admin_group_subgroup_view', {'id': subgroup.id}) %}
|
||||
<a href="{{ path('admin_group_subgroup_view', {'id': subgroup.id}) }}" class="btn btn-primary btn-sm" data-bs-toggle="tooltip" data-placement="top" title="{% trans %}tooltip_view{% endtrans %}"><i class="far fa-eye"></i></a>
|
||||
{% endif %}
|
||||
<a href="{{ path('admin_group_subgroup_edit', {'id': subgroup.id}) }}" class="btn btn-success btn-sm" data-bs-toggle="tooltip" data-placement="top" title="{% trans %}tooltip_edit{% endtrans %}"><i class="far fa-edit"></i></a>
|
||||
<a href="{{ path('admin_group_subgroup_delete', {'id': subgroup.id}) }}" class="btn btn-danger btn-sm" data-bs-toggle="tooltip" data-placement="top" title="{% trans %}tooltip_delete{% endtrans %}" onclick="return confirm('{% trans %}confirm_ok_delete{% endtrans %}')"><i class="fa fa-trash"></i></a>
|
||||
10
templates/_cells/adminUserActions.html.twig
Normal file
10
templates/_cells/adminUserActions.html.twig
Normal file
@@ -0,0 +1,10 @@
|
||||
{% if currentPath != path('admin_user_view', {'id': user.id}) %}
|
||||
<a href="{{ path('admin_user_view', {'id': user.id}) }}" class="btn btn-primary btn-sm" data-bs-toggle="tooltip" data-placement="top" title="{% trans %}tooltip_view{% endtrans %}"><i class="far fa-eye"></i></a>
|
||||
{% endif %}
|
||||
<a href="{{ path('admin_user_edit', {'id': user.id}) }}" class="btn btn-success btn-sm" data-bs-toggle="tooltip" data-placement="top" title="{% trans %}tooltip_edit{% endtrans %}"><i class="far fa-edit"></i></a>
|
||||
{% if user.isDesactivated %}
|
||||
<a href="{{ path('admin_user_disable', {'id': user.id}) }}" class="btn btn-warning btn-sm" data-bs-toggle="tooltip" data-placement="top" title="{% trans %}tooltip_user_enable{% endtrans %}"><i class="fas fa-user-check"></i></a>
|
||||
{% else %}
|
||||
<a href="{{ path('admin_user_disable', {'id': user.id}) }}" class="btn btn-danger btn-sm" data-bs-toggle="tooltip" data-placement="top" title="{% trans %}tooltip_user_disable{% endtrans %}"><i class="fas fa-user-times"></i></a>
|
||||
{% endif %}
|
||||
<a href="{{ path('home', { _want_to_be_this_user: user.email }) }}" class="btn btn-info btn-sm" data-bs-toggle="tooltip" data-placement="top" title="{% trans %}tooltip_become_user{% endtrans %}"><i class="fas fa-user-secret"></i></a>
|
||||
14
templates/_cells/adminUserInformations.html.twig
Normal file
14
templates/_cells/adminUserInformations.html.twig
Normal file
@@ -0,0 +1,14 @@
|
||||
<ul class="list-group list-group-flush">
|
||||
<li class="list-group-item list-group-item-dark">{% trans %}title_full_name{% endtrans %} : {{user.fullName}}</li>
|
||||
<li class="list-group-item list-group-item-dark">{% trans %}title_email{% endtrans %} : <span class="hidethis">{{user.email}}</span></li>
|
||||
<li class="list-group-item list-group-item-dark">{% trans %}title_roles{% endtrans %} : {% for r in user.roles %}[ {{ r }} ] {% endfor %}</li>
|
||||
<li class="list-group-item list-group-item-dark">{% trans %}title_group{% endtrans %} : {{user.mainGroup ? user.mainGroup.name : 'value_no_group'|trans}}</li>
|
||||
<li class="list-group-item list-group-item-dark">{% trans %}title_rank{% endtrans %} : {{user.mainRank ? user.mainRank.name : 'value_no_group'|trans}}</li>
|
||||
<li class="list-group-item list-group-item-dark">{% trans %}title_subgroups{% endtrans %} : {% if user.subGroups %}
|
||||
{% for sg in user.subGroups %}{{ sg.name}}{% if loop.last == false %}, {% endif %}{% endfor %}
|
||||
{% else %}{{'value_no_subgroups'|trans}}{% endif %}</li>
|
||||
<li class="list-group-item list-group-item-dark">{% trans %}title_verified{% endtrans %} : {{user.isVerified ? 'value_yes'|trans : 'value_no'|trans }}</li>
|
||||
<li class="list-group-item list-group-item-dark">{% trans %}title_desactivated{% endtrans %} : {{user.isDesactivated ? 'value_yes'|trans : 'No'}}</li>
|
||||
<li class="list-group-item list-group-item-dark">{% trans %}title_created_at{% endtrans %} : {{user.createdAt |date('_datetime.format'|trans)}}</li>
|
||||
<li class="list-group-item list-group-item-dark">{% trans %}title_admin_mode{% endtrans %} : {{user.adminMode ? 'value_yes'|trans : 'value_no'|trans }}</li>
|
||||
</ul>
|
||||
41
templates/_cells/adminUserTable.html.twig
Normal file
41
templates/_cells/adminUserTable.html.twig
Normal file
@@ -0,0 +1,41 @@
|
||||
<div class="table-responsive">
|
||||
<table class="table table-dark table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th scope="col">#</th>
|
||||
{% if noemail is not defined %}
|
||||
<th scope="col">{% trans %}title_email{% endtrans %}</th>
|
||||
{% endif %}
|
||||
<th scope="col">{% trans %}title_full_name{% endtrans %}</th>
|
||||
<th scope="col">{% trans %}title_group{% endtrans %}</th>
|
||||
<th scope="col">{% trans %}title_verified{% endtrans %}</th>
|
||||
<th scope="col">{% trans %}title_created_at{% endtrans %}</th>
|
||||
{% if noaction is not defined %}
|
||||
<th scope="col">{% trans %}title_actions{% endtrans %}</th>
|
||||
{% endif %}
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for i in users %}
|
||||
<tr>
|
||||
<th scope="row">{{i.id}}</th>
|
||||
{% if noemail is not defined %}
|
||||
<td><span class="hidethis">{{i.email}}</span></td>
|
||||
{% endif %}
|
||||
<td>
|
||||
{{ i.fullName }} {% if 'ROLE_ADMIN' in i.roles %}<span class="text-warning">({% trans %}title_user_admin{% endtrans %})</span>{% endif %}
|
||||
{% if i.isDesactivated %}<span class="text-danger">({% trans %}title_desactivated{% endtrans %})</span>{% endif %}
|
||||
</td>
|
||||
<td>{{i.mainGroup ? i.mainGroup.shortName : 'value_no_group'|trans}}, {{i.mainRank ? i.mainRank.shortName : 'value_no_rank'|trans}}</td>
|
||||
<td>{{i.isVerified ? 'value_yes'|trans : 'value_no'|trans}}</td>
|
||||
<td>{{i.createdAt |date('_datetime.format'|trans)}}</td>
|
||||
{% if noaction is not defined %}
|
||||
<td>
|
||||
{% include '_cells/adminUserActions.html.twig' with {'user': i} %}
|
||||
</td>
|
||||
{% endif %}
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
6
templates/_cells/commentActions.html.twig
Normal file
6
templates/_cells/commentActions.html.twig
Normal file
@@ -0,0 +1,6 @@
|
||||
{% if is_granted('edit', comment) %}
|
||||
<a href="{{ path('comment_edit', {'id': comment.id}) }}" class="btn btn-success btn-sm" data-bs-toggle="tooltip" data-placement="top" title="{% trans %}tooltip_edit{% endtrans %}"><i class="far fa-edit"></i></a>
|
||||
{% endif %}
|
||||
{% if is_granted('delete', comment) %}
|
||||
<a href="{{ path('comment_delete', {'id': comment.id}) }}" class="btn btn-danger btn-sm" data-bs-toggle="tooltip" data-placement="top" title="{% trans %}tooltip_delete{% endtrans %}" onclick="return confirm('{% trans %}confirm_ok_delete{% endtrans %}')"><i class="fa fa-trash"></i></a>
|
||||
{% endif %}
|
||||
50
templates/_cells/directoryActions.html.twig
Normal file
50
templates/_cells/directoryActions.html.twig
Normal file
@@ -0,0 +1,50 @@
|
||||
{% if currentPath != path('directory_view', {'id': directory.id}) and noview is not defined %}
|
||||
<a href="{{ path('directory_view', {'id': directory.id}) }}" class="btn btn-primary btn-sm" data-bs-toggle="tooltip" data-placement="top" title="{% trans %}tooltip_view{% endtrans %}"><i class="far fa-eye"></i></a>
|
||||
{% endif %}
|
||||
{% if is_granted('edit', directory) and noedit is not defined %}
|
||||
<a href="{{ path('directory_edit', {'id': directory.id}) }}" class="btn btn-success btn-sm" data-bs-toggle="tooltip" data-placement="top" title="{% trans %}tooltip_edit{% endtrans %}"><i class="far fa-edit"></i></a>
|
||||
{% endif %}
|
||||
{% if is_granted('delete', directory) and nodelete is not defined %}
|
||||
<a href="{{ path('directory_delete', {'id': directory.id}) }}" class="btn btn-danger btn-sm" data-bs-toggle="tooltip" data-placement="top" title="{% trans %}tooltip_delete{% endtrans %}" onclick="return confirm('{% trans %}confirm_ok_delete{% endtrans %}')"><i class="fa fa-trash"></i></a>
|
||||
{% endif %}
|
||||
{% if currentPath == path('directory_view', {'id': directory.id}) and noview is not defined %}
|
||||
{% if is_granted('merge', directory) and nodelete is not defined %}
|
||||
<span data-bs-toggle="tooltip" data-placement="top" title="{% trans %}tooltip_merge{% endtrans %}">
|
||||
<button type="button" class="btn btn-info btn-sm" data-bs-toggle="modal" data-bs-target="#combinedirectorymodal" ><i class="fas fa-compress"></i></button>
|
||||
</span>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
|
||||
{% if addtofolder is defined %}
|
||||
<a href="{{ path('folder_directory_add', {'id': addtofolder, 'Directory': directory.id}) }}" class="btn btn-success btn-sm" data-bs-toggle="tooltip" data-placement="top" title="{% trans %}tooltip_add_to_folder{% endtrans %}"><i class="fas fa-folder-plus"></i></a>
|
||||
{% endif %}
|
||||
{% if removefromfolder is defined %}
|
||||
<a href="{{ path('folder_directory_remove', {'id': removefromfolder, 'Directory': directory.id}) }}" class="btn btn-danger btn-sm" data-bs-toggle="tooltip" data-placement="top" title="{% trans %}tooltip_remove_from_folder{% endtrans %}" onclick="return confirm('{% trans %}confirm_ok_remove_from_folder{% endtrans %}')"><i class="fas fa-folder-minus"></i></a>
|
||||
{% endif %}
|
||||
|
||||
{% if is_granted('merge', directory) and nodelete is not defined %}
|
||||
<!-- Modal -->
|
||||
<div class="modal fade" id="combinedirectorymodal" tabindex="-1" role="dialog" aria-labelledby="combinedirectorymodalLabel" aria-hidden="true">
|
||||
<div class="modal-dialog modal-dialog-centered" role="document">
|
||||
<form method="POST" action="{{ path('directory_merge_router') }}">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title" id="combinedirectorymodalLabel">{% trans %}title_merge_directory{% endtrans %}</h5>
|
||||
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div class="form-group">
|
||||
<label for="recipient-name" class="col-form-label">{% trans %}title_form_id_merge_into{% endtrans %} :</label>
|
||||
<input type="text" class="form-control" id="directory-main" name="directory-main" placeholder="1...." />
|
||||
<input type="hidden" value="{{ directory.id }}" id="directory-child" name="directory-child" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-secondary" data-bs-dismiss="modal">{% trans %}button_cancel{% endtrans %}</button>
|
||||
<button type="submit" class="btn btn-primary">{% trans %}button_ok{% endtrans %}</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
78
templates/_cells/directoryCard.html.twig
Normal file
78
templates/_cells/directoryCard.html.twig
Normal file
@@ -0,0 +1,78 @@
|
||||
<div class="card user-card user-card-1">
|
||||
<div class="card-header">{{ directory.fullname}} <span class="float-end">{% include '_cells/directoryActions.html.twig' with {'directory': directory} %}</span></div>
|
||||
<div class="card-body pb-0">
|
||||
{% if directory.dead %}<p class="text-danger">{% trans %}title_directory_dead{% endtrans %}</p>{% endif %}
|
||||
{% if directory.wanted %}<p class="text-danger">{% trans %}title_directory_wanted{% endtrans %}</p>{% endif %}
|
||||
|
||||
<div class="row">
|
||||
{% set path_directories_uploads = 'uploads/directories' %}
|
||||
{% if directory.faceImageSize != 0 %}{% set faceImage = path_directories_uploads ~ '/' ~ directory.faceImageName %}{% else %}{% set faceImage = 'img/nophoto.jpg' %}{% endif %}
|
||||
<div class="col-2">
|
||||
<a data-toggle="lightbox" data-gallery="directory" data-bs-toggle="tooltip" data-placement="top" title="{% trans %}title_faceImage{% endtrans %}: {{ directory.faceImageDate ? directory.faceImageDate|date('_datetime.format'|trans) : 'value_no_picture'|trans }}" data-caption="{{ directory.fullname}} | {% trans %}title_faceImage{% endtrans %}: {{ directory.faceImageDate ? directory.faceImageDate|date('_datetime.format'|trans) : 'value_no_picture'|trans }}" href="{{ asset(faceImage) }}"><img class="img-fluid m-1 wid-80 directory-picture-card" src="{{ asset(faceImage) }}" alt="{{ directory.fullname}}"></a>
|
||||
</div>
|
||||
{% if directory.backImageSize != 0 %}{% set backImage = path_directories_uploads ~ '/' ~ directory.backImageName %}{% else %}{% set backImage = 'img/nophoto.jpg' %}{% endif %}
|
||||
<div class="col-2">
|
||||
<a data-toggle="lightbox" data-gallery="directory" data-bs-toggle="tooltip" data-placement="top" title="{% trans %}title_backImage{% endtrans %}: {{ directory.backImageDate ? directory.backImageDate|date('_datetime.format'|trans) : 'value_no_picture'|trans }}" data-caption="{{ directory.fullname}} | {% trans %}title_backImage{% endtrans %}: {{ directory.backImageDate ? directory.backImageDate|date('_datetime.format'|trans) : 'value_no_picture'|trans }}" href="{{ asset(backImage) }}"><img class="img-fluid m-1 wid-80 directory-picture-card" src="{{ asset(backImage) }}" alt="{{ directory.fullname}}"></a>
|
||||
</div>
|
||||
{% if directory.rightImageSize != 0 %}{% set rightImage = path_directories_uploads ~ '/' ~ directory.rightImageName %}{% else %}{% set rightImage = 'img/nophoto.jpg' %}{% endif %}
|
||||
<div class="col-2">
|
||||
<a data-toggle="lightbox" data-gallery="directory" data-bs-toggle="tooltip" data-placement="top" title="{% trans %}title_rightImage{% endtrans %}: {{ directory.rightImageDate ? directory.rightImageDate|date('_datetime.format'|trans) : 'value_no_picture'|trans }}" data-caption="{{ directory.fullname}} | {% trans %}title_rightImage{% endtrans %}: {{ directory.rightImageDate ? directory.rightImageDate|date('_datetime.format'|trans) : 'value_no_picture'|trans }}" href="{{ asset(rightImage) }}"><img class="img-fluid m-1 wid-80 directory-picture-card" src="{{ asset(rightImage) }}" alt="{{ directory.fullname}}"></a>
|
||||
</div>
|
||||
{% if directory.leftImageSize != 0 %}{% set leftImage = path_directories_uploads ~ '/' ~ directory.leftImageName %}{% else %}{% set leftImage = 'img/nophoto.jpg' %}{% endif %}
|
||||
<div class="col-2">
|
||||
<a data-toggle="lightbox" data-gallery="directory" data-bs-toggle="tooltip" data-placement="top" title="{% trans %}title_leftImage{% endtrans %}: {{ directory.leftImageDate ? directory.leftImageDate|date('_datetime.format'|trans) : 'value_no_picture'|trans }}" data-caption="{{ directory.fullname}} | {% trans %}title_leftImage{% endtrans %}: {{ directory.leftImageDate ? directory.leftImageDate|date('_datetime.format'|trans) : 'value_no_photo'|trans }}" href="{{ asset(leftImage) }}"><img class="img-fluid m-1 wid-80 directory-picture-card" src="{{ asset(leftImage) }}" alt="{{ directory.fullname}}"></a>
|
||||
</div>
|
||||
|
||||
{% if directory.idCardImageSize != 0 %}
|
||||
<div class="col-2">
|
||||
<a data-toggle="lightbox" data-gallery="directory" href="{{ asset(path_directories_uploads ~ '/' ~ directory.idCardImageName) }}"><img class="img-fluid m-1 wid-80 directory-picture-card" src="{{ asset(path_directories_uploads ~ '/' ~ directory.idCardImageName) }}" alt="{% trans %}tooltip_id_card{% endtrans %}"></a>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% if app.user.hasPermission('general_legal_view') %}
|
||||
{% if directory.carLicenceImageSize != 0 %}
|
||||
<div class="col-2">
|
||||
<a data-toggle="lightbox" data-gallery="directory" href="{{ asset(path_directories_uploads ~ '/' ~ directory.carLicenceImageName) }}"><img class="img-fluid m-1 wid-80 directory-picture-card" src="{{ asset(path_directories_uploads ~ '/' ~ directory.carLicenceImageName) }}" alt="{% trans %}tooltip_car_licence{% endtrans %}"></a>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% if directory.motorcycleLicenceImageSize != 0 %}
|
||||
<div class="col-2">
|
||||
<a data-toggle="lightbox" data-gallery="directory" href="{{ asset(path_directories_uploads ~ '/' ~ directory.motorcycleLicenceImageName) }}"><img class="img-fluid m-1 wid-80 directory-picture-card" src="{{ asset(path_directories_uploads ~ '/' ~ directory.motorcycleLicenceImageName) }}" alt="{% trans %}tooltip_motorcycle_licence{% endtrans %}"></a>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% if directory.truckLicenceImageSize != 0 %}
|
||||
<div class="col-2">
|
||||
<a data-toggle="lightbox" data-gallery="directory" href="{{ asset(path_directories_uploads ~ '/' ~ directory.truckLicenceImageName) }}"><img class="img-fluid m-1 wid-80 directory-picture-card" src="{{ asset(path_directories_uploads ~ '/' ~ directory.truckLicenceImageName) }}" alt="{% trans %}tooltip_truck_licence{% endtrans %}"></a>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% if directory.boatLicenceImageSize != 0 %}
|
||||
<div class="col-2">
|
||||
<a data-toggle="lightbox" data-gallery="directory" href="{{ asset(path_directories_uploads ~ '/' ~ directory.boatLicenceImageName) }}"><img class="img-fluid m-1 wid-80 directory-picture-card" src="{{ asset(path_directories_uploads ~ '/' ~ directory.boatLicenceImageName) }}" alt="{% trans %}tooltip_boat_licence{% endtrans %}"></a>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
<ul class="list-group list-group-flush fa-ul">
|
||||
<li class="list-group-item"><span class="fa-li"><i class="fas fa-birthday-cake"></i></span>{% trans %}title_birthdate{% endtrans %} : {{ directory.birthdate ? directory.birthdate | date("d/m/Y") : 'value_no_value'|trans }}{% if directory.dead %}, {% trans %}title_dead{% endtrans %}{% endif %}</li>
|
||||
<li class="list-group-item"><span class="fa-li"><i class="fas fa-phone"></i></span>{% trans %}title_phone{% endtrans %} : {{ directory.phone | default('value_no_value'|trans) }}</li>
|
||||
<li class="list-group-item"><span class="fa-li"><i class="fas fa-transgender-alt"></i></span>{% trans %}title_gender{% endtrans %} : {{ directory.gender | default('value_no_value'|trans) }}</li>
|
||||
<li class="list-group-item"><span class="fa-li"><i class="fas fa-arrows-alt-v"></i></span>{% trans %}title_height{% endtrans %} : {{ directory.height | default('value_no_value'|trans) }}</li>
|
||||
<li class="list-group-item"><span class="fa-li"><i class="fas fa-weight"></i></span>{% trans %}title_weight{% endtrans %} : {{ directory.weight | default('value_no_value'|trans) }}</li>
|
||||
{% if app.user.hasPermission('general_legal_view') %}
|
||||
<li class="list-group-item"><span class="fa-li"><i class="fas fa-wheelchair"></i></span>Groupe associé : {% if directory.gang %} <a href="{{ path('document_view', {id: directory.gang.id}) }}">{{ directory.gang.title }}</a> {% endif %}</li>
|
||||
{% if directory.wanted %}
|
||||
<li class="list-group-item text-danger"><span class="fa-li"><i class="far fa-id-badge"></i></span>{% trans %}title_directory_wanted_light{% endtrans %} : {{ directory.wantedReason | default('value_no_value'|trans) }}</li>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
</ul>
|
||||
<div class="card">
|
||||
<div class="card-header"><i class="fas fa-home"></i> {% trans %}title_address{% endtrans %}</div>
|
||||
<div class="card-body">
|
||||
{{ directory.address | default('value_no_value'|trans) | raw }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% if app.user.hasPermission('general_medical_view') %}
|
||||
{% include '_cells/directoryCardMedical.html.twig' with {'directory': directory} %}
|
||||
{% endif %}
|
||||
38
templates/_cells/directoryCardMedical.html.twig
Normal file
38
templates/_cells/directoryCardMedical.html.twig
Normal file
@@ -0,0 +1,38 @@
|
||||
<div class="card user-card user-card-1">
|
||||
<div class="card-header">{% trans %}title_medical_informations{% endtrans %}
|
||||
{% if is_granted('edit', directory) %}
|
||||
<span class="float-end">
|
||||
<a href="{{ path('directory_edit', {'id': directory.id}) }}" class="btn btn-success btn-sm" data-bs-toggle="tooltip" data-placement="top" title="{% trans %}tooltip_edit_medical{% endtrans %}"><i class="far fa-edit"></i></a>
|
||||
</span>
|
||||
{% endif %}</div>
|
||||
<div class="card-body pb-0">
|
||||
<div class=" mb-2 p-2 border">
|
||||
<p>{% trans %}title_medical_family_history{% endtrans %}</p><hr>
|
||||
{{ directory.medicalFamilyHistory | raw }}
|
||||
</div>
|
||||
<div class=" mb-2 p-2 border">
|
||||
<p>{% trans %}title_medical_history{% endtrans %}</p><hr>
|
||||
{{ directory.medicalHistory | raw }}
|
||||
</div>
|
||||
<div class=" mb-2 p-2 border">
|
||||
<p>{% trans %}title_medical_allergies{% endtrans %}</p><hr>
|
||||
{{ directory.medicalAllergies | raw }}
|
||||
</div>
|
||||
<div class=" mb-2 p-2 border">
|
||||
<p>{% trans %}title_medical_blood{% endtrans %}</p><hr>
|
||||
{{ directory.medicalBloodGroup | raw }}
|
||||
</div>
|
||||
<div class=" mb-2 p-2 border">
|
||||
<p>{% trans %}title_medical_drugs{% endtrans %}</p><hr>
|
||||
{{ directory.medicalDrugs | raw }}
|
||||
</div>
|
||||
<div class=" mb-2 p-2 border">
|
||||
<p>{% trans %}title_medical_alcohol{% endtrans %}</p><hr>
|
||||
{{ directory.medicalAlcohol | raw }}
|
||||
</div>
|
||||
<div class=" mb-2 p-2 border">
|
||||
<p>{% trans %}title_medical_treatment{% endtrans %}</p><hr>
|
||||
{{ directory.medicalTreatment | raw }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
39
templates/_cells/directoryTable.html.twig
Normal file
39
templates/_cells/directoryTable.html.twig
Normal file
@@ -0,0 +1,39 @@
|
||||
{% if directories|length > 0 %}
|
||||
<div class="table-responsive">
|
||||
<table class="table table-dark table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th scope="col">{% trans %}title_full_name{% endtrans %}</th>
|
||||
{% if date is not defined %}<th scope="col">{% trans %}title_informations{% endtrans %}</th>{% endif %}
|
||||
{% if noaction is not defined %}
|
||||
<th scope="col">{% trans %}title_actions{% endtrans %}</th>
|
||||
{% endif %}
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for i in directories %}
|
||||
<tr>
|
||||
<td>
|
||||
<a href="{{ path('directory_view', {'id': i.id}) }}" data-bs-toggle="tooltip" data-placement="top" title="{% trans %}tooltip_view{% endtrans %}"># {{i.id}} - {{i.fullName}}{% if i.dead %}, {% trans %}title_dead{% endtrans %}{% endif %}</a>
|
||||
{% if i.wanted %}<p class="text-danger">{% trans %}title_directory_wanted_light{% endtrans %}</p>{% endif %}
|
||||
</td>
|
||||
<td>
|
||||
<ul>
|
||||
{% if nogender is not defined %}<li>{% trans %}title_gender{% endtrans %}: {{i.gender}}</li>{% endif %}
|
||||
{% if nophone is not defined %}<li>{% trans %}title_phone{% endtrans %}: {{i.phone}}</li>{% endif %}
|
||||
{% if nodate is not defined %}<li>{% trans %}title_created_at{% endtrans %}: {{i.createdAt |date('_datetime.format'|trans)}}</li>{% endif %}
|
||||
</ul>
|
||||
</td>
|
||||
{% if noaction is not defined %}
|
||||
<td>
|
||||
{% include '_cells/directoryActions.html.twig' with {'directory': i} %}
|
||||
</td>
|
||||
{% endif %}
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
{% else %}
|
||||
<p>{% trans %}no_data{% endtrans %}</p>
|
||||
{% endif %}
|
||||
27
templates/_cells/documentActions.html.twig
Normal file
27
templates/_cells/documentActions.html.twig
Normal file
@@ -0,0 +1,27 @@
|
||||
{% if is_granted('view', document) %}
|
||||
{% if currentPath != path('document_view', {'id': document.id}) and noview is not defined %}
|
||||
<a href="{{ path('document_view', {'id': document.id}) }}" class="btn btn-primary btn-sm" data-bs-toggle="tooltip" data-placement="top" title="{% trans %}tooltip_view{% endtrans %}"><i class="far fa-eye"></i></a>
|
||||
{% endif %}
|
||||
{% if is_granted('edit', document) and noedit is not defined %}
|
||||
<a href="{{ path('document_edit', {'id': document.id}) }}" class="btn btn-success btn-sm" data-bs-toggle="tooltip" data-placement="top" title="{% trans %}tooltip_edit{% endtrans %}"><i class="far fa-edit"></i></a>
|
||||
{% endif %}
|
||||
{% if is_granted('delete', document) and nodelete is not defined %}
|
||||
<a href="{{ path('document_delete', {'id': document.id}) }}" class="btn btn-danger btn-sm" data-bs-toggle="tooltip" data-placement="top" title="{% trans %}tooltip_delete{% endtrans %}" onclick="return confirm('{% trans %}confirm_ok_delete{% endtrans %}')"><i class="fa fa-trash"></i></a>
|
||||
{% endif %}
|
||||
{% if document.allowShare and noshare is not defined %}
|
||||
<a href="{{ path('share', {'share': document.share}) }}" class="btn btn-info btn-sm" data-bs-toggle="tooltip" data-placement="top" title="{% trans %}tooltip_share_link{% endtrans %}" target="_blank"><i class="fa fa-link"></i></a>
|
||||
{% endif %}
|
||||
{% if is_granted('archive', document) and noarchive is not defined %}
|
||||
<a href="{{ path('document_archive', {'id': document.id}) }}" class="btn btn-{% if document.archive %}danger{% else %}info{% endif %} btn-sm" data-bs-toggle="tooltip" data-placement="top" title="{% if document.archive %}{% trans %}tooltip_unarchive{% endtrans %}{% else %}{% trans %}tooltip_archive{% endtrans %}{% endif %}" onclick="return confirm('Are you ok to {% if document.archive %}un{% endif %}archive this ?')"><i class="fas fa-archive"></i></a>
|
||||
{% endif %}
|
||||
|
||||
{% if addtofolder is defined %}
|
||||
<a href="{{ path('folder_document_add', {'id': addtofolder, 'Document': document.id}) }}" class="btn btn-success btn-sm" data-bs-toggle="tooltip" data-placement="top" title="{% trans %}tooltip_add_to_folder{% endtrans %}"><i class="fas fa-folder-plus"></i></a>
|
||||
{% endif %}
|
||||
{% if removefromfolder is defined %}
|
||||
<a href="{{ path('folder_document_remove', {'id': removefromfolder, 'Document': document.id}) }}" class="btn btn-danger btn-sm" data-bs-toggle="tooltip" data-placement="top" title="{% trans %}tooltip_remove_from_folder{% endtrans %}" onclick="return confirm('{% trans %}confirm_ok_remove_from_folder{% endtrans %}')"><i class="fas fa-folder-minus"></i></a>
|
||||
{% endif %}
|
||||
|
||||
{% else %}
|
||||
<span class="text-danger"><i class="fas fa-eye-slash"></i></span>
|
||||
{% endif %}
|
||||
122
templates/_cells/documentTable.html.twig
Normal file
122
templates/_cells/documentTable.html.twig
Normal file
@@ -0,0 +1,122 @@
|
||||
{% if documents[0].directory is not defined %}{% set nodirectorylink = true %}{% endif %}
|
||||
{% set slicelimit = (limit is defined)? limit : null %}
|
||||
{% set counter = 0 %}
|
||||
|
||||
{% if documents|length > 0 %}
|
||||
<div class="table-responsive">
|
||||
<table class="table table-dark table-striped table-hover align-middle">
|
||||
<thead>
|
||||
<tr>
|
||||
|
||||
{% if noicon is not defined and notype is not defined %}
|
||||
<th scope="col">
|
||||
{% if notype is not defined %}
|
||||
{% trans %}title_type{% endtrans %}
|
||||
{% endif %}
|
||||
</th>
|
||||
{% endif %}
|
||||
<th scope="col">{% trans %}title_title{% endtrans %}</th>
|
||||
<th scope="col">{% if noauthor is not defined %}{% trans %}title_author{% endtrans %} / {% endif %}{% trans %}title_date{% endtrans %}</th>
|
||||
{% if noaction is not defined %}
|
||||
<th scope="col">{% trans %}title_actions{% endtrans %}</th>
|
||||
{% endif %}
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for i in documents |slice(0, slicelimit) %}
|
||||
{% set counter = counter + 1 %}
|
||||
<tr>
|
||||
{% if noicon is not defined and notype is not defined %}
|
||||
<td>
|
||||
{% if noicon is not defined %}
|
||||
{% set groupLogo = 'img/nologo.png' %}
|
||||
{% if i.mainGroup %}
|
||||
{% if i.mainGroup.imageSize != 0 %}
|
||||
{% set groupLogo = 'uploads/groups/' ~ i.mainGroup.imageName %}
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
<img src="{{ asset(groupLogo) }}" alt="{{ i.mainGroup.name }} " class="img-icon">
|
||||
{% endif %}
|
||||
{% if notype is not defined %}
|
||||
{{ ("documentType_" ~ i.classShort)|trans }}<br /><small>N°: #{{i.id}}</small>
|
||||
{% endif %}
|
||||
</td>
|
||||
{% endif %}
|
||||
|
||||
<td>
|
||||
<a href="{{ path('document_view', {'id': i.id}) }}" class="text-{{ (i.archive)? 'danger' : 'primary' }}" {% if i.archive %} data-bs-toggle="tooltip" data-placement="top" title="{% trans %}tooltip_archived{% endtrans %}" {% endif %} >`{{i.title | u.truncate(20, '...')}}`</a>
|
||||
{% if notype is defined %}
|
||||
<br /><small>N°: #{{i.id}}</small>
|
||||
{% endif %}
|
||||
{% if i.status is defined %}
|
||||
<br /><small>{% trans %}title_status{% endtrans %}:</small>
|
||||
<small>{{ i.status|trans }}</small>
|
||||
{% endif %}
|
||||
{% if i.removingDate is defined %}
|
||||
<br /><small>{% trans %}title_can_be_removed_at{% endtrans %}:</small>
|
||||
<small class="text-{% if date(i.removingDate) < date() %}danger{% endif %}{% if date(i.removingDate) == date() %}warning{% endif %}{% if date(i.removingDate) > date() %}success{% endif %}">{{ i.removingDate|date('_datetime.format'|trans) }}</small>
|
||||
{% endif %}
|
||||
{% if i.type is defined and i.type is not null %}
|
||||
<br /><small>{% trans %}title_type{% endtrans %}:</small>
|
||||
<small>{{ i.type|trans }}</small>
|
||||
{% endif %}
|
||||
{% if i.numberplate is defined and i.numberplate is not null %}
|
||||
<br /><small>{% trans %}title_numberplate{% endtrans %}:</small>
|
||||
<small>{{ i.numberplate }}</small>
|
||||
{% endif %}
|
||||
{% if i.directory is defined and nodirectoryinfo is not defined %}
|
||||
<br /><small>{% trans %}title_directory{% endtrans %}:</small>
|
||||
<small><a href="{{ path('directory_view', {'id': i.directory.id}) }}" >{{ i.directory.firstname | u.truncate(2, '.')}} {{ i.directory.lastname }} {% if i.directory.dead %}, {% trans %}title_dead{% endtrans %}{% endif %}</a></small>
|
||||
{% endif %}
|
||||
{% if i.user is defined %}
|
||||
<br /><small>{% trans %}title_user{% endtrans %}:</small>
|
||||
<small><a href="{{ path('user_view', {'id': i.user.id}) }}" >{{ i.user.firstname | u.truncate(2, '.')}} {{ i.user.lastname }}</a></small>
|
||||
{% endif %}
|
||||
{% if i.article is defined %}
|
||||
<br /><small>{% trans %}title_article{% endtrans %}:</small>
|
||||
<small data-bs-toggle="tooltip" data-placement="top" title="{{ i.article }}">{{ i.article| u.truncate(10, '...') }}</small>
|
||||
{% endif %}
|
||||
{% if i.amountMoney is defined %}
|
||||
<br /><small>{% trans %}title_amount{% endtrans %}:</small>
|
||||
<small>{{ i.amountMoney ? i.amountMoney ~ ' ' ~'currency_symbol'|trans :'value_no_value'|trans }}</small>
|
||||
{% endif %}
|
||||
{% if i.amountTime is defined %}
|
||||
<br /><small>{% trans %}title_hours{% endtrans %}:</small>
|
||||
<small>{{ i.amountTime ? i.amountTime ~ ' h' :'value_no_value'|trans}}</small>
|
||||
{% endif %}
|
||||
{% if i.accessorySentence is defined and i.accessorySentence is not null %}
|
||||
<br /><small data-bs-toggle="tooltip" data-placement="top" title="{{ i.accessorySentence|striptags }}">{% trans %}title_accessorySentence{% endtrans %} : {{ 'value_yes'|trans}}</small>
|
||||
{% endif %}
|
||||
</td>
|
||||
<td>
|
||||
{% if noauthor is not defined %}
|
||||
<a href="{{ path('user_view', {'id': i.creator.id }) }}" >{{i.creator.firstname | u.truncate(2, '.')}} {{i.creator.lastname}}, {{i.creator.mainGroup ? i.creator.mainGroup.shortname : 'value_no_group'|trans}}</a><br />
|
||||
{% endif %}
|
||||
{{i.createdAt |date('_datetime.format'|trans)}}
|
||||
</td>
|
||||
{% if noaction is not defined %}
|
||||
<td>
|
||||
{% include '_cells/documentActions.html.twig' with {'document': i} %}
|
||||
</td>
|
||||
{% endif %}
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
{% if slicelimit is not null and documents|length > slicelimit %}
|
||||
<div class="row my-2">
|
||||
<div class="col">
|
||||
{% if nodirectorylink is not defined %}
|
||||
<a class="btn btn-primary btn-sm" href="{{ path('document_list', {'type': documents[0].classShort, 'directory': documents[0].directory.id}) }}">{% trans %}button_view_more{% endtrans %}</a>
|
||||
{% else %}
|
||||
<a class="btn btn-primary btn-sm" href="{{ path('document_list', {'type': documents[0].classShort}) }}">{% trans %}button_view_more{% endtrans %}</a>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
{% else %}
|
||||
<p>{% trans %}no_data{% endtrans %}</p>
|
||||
{% endif %}
|
||||
48
templates/_cells/historyDisplay.html.twig
Normal file
48
templates/_cells/historyDisplay.html.twig
Normal file
@@ -0,0 +1,48 @@
|
||||
<h5>{% trans %}title_order_from_last_old{% endtrans %}</h5>
|
||||
<hr>
|
||||
{% for i in history %}
|
||||
<div class="row border m-2">
|
||||
<div class="col-md-8">
|
||||
<p class="text-info">{{ ('history_' ~ i.action)|trans }} : {{ i.loggedAt |date('_datetime.format'|trans) }}
|
||||
{% if i.username %}
|
||||
{% trans %}title_author{% endtrans %}: {% if '@' in i.username and app.user.adminmode == false %} {% trans %}hided_email{% endtrans %} {% else %} {{ i.username }} {% endif %}
|
||||
{% else %}
|
||||
{% trans %}title_noauthor{% endtrans %}
|
||||
{% endif %}
|
||||
</p>
|
||||
{% if notype is not defined %}
|
||||
<p>{{ i.objectClass }} (# {{ i.objectId }})</p>
|
||||
{% endif %}
|
||||
<p>{{ ('title_data_' ~ i.action)|trans }}</p>
|
||||
<div class="table-responsive">
|
||||
<table class="table table-dark table-striped table-bordered">
|
||||
<thead>
|
||||
<tr>
|
||||
<th scope="col">{% trans %}title_field{% endtrans %}</th>
|
||||
<th scope="col">{% trans %}title_value{% endtrans %}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
{% for field, value in i.data %}
|
||||
<tr>
|
||||
<td>
|
||||
{{ ('form_label_' ~ field)|trans }}
|
||||
</td>
|
||||
<td>
|
||||
{% if value is iterable %}
|
||||
{% for x, y in value %}
|
||||
{{ x }} : {% if y is iterable %}{'iterable_value'|trans }}{% else %}{{ y }}{% endif %}
|
||||
{% endfor %}
|
||||
{% elseif value.timestamp is defined %}
|
||||
{{ value|date('_datetime.format'|trans) }}
|
||||
{% else %}
|
||||
{{ value? value|raw : 'value_no_value'|trans }}
|
||||
{% endif %}
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endfor %}
|
||||
4
templates/_cells/notificationActions.html.twig
Normal file
4
templates/_cells/notificationActions.html.twig
Normal file
@@ -0,0 +1,4 @@
|
||||
{% if i.readed == false %}
|
||||
<a href="{{ path('notification_markread', {'id': notification.id}) }}" class="btn btn-success btn-sm" data-bs-toggle="tooltip" data-placement="top" title="{% trans %}tooltip_markread{% endtrans %}"><i class="fas fa-check"></i></a>
|
||||
{% endif %}
|
||||
<a href="{{ path('notification_delete', {'id': notification.id}) }}" class="btn btn-danger btn-sm" data-bs-toggle="tooltip" data-placement="top" title="{% trans %}tooltip_delete{% endtrans %}" onclick="return confirm('{% trans %}confirm_ok_delete{% endtrans %}')"><i class="fa fa-trash"></i></a>
|
||||
33
templates/_cells/notificationTable.html.twig
Normal file
33
templates/_cells/notificationTable.html.twig
Normal file
@@ -0,0 +1,33 @@
|
||||
{% if notifications|length > 0 %}
|
||||
<div class="table-responsive">
|
||||
<table class="table table-dark table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th scope="col">{% if nosender is not defined %}{% trans %}title_sender{% endtrans %} / {% endif %}{% trans %}title_date{% endtrans %}</th>
|
||||
<th scope="col">{% trans %}title_notification{% endtrans %}</th>
|
||||
{% if noaction is not defined %}<th>{% trans %}title_actions{% endtrans %}</th>{% endif %}
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for i in notifications %}
|
||||
<tr>
|
||||
<th scope="row">
|
||||
{% if nosender is not defined %}
|
||||
<a href="{{ path('user_view', {'id': i.sender.id }) }}" >{{i.sender.firstname | u.truncate(2, '.')}} {{i.sender.lastname}}, {{i.sender.mainGroup ? i.sender.mainGroup.shortname : 'value_no_group'|trans}}</a><br />
|
||||
{% endif %}
|
||||
{{i.createdAt |date('_datetime.format'|trans)}}
|
||||
</th>
|
||||
<td>{{ i.content|raw }}</td>
|
||||
{% if noaction is not defined %}
|
||||
<td>
|
||||
{% include '_cells/notificationActions.html.twig' with {'notification': i} %}
|
||||
</td>
|
||||
{% endif %}
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
{% else %}
|
||||
<p>{% trans %}no_data{% endtrans %}</p>
|
||||
{% endif %}
|
||||
12
templates/_cells/userActions.html.twig
Normal file
12
templates/_cells/userActions.html.twig
Normal file
@@ -0,0 +1,12 @@
|
||||
{% if currentPath != path('user_view', {'id': user.id}) %}
|
||||
<a href="{{ path('user_view', {'id': user.id}) }}" class="btn btn-primary btn-sm" data-bs-toggle="tooltip" data-placement="top" title="{% trans %}tooltip_view{% endtrans %}"><i class="far fa-eye"></i></a>
|
||||
{% endif %}
|
||||
{% if is_granted('fire', user.mainGroup) and nofire is not defined %}
|
||||
<a href="{{ path('group_fire', {'id': user.id}) }}" class="btn btn-danger btn-sm" data-bs-toggle="tooltip" data-placement="top" title="{% trans %}tooltip_fire{% endtrans %}"><i class="fas fa-user-slash"></i></a>
|
||||
{% endif %}
|
||||
{% if is_granted('employee', user.mainGroup) and noemployee is not defined %}
|
||||
<a href="{{ path('group_employee', {'id': user.id}) }}" class="btn btn-success btn-sm" data-bs-toggle="tooltip" data-placement="top" title="{% trans %}tooltip_employee{% endtrans %}"><i class="fas fa-user-cog"></i></a>
|
||||
{% endif %}
|
||||
{% if is_granted('sanction', user.mainGroup) and nosanction is not defined %}
|
||||
<a href="{{ path('document_create_user', {type: 'sanction', user: user.id}) }}" class="btn btn-warning btn-sm" data-bs-toggle="tooltip" data-placement="top" title="{% trans %}tooltip_sanction{% endtrans %}"><i class="fas fa-user-times"></i></a>
|
||||
{% endif %}
|
||||
10
templates/_cells/userInformations.html.twig
Normal file
10
templates/_cells/userInformations.html.twig
Normal file
@@ -0,0 +1,10 @@
|
||||
<ul class="list-group list-group-flush">
|
||||
<li class="list-group-item list-group-item-dark">{% trans %}title_full_name{% endtrans %} : <a href="{{ path('user_view', {'id': user.id}) }}">{{user.fullName}}</a></li>
|
||||
<li class="list-group-item list-group-item-dark">{% trans %}title_group{% endtrans %} : {{user.mainGroup ? user.mainGroup.name : 'value_no_group'|trans }}</li>
|
||||
<li class="list-group-item list-group-item-dark">{% trans %}title_rank{% endtrans %} : {{user.mainRank ? user.mainRank.name : 'value_no_rank'|trans}}</li>
|
||||
<li class="list-group-item list-group-item-dark">{% trans %}title_subgroups{% endtrans %} : {% if user.subGroups %}
|
||||
{% for sg in user.subGroups %}{{ sg.name}}{% if loop.last == false %}, {% endif %}{% endfor %}
|
||||
{% else %}{{'value_no_subgroups'|trans}}{% endif %}</li>
|
||||
<li class="list-group-item list-group-item-dark">{% trans %}title_phone{% endtrans %} : {{user.phone ? user.phone : 'value_no_value'|trans}}</li>
|
||||
<li class="list-group-item list-group-item-dark">{% trans %}title_created_at{% endtrans %} : {{user.createdAt |date('_datetime.format'|trans)}}</li>
|
||||
</ul>
|
||||
22
templates/_cells/userTable.html.twig
Normal file
22
templates/_cells/userTable.html.twig
Normal file
@@ -0,0 +1,22 @@
|
||||
<div class="table-responsive">
|
||||
<table class="table table-dark table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th scope="col">{% trans %}title_full_name{% endtrans %}</th>
|
||||
<th scope="col">{% trans %}title_group{% endtrans %} / {% trans %}title_rank{% endtrans %}</th>
|
||||
<th scope="col">{% trans %}title_actions{% endtrans %}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for i in users %}
|
||||
<tr>
|
||||
<td>{{ i.fullName }}<br><small>{% trans %}title_phone{% endtrans %}: {{i.phone ? i.phone : 'value_no_value'|trans}}</small></td>
|
||||
<td>{{i.mainGroup ? i.mainGroup.shortName : 'value_no_group'|trans}}<br><small>{{i.mainRank ? i.mainRank.name : 'value_no_rank'|trans}}</small></td>
|
||||
<td>
|
||||
{% include '_cells/userActions.html.twig' with {'user': i} %}
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
Reference in New Issue
Block a user