diff --git a/actions/AbsencesAction.php b/actions/AbsencesAction.php index 60126a1..803d279 100644 --- a/actions/AbsencesAction.php +++ b/actions/AbsencesAction.php @@ -15,7 +15,6 @@ class AbsencesAction extends YesWikiAction $entryManager = $this->getService(EntryManager::class); $entries = $entryManager->search(['formsIds' => '6']); - $grouped_entries = []; foreach ($entries as $entry) { $identifier = $entry['listefiche5bf_eleve']; @@ -29,7 +28,7 @@ class AbsencesAction extends YesWikiAction $grouped_entries[$identifier]['entries'][] = $entry; } - return $this->render('@meeo/absences.twig', [ + return $this->render('@meeo/edu_absences.twig', [ "groups" => $grouped_entries, ]); } diff --git a/templates/absences.twig b/templates/edu_absences.twig similarity index 61% rename from templates/absences.twig rename to templates/edu_absences.twig index 0ee6d00..27d42c3 100644 --- a/templates/absences.twig +++ b/templates/edu_absences.twig @@ -5,16 +5,7 @@

{{ group['nom'] }}

{% endfor %} diff --git a/templates/eleve_absences.twig b/templates/eleve_absences.twig new file mode 100644 index 0000000..2d5e581 --- /dev/null +++ b/templates/eleve_absences.twig @@ -0,0 +1,10 @@ +
+ {% for entry in group['entries'] %} +
+
{{ entry['bf_date_debut_evenement'] }}
+ {% if entry['bf_commentaire']|default %} +

{{ entry['bf_commentaire'] }}

+ {% endif %} +
+ {% endfor %} +