mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-13 13:54:23 +00:00
patch bundle changes
This commit is contained in:
parent
3f3bbc92d9
commit
1781bd31a0
@ -70,12 +70,18 @@ class ThirdPartyController extends Controller
|
|||||||
$nbThirdParties = $repository->countByMemberOfCenters($centers);
|
$nbThirdParties = $repository->countByMemberOfCenters($centers);
|
||||||
$pagination = $this->paginatorFactory->create($nbThirdParties);
|
$pagination = $this->paginatorFactory->create($nbThirdParties);
|
||||||
|
|
||||||
$thirdParties = $repository->findByMemberOfCenters($centers,
|
$pagination->setItemsPerPage(20);
|
||||||
$pagination->getCurrentPage()->getFirstItemNumber(),
|
|
||||||
$pagination->getItemsPerPage());
|
$thirdParties = $repository->findByMemberOfCenters(
|
||||||
|
$centers,
|
||||||
|
$pagination->getCurrentPage()->getFirstItemNumber(),
|
||||||
|
$pagination->getItemsPerPage()
|
||||||
|
);
|
||||||
|
dump($pagination);
|
||||||
|
|
||||||
return $this->render('ChillThirdPartyBundle:ThirdParty:index.html.twig', array(
|
return $this->render('ChillThirdPartyBundle:ThirdParty:index.html.twig', array(
|
||||||
'third_parties' => $thirdParties
|
'third_parties' => $thirdParties,
|
||||||
|
'pagination' => $pagination
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
13
Resources/views/ThirdParty/index.html.twig
vendored
13
Resources/views/ThirdParty/index.html.twig
vendored
@ -14,17 +14,17 @@
|
|||||||
<table>
|
<table>
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
|
<th style="width: 35px;"></th>
|
||||||
<th>{{ 'Name'|trans }}</th>
|
<th>{{ 'Name'|trans }}</th>
|
||||||
<th>{{ 'Active'|trans }}</th>
|
<th>{{ 'Category'|trans }}</th>
|
||||||
<th>{{ 'type'|trans }}</th>
|
|
||||||
<th> </th>
|
<th> </th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
{% for tp in third_parties %}
|
{% for tp in third_parties %}
|
||||||
<tr>
|
<tr>
|
||||||
|
<th>{{ (tp.active ? '<i class="fa fa-check chill-green">' : '<i class="fa fa-times chill-red">')|raw }}</th>
|
||||||
<td>{{ tp.name }}</td>
|
<td>{{ tp.name }}</td>
|
||||||
<td>{{ (tp.active ? '<i class="fa fa-check-square-o">' : '<i class="fa fa-square-o">')|raw }}</td>
|
|
||||||
{% set types = [] %}
|
{% set types = [] %}
|
||||||
{% for t in tp.type %}
|
{% for t in tp.type %}
|
||||||
{% set types = types|merge( [ ('chill_3party.key_label.'~t)|trans ] ) %}
|
{% set types = types|merge( [ ('chill_3party.key_label.'~t)|trans ] ) %}
|
||||||
@ -48,8 +48,13 @@
|
|||||||
{% endfor %}
|
{% endfor %}
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
|
{% if third_parties|length < pagination.getTotalItems %}
|
||||||
|
{{ chill_pagination(pagination) }}
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{% if is_granted('CHILL_3PARTY_3PARTY_CREATE') %}
|
{% if is_granted('CHILL_3PARTY_3PARTY_CREATE') %}
|
||||||
<ul class="record_actions">
|
<ul class="record_actions">
|
||||||
<li>
|
<li>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user