[Absence] Move eleve_absences in a specific twig
This commit is contained in:
parent
8a18c01cf9
commit
33292c554a
3 changed files with 12 additions and 12 deletions
|
@ -15,7 +15,6 @@ class AbsencesAction extends YesWikiAction
|
||||||
$entryManager = $this->getService(EntryManager::class);
|
$entryManager = $this->getService(EntryManager::class);
|
||||||
$entries = $entryManager->search(['formsIds' => '6']);
|
$entries = $entryManager->search(['formsIds' => '6']);
|
||||||
|
|
||||||
|
|
||||||
$grouped_entries = [];
|
$grouped_entries = [];
|
||||||
foreach ($entries as $entry) {
|
foreach ($entries as $entry) {
|
||||||
$identifier = $entry['listefiche5bf_eleve'];
|
$identifier = $entry['listefiche5bf_eleve'];
|
||||||
|
@ -29,7 +28,7 @@ class AbsencesAction extends YesWikiAction
|
||||||
$grouped_entries[$identifier]['entries'][] = $entry;
|
$grouped_entries[$identifier]['entries'][] = $entry;
|
||||||
}
|
}
|
||||||
|
|
||||||
return $this->render('@meeo/absences.twig', [
|
return $this->render('@meeo/edu_absences.twig', [
|
||||||
"groups" => $grouped_entries,
|
"groups" => $grouped_entries,
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
|
@ -5,16 +5,7 @@
|
||||||
<h4 class="panel-title">{{ group['nom'] }}</h4>
|
<h4 class="panel-title">{{ group['nom'] }}</h4>
|
||||||
</button>
|
</button>
|
||||||
<div id="{{ identifier }}" class="panel-collapse collapse in" aria-expanded="false">
|
<div id="{{ identifier }}" class="panel-collapse collapse in" aria-expanded="false">
|
||||||
<div class="panel-body">
|
{% include '@meeo/eleve_absences.twig' %}
|
||||||
{% for entry in group['entries'] %}
|
|
||||||
<div>
|
|
||||||
<h5>{{ entry['bf_date_debut_evenement'] }}</h5>
|
|
||||||
{% if entry['bf_commentaire']|default %}
|
|
||||||
<p>{{ entry['bf_commentaire'] }}</p>
|
|
||||||
{% endif %}
|
|
||||||
</div>
|
|
||||||
{% endfor %}
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{% endfor %}
|
{% endfor %}
|
10
templates/eleve_absences.twig
Normal file
10
templates/eleve_absences.twig
Normal file
|
@ -0,0 +1,10 @@
|
||||||
|
<div class="panel-body">
|
||||||
|
{% for entry in group['entries'] %}
|
||||||
|
<div>
|
||||||
|
<h5>{{ entry['bf_date_debut_evenement'] }}</h5>
|
||||||
|
{% if entry['bf_commentaire']|default %}
|
||||||
|
<p>{{ entry['bf_commentaire'] }}</p>
|
||||||
|
{% endif %}
|
||||||
|
</div>
|
||||||
|
{% endfor %}
|
||||||
|
</div>
|
Loading…
Reference in a new issue