diff --git a/Controller/ThirdPartyController.php b/Controller/ThirdPartyController.php index dd03bf5a0..7e98b93f5 100644 --- a/Controller/ThirdPartyController.php +++ b/Controller/ThirdPartyController.php @@ -70,12 +70,18 @@ class ThirdPartyController extends Controller $nbThirdParties = $repository->countByMemberOfCenters($centers); $pagination = $this->paginatorFactory->create($nbThirdParties); - $thirdParties = $repository->findByMemberOfCenters($centers, - $pagination->getCurrentPage()->getFirstItemNumber(), - $pagination->getItemsPerPage()); + $pagination->setItemsPerPage(20); + + $thirdParties = $repository->findByMemberOfCenters( + $centers, + $pagination->getCurrentPage()->getFirstItemNumber(), + $pagination->getItemsPerPage() + ); + dump($pagination); return $this->render('ChillThirdPartyBundle:ThirdParty:index.html.twig', array( - 'third_parties' => $thirdParties + 'third_parties' => $thirdParties, + 'pagination' => $pagination )); } diff --git a/Resources/views/ThirdParty/index.html.twig b/Resources/views/ThirdParty/index.html.twig index bd3d58f55..89b62f567 100644 --- a/Resources/views/ThirdParty/index.html.twig +++ b/Resources/views/ThirdParty/index.html.twig @@ -14,17 +14,17 @@
{{ 'Name'|trans }} | -{{ 'Active'|trans }} | -{{ 'type'|trans }} | +{{ 'Category'|trans }} | ||
---|---|---|---|---|---|
{{ (tp.active ? '' : '')|raw }} | {{ tp.name }} | -{{ (tp.active ? '' : '')|raw }} | {% set types = [] %} {% for t in tp.type %} {% set types = types|merge( [ ('chill_3party.key_label.'~t)|trans ] ) %} @@ -48,8 +48,13 @@ {% endfor %}