Compare commits

..

3 commits

Author SHA1 Message Date
mckmonster
202ce66ed6 [absences@]Sort liste des élèves 2024-07-10 11:44:03 +02:00
mckmonster
61267ba243 - Fix de l'affichage des absences
- Sort pour afficher les plus récentes au plus anciennes
2024-07-10 11:29:54 +02:00
mckmonster
a3a179827b Fix link to Eleve 2024-07-10 11:09:20 +02:00
3 changed files with 13 additions and 7 deletions

View file

@ -15,7 +15,7 @@ class AbsencesAction extends YesWikiAction
{ {
$meeo_config = $this->params->get('meeo'); $meeo_config = $this->params->get('meeo');
$formId = $meeo_config['absences']['formId']; $formId = $meeo_config['absences']['formId'];
$eleveIdentifier = 'listefiche'.$meeo_config['elevesFormId']; $eleveIdentifier = 'listefiche'.$meeo_config['elevesFormId'].'bf_eleve';
$groupeEE = $meeo_config['groupeEE']; $groupeEE = $meeo_config['groupeEE'];
$entryManager = $this->getService(EntryManager::class); $entryManager = $this->getService(EntryManager::class);

View file

@ -1,6 +1,6 @@
{% if groups|default %} {% if groups|default %}
<div id="accordion" class="panel-group" role="tablist" aria-multiselectable="true"> <div id="accordion" class="panel-group" role="tablist" aria-multiselectable="true">
{% for identifier, group in groups %} {% for identifier, group in groups|sort %}
<div class="panel panel-default"> <div class="panel panel-default">
<button id="head_{{ identifier }}" class="panel-heading collapsed" data-parent="#accordion" data-target="#{{ identifier }}" data-toggle="collapse" aria-expanded="false"> <button id="head_{{ identifier }}" class="panel-heading collapsed" data-parent="#accordion" data-target="#{{ identifier }}" data-toggle="collapse" aria-expanded="false">
<h4 class="panel-title">{{ group['nom'] }}</h4> <h4 class="panel-title">{{ group['nom'] }}</h4>

View file

@ -1,12 +1,18 @@
<div class="panel-body"> <div class="panel-body">
{% for entry in entries %} {% for entry in entries|sort((a,b) => a['bf_date_debut'] <=> b['bf_date_debut'])|reverse %}
<div> <div>
<h5>{{ entry['bf_date_debut_evenement']|date("m/d/Y H:i") }} - {{ entry['bf_date_fin_evenement']|date("m/d/Y H:i") }}</h5> {% if entry['bf_date_debut'] == entry['bf_date_fin'] %}
{% if entry['bf_commentaire']|default %} <h5>{{ entry['bf_date_debut']|date("m/d/Y") }}</h5>
<p>{{ entry['bf_commentaire'] }}</p>
{% else %} {% else %}
<p>Aucune information</p> <h5>{{ entry['bf_date_debut']|date("m/d/Y H:i") }} - {{ entry['bf_date_fin']|date("m/d/Y H:i") }}</h5>
{% endif %} {% endif %}
<div>
{% if entry['bf_commentaire']|default %}
{{ entry['bf_commentaire'] }}
{% else %}
Aucune information
{% endif %}
</div>
</div> </div>
{% endfor %} {% endfor %}
</div> </div>