mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-10-04 20:39:40 +00:00
Merge branch 'master' into migrate_to_sf72
# Conflicts: # src/Bundle/ChillEventBundle/Controller/EventController.php # src/Bundle/ChillEventBundle/Controller/ParticipationController.php # src/Bundle/ChillEventBundle/DependencyInjection/ChillEventExtension.php # src/Bundle/ChillEventBundle/Entity/Event.php # src/Bundle/ChillEventBundle/Form/EventType.php # src/Bundle/ChillEventBundle/Menu/AdminMenuBuilder.php # src/Bundle/ChillEventBundle/config/services.yaml # src/Bundle/ChillEventBundle/config/services/controller.yaml # src/Bundle/ChillMainBundle/Resources/views/Menu/user.html.twig # src/Bundle/ChillPersonBundle/Controller/AccompanyingPeriodWorkDuplicateController.php # src/Bundle/ChillPersonBundle/Controller/PersonController.php # src/Bundle/ChillPersonBundle/Form/PersonType.php
This commit is contained in:
@@ -11,6 +11,7 @@ declare(strict_types=1);
|
||||
|
||||
namespace Chill\PersonBundle\Controller;
|
||||
|
||||
use Chill\MainBundle\Entity\User;
|
||||
use Chill\MainBundle\Pagination\PaginatorFactory;
|
||||
use Chill\MainBundle\Templating\Listing\FilterOrderHelper;
|
||||
use Chill\MainBundle\Templating\Listing\FilterOrderHelperFactoryInterface;
|
||||
@@ -130,6 +131,7 @@ final class AccompanyingCourseWorkController extends AbstractController
|
||||
$this->denyAccessUnlessGranted(AccompanyingPeriodWorkVoter::SEE, $period);
|
||||
|
||||
$filter = $this->buildFilterOrder($period);
|
||||
$currentUser = $this->getUser();
|
||||
|
||||
$filterData = [
|
||||
'types' => $filter->hasEntityChoice('typesFilter') ? $filter->getEntityChoiceData('typesFilter') : [],
|
||||
@@ -138,6 +140,10 @@ final class AccompanyingCourseWorkController extends AbstractController
|
||||
'user' => $filter->getUserPickerData('userFilter'),
|
||||
];
|
||||
|
||||
if ($filter->getSingleCheckboxData('currentUserFilter') && $currentUser instanceof User) {
|
||||
$filterData['currentUser'] = $currentUser;
|
||||
}
|
||||
|
||||
$totalItems = $this->workRepository->countByAccompanyingPeriod($period);
|
||||
$paginator = $this->paginator->create($totalItems);
|
||||
|
||||
@@ -201,6 +207,8 @@ final class AccompanyingCourseWorkController extends AbstractController
|
||||
->addUserPicker('userFilter', 'accompanying_course_work.user_filter', ['required' => false])
|
||||
;
|
||||
|
||||
$filterBuilder->addSingleCheckbox('currentUserFilter', 'accompanying_course_work.my_actions_filter');
|
||||
|
||||
return $filterBuilder->build();
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user