[Absences] Display the realname
This commit is contained in:
parent
c1fdd1100c
commit
94f2d3a898
2 changed files with 10 additions and 5 deletions
|
@ -15,13 +15,18 @@ class AbsencesAction extends YesWikiAction
|
|||
$entryManager = $this->getService(EntryManager::class);
|
||||
$entries = $entryManager->search(['formsIds' => '6']);
|
||||
|
||||
|
||||
$grouped_entries = [];
|
||||
foreach ($entries as $entry) {
|
||||
$identifier = $entry['listefiche5bf_eleve'];
|
||||
$nom = $entryManager->getOne($identifier)['bf_nom'];
|
||||
if (!isset($grouped_entries[$identifier])) {
|
||||
$grouped_entries[$identifier] = [];
|
||||
$grouped_entries[$identifier] = [
|
||||
'nom' => $nom,
|
||||
'entries' => []
|
||||
];
|
||||
}
|
||||
$grouped_entries[$identifier][] = $entry;
|
||||
$grouped_entries[$identifier]['entries'][] = $entry;
|
||||
}
|
||||
|
||||
return $this->render('@meeo/absences.twig', [
|
||||
|
|
|
@ -1,13 +1,13 @@
|
|||
<div id="accordion" class="panel-group" role="tablist" aria-multiselectable="true">
|
||||
{% for identifier, entries in groups %}
|
||||
{% for identifier, group in groups %}
|
||||
<div class="panel">
|
||||
<button id="head_{{ identifier }}" class="panel-heading collapsed" data-parent="#accordion" data-target="#{{ identifier }}" data-toggle="collapse" aria-expanded="false">
|
||||
<h4 class="panel-title">{{ identifier }}</h4>
|
||||
<h4 class="panel-title">{{ group['nom'] }}</h4>
|
||||
</button>
|
||||
<div id="{{ identifier }}" class="panel-collapse collapse" aria-expanded="false">
|
||||
<div class="panel-body">
|
||||
<ul>
|
||||
{% for entry in entries %}
|
||||
{% for entry in group['entries'] %}
|
||||
<li>
|
||||
<div>
|
||||
{{ entry['bf_date_debut_evenement'] }}
|
||||
|
|
Loading…
Reference in a new issue