[Eleves] debut d'affichage
This commit is contained in:
parent
bcb1888700
commit
2b5cc846c2
3 changed files with 36 additions and 0 deletions
23
actions/ElevesAction.php
Normal file
23
actions/ElevesAction.php
Normal 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]);
|
||||||
|
}
|
||||||
|
}
|
|
@ -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
10
templates/edu_eleves.twig
Normal 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>
|
Loading…
Reference in a new issue