Fix and Enhancements
This commit is contained in:
1
.env
1
.env
@@ -1,6 +1,7 @@
|
||||
APP_ENV=prod
|
||||
DEFAULT_LOCALE=en
|
||||
APP_SECRET=e80d9c53871bdaa0a1ff5357c695ba6d
|
||||
TZ=America/New_York
|
||||
###> symfony/lock ###
|
||||
# Choose one of the stores below
|
||||
# postgresql+advisory://db_user:db_password@localhost/db_name
|
||||
|
||||
@@ -2,7 +2,7 @@ twig:
|
||||
default_path: '%kernel.project_dir%/templates'
|
||||
form_themes: ['form_layout.html.twig']
|
||||
date:
|
||||
timezone: Europe/Paris
|
||||
timezone: '%env(TZ)%'
|
||||
|
||||
when@test:
|
||||
twig:
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
{
|
||||
"version": "0.1.2"
|
||||
"version": "0.1.3"
|
||||
}
|
||||
|
||||
@@ -70,23 +70,34 @@ class AdminController extends AbstractController
|
||||
|
||||
//-- users
|
||||
#[Route('/user', name: 'user_list')]
|
||||
#[Route('/user/admin', name: 'user_list_admin')]
|
||||
#[Route('/user/desactivated', name: 'user_list_desactivated')]
|
||||
public function user(PaginatorInterface $paginator, Request $request, UserRepository $UserRepository): Response
|
||||
{
|
||||
|
||||
$searchForm = $this->createForm(SearchBarType::class);
|
||||
$searchForm->handleRequest($request);
|
||||
|
||||
$req = $UserRepository->getAll()
|
||||
->search(
|
||||
(
|
||||
$searchForm->isSubmitted()
|
||||
&& $searchForm->isValid()
|
||||
&& $searchForm->getData()['subject'] !== null
|
||||
) ? $searchForm->getData()['subject'] : null,
|
||||
true
|
||||
);
|
||||
|
||||
if ($request->attributes->get('_route') == 'admin_user_list_admin') {
|
||||
$req->onlyRole('ADMIN');
|
||||
}
|
||||
|
||||
if ($request->attributes->get('_route') == 'admin_user_list_desactivated') {
|
||||
$req->onlyDesactivated();
|
||||
}
|
||||
|
||||
$pagination = $paginator->paginate(
|
||||
$UserRepository->getAll()
|
||||
->search(
|
||||
(
|
||||
$searchForm->isSubmitted()
|
||||
&& $searchForm->isValid()
|
||||
&& $searchForm->getData()['subject'] !== null
|
||||
) ? $searchForm->getData()['subject'] : null,
|
||||
true
|
||||
)
|
||||
->getResult(),
|
||||
$req->getResult(),
|
||||
$request->query->getInt('page', 1)
|
||||
);
|
||||
|
||||
@@ -94,6 +105,8 @@ class AdminController extends AbstractController
|
||||
'controller_name' => 'AdminController',
|
||||
'searchForm' => $searchForm->createView(),
|
||||
'pagination' => $pagination,
|
||||
'admin' => ($request->attributes->get('_route') == 'admin_user_list_admin'),
|
||||
'desactivated' => ($request->attributes->get('_route') == 'admin_user_list_desactivated')
|
||||
]);
|
||||
}
|
||||
|
||||
|
||||
@@ -3,7 +3,6 @@
|
||||
namespace App\Controller;
|
||||
|
||||
use App\Entity\User;
|
||||
use App\Form\TestType;
|
||||
use App\Entity\Comment;
|
||||
use App\Entity\Document;
|
||||
use App\Entity\Directory;
|
||||
|
||||
@@ -18,7 +18,12 @@ class GroupController extends AbstractController
|
||||
#[Route('/', name: 'index')]
|
||||
public function index(Request $request, TemplateRepository $TemplateRepository): Response
|
||||
{
|
||||
$group = $this->getUser()->getMainGroup();
|
||||
|
||||
/**
|
||||
* @var User $currentUser
|
||||
*/
|
||||
$currentUser = $this->getUser();
|
||||
$group = $currentUser->getMainGroup();
|
||||
if (!$this->IsGranted('administrate', $group)) {
|
||||
throw new AccessDeniedHttpException('granted_not_allowed_administrate_group');
|
||||
}
|
||||
@@ -49,7 +54,7 @@ class GroupController extends AbstractController
|
||||
'controller_name' => 'GroupController',
|
||||
'formMOTD' => $form->createView(),
|
||||
'group' => $group,
|
||||
'templates' => $TemplateRepository->listForUser($this->getUser())->getResult()
|
||||
'templates' => $TemplateRepository->listForUser($currentUser)->getResult()
|
||||
]);
|
||||
}
|
||||
|
||||
@@ -57,16 +62,16 @@ class GroupController extends AbstractController
|
||||
public function fire(User $User, Request $Request): Response
|
||||
{
|
||||
|
||||
$group = $this->getUser()->getMainGroup();
|
||||
if (!$this->IsGranted('fire', $group)) {
|
||||
throw new AccessDeniedHttpException('granted_not_allowed_fire_employee');
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @var User $currentUser
|
||||
*/
|
||||
$currentUser = $this->getUser();
|
||||
|
||||
$group = $currentUser->getMainGroup();
|
||||
if (!$this->IsGranted('fire', $group)) {
|
||||
throw new AccessDeniedHttpException('granted_not_allowed_fire_employee');
|
||||
}
|
||||
|
||||
if (
|
||||
$User->getMainRank()->getPower() >= $currentUser->getMainRank()->getPower()
|
||||
&& !$currentUser->getAdminMode()
|
||||
@@ -101,14 +106,19 @@ class GroupController extends AbstractController
|
||||
#[Route('/employee/{id}', name: 'employee')]
|
||||
public function employee(User $Employee, Request $Request): Response
|
||||
{
|
||||
$group = $this->getUser()->getMainGroup();
|
||||
/**
|
||||
* @var User $currentUser
|
||||
*/
|
||||
$currentUser = $this->getUser();
|
||||
|
||||
$group = $currentUser->getMainGroup();
|
||||
if (!$this->IsGranted('administrate', $group)) {
|
||||
throw new AccessDeniedHttpException('granted_not_allowed_administrate_group');
|
||||
}
|
||||
|
||||
//check if employee belong to user group
|
||||
|
||||
if ($Employee->getMainGroup() != $this->getUser()->getMainGroup()) {
|
||||
if ($Employee->getMainGroup() != $currentUser->getMainGroup()) {
|
||||
throw new AccessDeniedHttpException('granted_not_allowed_administrate_other_group_employee');
|
||||
}
|
||||
|
||||
|
||||
@@ -231,6 +231,16 @@ class Group
|
||||
return $this->users;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return Collection|User[]
|
||||
*/
|
||||
public function getUsersActive(): Collection
|
||||
{
|
||||
return $this->users->filter(function (User $user) {
|
||||
return !$user->getIsDesactivated();
|
||||
});
|
||||
}
|
||||
|
||||
public function addUser(User $user): self
|
||||
{
|
||||
if (!$this->users->contains($user)) {
|
||||
|
||||
@@ -3,6 +3,8 @@
|
||||
namespace App\Form;
|
||||
|
||||
use App\Entity\Bracelet;
|
||||
use App\Form\DocumentType;
|
||||
use App\Form\Type\DateTimeVisionType;
|
||||
use Symfony\Component\Form\FormBuilderInterface;
|
||||
use Symfony\Component\OptionsResolver\OptionsResolver;
|
||||
|
||||
@@ -12,7 +14,7 @@ class BraceletType extends DocumentType
|
||||
{
|
||||
parent::buildForm($builder, $options);
|
||||
$builder
|
||||
->add('removingDate', null, ['label' => 'form_label_removing_date'])
|
||||
->add('removingDate', DateTimeVisionType::class, ['label' => 'form_label_removing_date'])
|
||||
;
|
||||
}
|
||||
|
||||
|
||||
@@ -5,6 +5,7 @@ namespace App\Form;
|
||||
use App\Entity\Jail;
|
||||
use App\Form\DocumentType;
|
||||
use App\Form\Type\ContentType;
|
||||
use App\Form\Type\DateTimeVisionType;
|
||||
use Symfony\Component\Form\FormBuilderInterface;
|
||||
use Symfony\Component\OptionsResolver\OptionsResolver;
|
||||
use Symfony\Component\Form\Extension\Core\Type\CheckboxType;
|
||||
@@ -16,8 +17,16 @@ class JailType extends DocumentType
|
||||
parent::buildForm($builder, $options);
|
||||
|
||||
$builder
|
||||
->add('arrestedAt', null, ['label' => 'form_label_arrested_at', 'help' => 'form_help_arrested_at'])
|
||||
->add('jailedAt', null, ['label' => 'form_label_jailed_at', 'help' => 'form_help_jailed_at'])
|
||||
->add(
|
||||
'arrestedAt',
|
||||
DateTimeVisionType::class,
|
||||
['label' => 'form_label_arrested_at', 'help' => 'form_help_arrested_at']
|
||||
)
|
||||
->add(
|
||||
'jailedAt',
|
||||
DateTimeVisionType::class,
|
||||
['label' => 'form_label_jailed_at', 'help' => 'form_help_jailed_at']
|
||||
)
|
||||
->add('lawyer', CheckboxType::class, ['label' => 'form_label_asked_for_lawyer', 'required' => false])
|
||||
->add('medic', CheckboxType::class, ['label' => 'form_label_asked_for_medic', 'required' => false])
|
||||
->add('content', ContentType::class)
|
||||
|
||||
@@ -5,6 +5,7 @@ namespace App\Form;
|
||||
use App\Form\DocumentType;
|
||||
use App\Form\Type\VehicleType;
|
||||
use App\Entity\LicenceWithdrawal;
|
||||
use App\Form\Type\DateTimeVisionType;
|
||||
use Symfony\Component\Form\FormBuilderInterface;
|
||||
use Symfony\Component\OptionsResolver\OptionsResolver;
|
||||
|
||||
@@ -18,7 +19,7 @@ class LicenceWithdrawalType extends DocumentType
|
||||
$builder
|
||||
|
||||
->add('type', VehicleType::class)
|
||||
->add('until', null, ['label' => 'form_label_until', 'help' => 'form_help_until'])
|
||||
->add('until', DateTimeVisionType::class, ['label' => 'form_label_until', 'help' => 'form_help_until'])
|
||||
;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,58 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace App\Form;
|
||||
|
||||
use App\Entity\Document;
|
||||
use App\Entity\User;
|
||||
use Symfony\Component\Form\AbstractType;
|
||||
use Symfony\Component\Form\FormBuilderInterface;
|
||||
use Symfony\Component\OptionsResolver\OptionsResolver;
|
||||
use Symfony\Component\Form\Extension\Core\Type\SubmitType;
|
||||
use Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorageInterface;
|
||||
|
||||
class TestType extends AbstractType
|
||||
{
|
||||
private TokenStorageInterface $TokenStorage;
|
||||
|
||||
public function __construct(TokenStorageInterface $TokenStorage)
|
||||
{
|
||||
$this->TokenStorage = $TokenStorage;
|
||||
}
|
||||
|
||||
public function buildForm(FormBuilderInterface $builder, array $options): void
|
||||
{
|
||||
/**
|
||||
* @var User $user
|
||||
*/
|
||||
$User = $this->TokenStorage->getToken()->getUser();
|
||||
|
||||
$builder
|
||||
->add('title', null, [
|
||||
'label' => 'form_label_title',
|
||||
'priority' => 999
|
||||
]);
|
||||
|
||||
$builder
|
||||
->add(
|
||||
'allowShare',
|
||||
null,
|
||||
[
|
||||
'priority' => -900,
|
||||
'label' => 'form_label_allowShare'
|
||||
]
|
||||
)
|
||||
->add('submit', SubmitType::class, [
|
||||
'label' => 'form_button_submit',
|
||||
'priority' => -900,
|
||||
'attr' => ['class' => 'btn-primary'],
|
||||
])
|
||||
;
|
||||
}
|
||||
|
||||
public function configureOptions(OptionsResolver $resolver): void
|
||||
{
|
||||
$resolver->setDefaults([
|
||||
'data_class' => Document::class,
|
||||
]);
|
||||
}
|
||||
}
|
||||
23
src/Form/Type/DateTimeVisionType.php
Normal file
23
src/Form/Type/DateTimeVisionType.php
Normal file
@@ -0,0 +1,23 @@
|
||||
<?php
|
||||
|
||||
namespace App\Form\Type;
|
||||
|
||||
use Symfony\Component\Form\AbstractType;
|
||||
use Symfony\Component\OptionsResolver\OptionsResolver;
|
||||
use Symfony\Component\Form\Extension\Core\Type\DateTimeType;
|
||||
|
||||
class DateTimeVisionType extends AbstractType
|
||||
{
|
||||
public function configureOptions(OptionsResolver $resolver): void
|
||||
{
|
||||
|
||||
$resolver->setDefaults([
|
||||
'view_timezone' => array_key_exists('TZ', $_ENV) ? $_ENV['TZ'] : false
|
||||
]);
|
||||
}
|
||||
|
||||
public function getParent(): string
|
||||
{
|
||||
return DateTimeType::class;
|
||||
}
|
||||
}
|
||||
@@ -79,6 +79,25 @@ class UserRepository extends ServiceEntityRepository implements PasswordUpgrader
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function onlyRole(string $role)
|
||||
{
|
||||
$this->qb->andWhere('u.roles LIKE :role')
|
||||
->setParameter('role', '%ROLE_' . strtoupper($role) . '%');
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function onlyActive()
|
||||
{
|
||||
$this->qb->andWhere('u.isDesactivated = 0');
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function onlyDesactivated()
|
||||
{
|
||||
$this->qb->andWhere('u.isDesactivated = 1');
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function search(?string $search, bool $adminmode = false)
|
||||
{
|
||||
if (null === $search) {
|
||||
|
||||
@@ -3,20 +3,17 @@
|
||||
namespace App\Security\Voter\Tools;
|
||||
|
||||
use App\Entity\User;
|
||||
use Psr\Log\LoggerInterface;
|
||||
use Symfony\Component\Security\Core\User\UserInterface;
|
||||
use Symfony\Component\Security\Core\Authorization\Voter\Voter;
|
||||
|
||||
abstract class VoterInterface extends Voter
|
||||
{
|
||||
private LoggerInterface $logger;
|
||||
public User $user;
|
||||
public array $userpermissions;
|
||||
public ?string $permissionsPrefix;
|
||||
|
||||
public function __construct(LoggerInterface $logger)
|
||||
public function __construct()
|
||||
{
|
||||
$this->logger = $logger;
|
||||
$this->setPermissionsPrefix(null);
|
||||
}
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<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-header">{{ directory.fullname}} {% if app.user %}<span class="float-end">{% include '_cells/directoryActions.html.twig' with {'directory': directory} %}</span>{% endif %}</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 %}
|
||||
@@ -25,29 +25,29 @@
|
||||
|
||||
{% if directory.idCardImageSize != 0 %}
|
||||
<div class="col-2 col-xs-4">
|
||||
<a data-toggle="lightbox" data-gallery="directory" href="{{ asset(path_directories_uploads ~ '/' ~ directory.idCardImageName) }}"><img class="img-fluid m-1" src="{{ asset(path_directories_uploads ~ '/' ~ directory.idCardImageName) }}" alt="{% trans %}tooltip_id_card{% endtrans %}"></a>
|
||||
<a data-toggle="lightbox" data-gallery="directory" href="{{ asset(path_directories_uploads ~ '/' ~ directory.idCardImageName) }}"><img class="img-fluid m-1" src="{{ asset(path_directories_uploads ~ '/' ~ directory.idCardImageName) }}" data-bs-toggle="tooltip" data-placement="top" title="{% trans %}tooltip_id_card{% endtrans %}" alt="{% trans %}tooltip_id_card{% endtrans %}"></a>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% if app.user.hasPermission('general_legal_view') %}
|
||||
{% if app.user and app.user.hasPermission('general_legal_view') %}
|
||||
{% if directory.carLicenceImageSize != 0 %}
|
||||
<div class="col-2 col-xs-4">
|
||||
<a data-toggle="lightbox" data-gallery="directory" href="{{ asset(path_directories_uploads ~ '/' ~ directory.carLicenceImageName) }}"><img class="img-fluid m-1" src="{{ asset(path_directories_uploads ~ '/' ~ directory.carLicenceImageName) }}" alt="{% trans %}tooltip_car_licence{% endtrans %}"></a>
|
||||
</div>
|
||||
<div class="col-2 col-xs-4">
|
||||
<a data-toggle="lightbox" data-gallery="directory" href="{{ asset(path_directories_uploads ~ '/' ~ directory.carLicenceImageName) }}"><img class="img-fluid m-1" src="{{ asset(path_directories_uploads ~ '/' ~ directory.carLicenceImageName) }}" data-bs-toggle="tooltip" data-placement="top" title="{% trans %}tooltip_car_licence{% endtrans %}" alt="{% trans %}tooltip_car_licence{% endtrans %}"></a>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% if directory.motorcycleLicenceImageSize != 0 %}
|
||||
<div class="col-2 col-xs-4">
|
||||
<a data-toggle="lightbox" data-gallery="directory" href="{{ asset(path_directories_uploads ~ '/' ~ directory.motorcycleLicenceImageName) }}"><img class="img-fluid m-1" src="{{ asset(path_directories_uploads ~ '/' ~ directory.motorcycleLicenceImageName) }}" alt="{% trans %}tooltip_motorcycle_licence{% endtrans %}"></a>
|
||||
</div>
|
||||
<div class="col-2 col-xs-4">
|
||||
<a data-toggle="lightbox" data-gallery="directory" href="{{ asset(path_directories_uploads ~ '/' ~ directory.motorcycleLicenceImageName) }}"><img class="img-fluid m-1" src="{{ asset(path_directories_uploads ~ '/' ~ directory.motorcycleLicenceImageName) }}" data-bs-toggle="tooltip" data-placement="top" title="{% trans %}tooltip_motorcycle_licence{% endtrans %}" alt="{% trans %}tooltip_motorcycle_licence{% endtrans %}"></a>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% if directory.truckLicenceImageSize != 0 %}
|
||||
<div class="col-2 col-xs-4">
|
||||
<a data-toggle="lightbox" data-gallery="directory" href="{{ asset(path_directories_uploads ~ '/' ~ directory.truckLicenceImageName) }}"><img class="img-fluid m-1" src="{{ asset(path_directories_uploads ~ '/' ~ directory.truckLicenceImageName) }}" alt="{% trans %}tooltip_truck_licence{% endtrans %}"></a>
|
||||
</div>
|
||||
<div class="col-2 col-xs-4">
|
||||
<a data-toggle="lightbox" data-gallery="directory" href="{{ asset(path_directories_uploads ~ '/' ~ directory.truckLicenceImageName) }}"><img class="img-fluid m-1" src="{{ asset(path_directories_uploads ~ '/' ~ directory.truckLicenceImageName) }}" data-bs-toggle="tooltip" data-placement="top" title="{% trans %}tooltip_truck_licence{% endtrans %}" alt="{% trans %}tooltip_truck_licence{% endtrans %}"></a>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% if directory.boatLicenceImageSize != 0 %}
|
||||
<div class="col-2 col-xs-4">
|
||||
<a data-toggle="lightbox" data-gallery="directory" href="{{ asset(path_directories_uploads ~ '/' ~ directory.boatLicenceImageName) }}"><img class="img-fluid m-1" src="{{ asset(path_directories_uploads ~ '/' ~ directory.boatLicenceImageName) }}" alt="{% trans %}tooltip_boat_licence{% endtrans %}"></a>
|
||||
</div>
|
||||
<div class="col-2 col-xs-4">
|
||||
<a data-toggle="lightbox" data-gallery="directory" href="{{ asset(path_directories_uploads ~ '/' ~ directory.boatLicenceImageName) }}"><img class="img-fluid m-1" src="{{ asset(path_directories_uploads ~ '/' ~ directory.boatLicenceImageName) }}" data-bs-toggle="tooltip" data-placement="top" title="{% trans %}tooltip_boat_licence{% endtrans %}" alt="{% trans %}tooltip_boat_licence{% endtrans %}"></a>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
</div>
|
||||
@@ -58,7 +58,7 @@
|
||||
<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') %}
|
||||
{% if app.user and app.user.hasPermission('general_legal_view') %}
|
||||
<li class="list-group-item"><span class="fa-li"><i class="fas fa-wheelchair"></i></span>{% trans %}title_gang{% endtrans %} : {% if directory.gang %} <a href="{{ path('document_view', {id: directory.gang.id}) }}">{{ directory.gang.title }}</a> {% endif %}{% if directory.gangInfo %}( {{ directory.gangInfo }} ){% endif %}</li>
|
||||
{% if directory.hasnopapers %}
|
||||
<li class="list-group-item"><span class="fa-li"><i class="fas fa-scroll"></i></span>{% trans %}title_hasnopapers{% endtrans %}</li>
|
||||
@@ -76,6 +76,6 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% if app.user.hasPermission('general_medical_view') %}
|
||||
{% if app.user and app.user.hasPermission('general_medical_view') %}
|
||||
{% include '_cells/directoryCardMedical.html.twig' with {'directory': directory} %}
|
||||
{% endif %}
|
||||
@@ -44,7 +44,7 @@
|
||||
{% 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(50, '...')}}`</a>
|
||||
<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(50, '...')}}</a>
|
||||
{% if notype is defined %}
|
||||
<br /><small>N°: #{{i.id}}</small>
|
||||
{% endif %}
|
||||
|
||||
@@ -5,6 +5,19 @@
|
||||
{% block body %}
|
||||
<div class="row">
|
||||
<div class="col-5">{{form(searchForm)}}</div>
|
||||
<div class="col">
|
||||
{% if admin %}
|
||||
<a href="{{ path('admin_user_list') }}" class="btn btn-primary my-1">{% trans %}button_exit_admin_users{% endtrans %}</a>
|
||||
{% else %}
|
||||
<a href="{{ path('admin_user_list_admin') }}" class="btn btn-info my-1">{% trans %}button_go_to_admin_users{% endtrans %}</a>
|
||||
{% endif %}
|
||||
|
||||
{% if desactivated %}
|
||||
<a href="{{ path('admin_user_list') }}" class="btn btn-primary my-1">{% trans %}button_exit_desactivated_users{% endtrans %}</a>
|
||||
{% else %}
|
||||
<a href="{{ path('admin_user_list_desactivated') }}" class="btn btn-info my-1">{% trans %}button_go_to_desactivated_users{% endtrans %}</a>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
|
||||
@@ -21,6 +21,9 @@
|
||||
{% if i.wanted %}
|
||||
<li class="text-danger">{% trans %}title_directory_wanted_light{% endtrans %} : {{ i.wantedReason | default('value_no_value'|trans) }}</li>
|
||||
{% endif %}
|
||||
{% if i.dead %}
|
||||
<li class="text-warning">{% trans %}title_directory_dead{% endtrans %}</li>
|
||||
{% endif %}
|
||||
<li>{% trans %}title_informations{% endtrans %}: {{i.gangInfo}}</li>
|
||||
<li>{% trans %}title_gender{% endtrans %}: {{i.gender}}</li>
|
||||
<li>{% trans %}title_phone{% endtrans %}: {{i.phone}}</li>
|
||||
|
||||
@@ -4,16 +4,14 @@
|
||||
{% block subtitle %}#{{ document.id }}: {{ document.getTitle }} {% endblock %}
|
||||
|
||||
{% block body %}
|
||||
|
||||
{% set groupLogo = 'img/nologo.png' %}
|
||||
{% if document.mainGroup %}
|
||||
{% if document.mainGroup.imageSize != 0 %}
|
||||
{% set groupLogo = 'uploads/groups/' ~ document.mainGroup.imageName %}
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
<div class="row">
|
||||
<div class="col-12 col-md-8 mb-5{% if shared is defined %} mx-5 my-2{% endif %}">
|
||||
|
||||
<div class="row p-2">
|
||||
<div class="col-lg-8 col-xs-12">
|
||||
{% if document.archive %}
|
||||
<div class="card prod-p-card bg-primary background-pattern-white">
|
||||
<div class="card-body">
|
||||
@@ -96,40 +94,20 @@
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="col-12 col-md-4">
|
||||
<div class="col-lg-4 col-xs-12">
|
||||
{% if document.directory is defined and document.directory is not null %}
|
||||
<h3>{% trans %}title_directory_linked{% endtrans %}</h3><hr>
|
||||
{% include '_cells/directoryCard.html.twig' with {'directory': document.directory} %}
|
||||
{% endif %}
|
||||
|
||||
{% if document.user is defined and document.user is not null %}
|
||||
<h3>{% trans %}title_user_linked{% endtrans %}</h3><hr>
|
||||
{% include '_cells/userInformations.html.twig' with {'user': document.user} %}
|
||||
{% endif %}
|
||||
{% include '_cells/directoryCard.html.twig' with {'directory': document.directory} %}
|
||||
{% endif %}
|
||||
|
||||
{% if document.user is defined and document.user is not null %}
|
||||
<h3>{% trans %}title_user_linked{% endtrans %}</h3><hr>
|
||||
{% include '_cells/userInformations.html.twig' with {'user': document.user} %}
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{% if shared is not defined %}
|
||||
<!-- Modal -->
|
||||
<div class="modal fade" id="addCommentModal" tabindex="-1" role="dialog" aria-labelledby="addCommentModalTitle" aria-hidden="true">
|
||||
<div class="modal-dialog modal-dialog-centered modal-xl" role="document">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title" id="addCommentModalTitle">{% trans %}title_add_comment{% endtrans %}</h5>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
{{ form(formComment) }}
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-secondary" data-dismiss="modal">{% trans %}button_cancel{% endtrans %}</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
{% endblock %}
|
||||
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
<h3>{% trans %}title_members{% endtrans %}</h3> <hr>
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
{% include '_cells/userTable.html.twig' with {'users': group.users} %}
|
||||
{% include '_cells/userTable.html.twig' with {'users': group.UsersActive} %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -148,10 +148,14 @@ button_add: Add
|
||||
button_cancel: Cancel
|
||||
button_change_password: Change password
|
||||
button_create: Create
|
||||
button_exit_admin_users: Exit Admin list
|
||||
button_exit_dead_directories: Exit Deceased directories
|
||||
button_exit_desactivated_users: Exit Desactivated users list
|
||||
button_exit_wanted_directories: Exit Wanted directories
|
||||
button_go_to_admin_users: View Admin list
|
||||
button_go_to_archived: Enter archives
|
||||
button_go_to_dead_directories: Enter Deceased directories
|
||||
button_go_to_desactivated_users: View Desactivated users list
|
||||
button_go_to_not_archived: Exit archives
|
||||
button_go_to_wanted_directories: Enter Wanted directories
|
||||
button_group_view_documents: View group documents
|
||||
@@ -814,6 +818,7 @@ tooltip_export_to_report: Export into a report
|
||||
tooltip_fire: Fire
|
||||
tooltip_folder_add_directory: Add a directory to folder
|
||||
tooltip_folder_add_document: Add a document to folder
|
||||
tooltip_id_card: ID Card
|
||||
tooltip_merge: Merge
|
||||
tooltip_motorcycle_licence: Motorcycle licence
|
||||
tooltip_remove_from_folder: Remove from folder
|
||||
@@ -832,4 +837,4 @@ value_no_value: --
|
||||
value_no: No
|
||||
value_yes: Yes
|
||||
Year: Year
|
||||
you_can: You can
|
||||
you_can: You can
|
||||
@@ -148,10 +148,14 @@ button_add: Ajouter
|
||||
button_cancel: Annuler
|
||||
button_change_password: Changer de mot de passe
|
||||
button_create: Créer
|
||||
button_exit_admin_users: Sortir de la liste des admins
|
||||
button_exit_dead_directories: Sortir des personnes décédées
|
||||
button_exit_desactivated_users: Sortir de la liste des desactivés
|
||||
button_exit_wanted_directories: Sortir des personnes recherchées
|
||||
button_go_to_admin_users: Voir la liste des admins
|
||||
button_go_to_archived: Accéder aux archives
|
||||
button_go_to_dead_directories: Accéder aux personnes décédées
|
||||
button_go_to_desactivated_users: Voir la liste des desactivés
|
||||
button_go_to_not_archived: Sortir des Archives
|
||||
button_go_to_wanted_directories: Accéder aux personnes recherchées
|
||||
button_group_view_documents: Voir la liste des documents du groupe
|
||||
@@ -707,6 +711,7 @@ title_group_view_documents: Voir les documents du groupe
|
||||
title_group_view: Voir un groupe
|
||||
title_group: Groupe
|
||||
title_groups: Groupes
|
||||
title_hasnopapers: Sans papier
|
||||
title_height: Taille
|
||||
title_history: Historique
|
||||
title_home: Accueil
|
||||
@@ -794,7 +799,6 @@ title_wanted_directory: Personnes recherchées
|
||||
title_wanted: Personne Recherchée
|
||||
title_wanteds: Recherchés
|
||||
title_watchdog: Watchdog
|
||||
title_hasnopapers: Sans papier
|
||||
title_weight: Poids
|
||||
tooltip_add_to_folder: Ajouter au dossier
|
||||
tooltip_archive: Archiver
|
||||
@@ -813,6 +817,7 @@ tooltip_export_to_report: Exporter dans un rapport
|
||||
tooltip_fire: Renvoyer
|
||||
tooltip_folder_add_directory: Ajouter une fiche au dossier
|
||||
tooltip_folder_add_document: Ajouter un document au dossier
|
||||
tooltip_id_card: Carte d'identité
|
||||
tooltip_merge: Fusionner
|
||||
tooltip_motorcycle_licence: Permis Moto
|
||||
tooltip_remove_from_folder: Retirer du dossier
|
||||
@@ -831,4 +836,4 @@ value_no_value: --
|
||||
value_no: Non
|
||||
value_yes: Oui
|
||||
Year: Année
|
||||
you_can: Vous pouvez
|
||||
you_can: Vous pouvez
|
||||
Reference in New Issue
Block a user