[Eleves] debut d'affichage

This commit is contained in:
mckmonster 2024-07-17 11:31:56 +02:00
parent bcb1888700
commit 2b5cc846c2
3 changed files with 36 additions and 0 deletions

23
actions/ElevesAction.php Normal file
View file

@ -0,0 +1,23 @@
<?php
use YesWiki\Core\YesWikiAction;
use YesWiki\Bazar\Service\EntryManager;
class ElevesAction extends YesWikiAction
{
public function formatArguments($arg)
{
return [];
}
public function run()
{
$meeo_config = $this->params->get('meeo');
$formId = $meeo_config['elevesFormId'];
$entryManager = $this->getService(EntryManager::class);
$eleves = $entryManager->search(['formsIds' => $formId]);
return $this->render('@meeo/edu_eleves.twig', ['eleves' => $eleves]);
}
}

View file

@ -6,4 +6,7 @@ actions:
notes: notes:
label: Notes label: Notes
description: Notes des élèves description: Notes des élèves
eleves:
label: Eleves
description: Liste des élèves
# La liste des actions de ce groupe # La liste des actions de ce groupe

10
templates/edu_eleves.twig Normal file
View file

@ -0,0 +1,10 @@
<div>
{% for eleve in eleves|sort %}
{% if eleve['listeListeClassesbf_classe'] != 'aucune' %}
<div class="row">
<div class="col-sm-8">{{ eleve['bf_nom'] }}</div>
<div class="col-sm-4">{{ eleve['listeListeClassesbf_classe'] }}</div>
</div>
{% endif %}
{% endfor %}
</div>