diff --git a/templates/_includes/html/arrays/actor.html.twig b/templates/_includes/html/arrays/actor.html.twig new file mode 100644 index 0000000..fba6d89 --- /dev/null +++ b/templates/_includes/html/arrays/actor.html.twig @@ -0,0 +1,28 @@ + + + + + + + + + + + + {% for actor in actors %} + + + + + + + + + {% endfor %} + +
NomPrénomSurnomActifActions
{{ actor.firstName }}{{ actor.lastName }}{{ actor.nickname }}{% if actor.active %}Actif {% endif %}Editer{% if actorDeleteForm is defined %} + {% include '_includes/html/genericForm.html.twig' with {'form': actorDeleteForm, 'data': {actor: actor, variant: 'icon'}} only %} + {% endif %}
\ No newline at end of file diff --git a/templates/_includes/html/form/actors/delete.html.twig b/templates/_includes/html/form/actors/delete.html.twig index ba8d711..08348a7 100644 --- a/templates/_includes/html/form/actors/delete.html.twig +++ b/templates/_includes/html/form/actors/delete.html.twig @@ -12,6 +12,4 @@ {% elseif data.variant == 'full' %} {{ form_widget(form.submit, {label: 'Supprimer l\'acteur', attr: {class: "w-100"}})}} {% endif %} -

-

{{ form_end(form) }} \ No newline at end of file diff --git a/templates/actors/actors.html.twig b/templates/actors/actors.html.twig index 9249d62..01853bf 100644 --- a/templates/actors/actors.html.twig +++ b/templates/actors/actors.html.twig @@ -9,35 +9,7 @@

Acteurs

- - - - - - - - - - - - {% for actor in actors %} - - - - - - - - - {% endfor %} - -
NomPrénomSurnomActifActions
{{ actor.firstName }}{{ actor.lastName }}{{ actor.nickname }}{% if actor.active %}Actif - {% endif %}Editer{% include '_includes/html/genericForm.html.twig' with {'form': actorDeleteForm, 'data': {actor: actor, variant: 'icon'}} only %} -
+ {% include "_includes/html/arrays/actor.html.twig" with {actors: actors, actorDeleteForm: actorDeleteForm} only %}
@@ -47,7 +19,7 @@

Ajouter un acteur

- {% include '_includes/html/genericForm.html.twig' with {'form': actorAddForm} only %} + {% include '_includes/html/genericForm.html.twig' with {form: actorAddForm} only %}