mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-24 08:33:49 +00:00
add a widget to display a person list on homepage
This commit is contained in:
13
Resources/config/services/widgets.yml
Normal file
13
Resources/config/services/widgets.yml
Normal 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 }
|
@@ -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
|
16
Resources/views/Widget/homepage_person_list.html.twig
Normal file
16
Resources/views/Widget/homepage_person_list.html.twig
Normal 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>
|
Reference in New Issue
Block a user