add a widget to display a person list on homepage

This commit is contained in:
2016-09-18 23:57:32 +02:00
parent 52fb5f56be
commit 2f5efd50e8
7 changed files with 271 additions and 0 deletions

View File

@@ -0,0 +1,13 @@
services:
chill_person.widget.person_list:
class: Chill\PersonBundle\Widget\PersonListWidget
arguments:
- "@chill.person.repository.person"
- "@chill.main.security.authorization.helper"
- "@security.token_storage"
# this widget is defined by the PersonListWidgetFactory
chill_person.widget.add_person:
class: Chill\PersonBundle\Widget\AddPersonWidget
tags:
- { name: chill_widget, alias: add_person, place: homepage }

View File

@@ -117,3 +117,8 @@ CHILL_PERSON_CREATE: Ajouter des personnes
#period
Period closed!: Période clôturée!
Pediod closing form is not valide: Le formulaire de fermeture n'est pas valide
#widget
## widget person_list
Accompanyied people: Personnes accompagnées

View File

@@ -0,0 +1,16 @@
{% import 'ChillPersonBundle:Person:macro.html.twig' as person %}
<div class="grid-8 centered">
<h2>{{ 'Accompanyied people'|trans }}</h2>
<table>
<tbody>
<tr>
{% for p in persons %}
{% if (loop.index - 1) % 3 == 0 %}
</tr><tr>
{% endif %}
<td>{{ person.render(p, true) }}</td>
{% endfor %}
</tr>
</tbody>
</table>
</div>