[Notes] Fix collapse

This commit is contained in:
mckmonster 2024-07-13 21:03:41 +02:00
parent 768ec94d92
commit 7be2b9ce77
2 changed files with 25 additions and 13 deletions

View file

@ -1,15 +1,15 @@
<div id="accordion" class="panel-group" role="tablist" aria-multiselectable="true"> <div id="accordion_bulletins" class="panel-group">
{% for bulletin in bulletins|sort %} {% for bulletin in bulletins|sort %}
{% if bulletin.isVisible() %} {% if bulletin.isVisible() %}
<div class="panel panel-default"> <div class="panel panel-default">
<button id="head_{{ bulletin.getId() }}" class="panel-heading collapsed" data-parent="#accordion" data-target="#{{ bulletin.getId() }}" data-toggle="collapse" aria-expanded="false"> <button id="head_{{ bulletin.getId() }}" class="panel-heading collapsed" data-parent="#accordion_bulletins" data-target="#{{ bulletin.getId() }}" data-toggle="collapse">
<h4 class="panel-title">{{ bulletin.getNom() }}</h4> <h4 class="panel-title">{{ bulletin.getNom() }}</h4>
<p> <div class="row">
{{ bulletin.getClass() }}<br/> <div class="col-sm-9">{{ bulletin.getClass() }}</div>
Moyenne Générale : {{ bulletin.getMoyenne() }} <div class="col-sm-3">Moyenne Générale : {{ bulletin.getMoyenne() }}</div>
</p> </div>
</button> </button>
<div id="{{ bulletin.getId() }}" class="panel-collapse collapse in" style="padding:5px" aria-expanded="false"> <div id="{{ bulletin.getId() }}" class="panel-collapse collapse" style="padding:5px">
{% include '@meeo/eleve_notes.twig' with { 'bulletin' : bulletin } %} {% include '@meeo/eleve_notes.twig' with { 'bulletin' : bulletin } %}
</div> </div>
</div> </div>

View file

@ -1,13 +1,19 @@
<div id="accordion" class="panel-group" role="tablist" aria-multiselectable="true"> <div id="accordion_{{ bulletin.getId() }}_matiere" class="panel-group">
{% for matiere in bulletin.getMatieres() %} {% for matiere in bulletin.getMatieres() %}
<div class="panel panel-primary"> <div class="panel panel-primary">
<button id="head_{{ bulletin.getId() }}_{{ matiere.getId() }}" class="panel-heading collapsed" data-parent="#accordion" data-target="#{{ bulletin.getId() }}_{{ matiere.getId() }}" data-toggle="collapse" aria-expanded="false"> <button id="head_{{ bulletin.getId() }}_{{ matiere.getId() }}" class="panel-heading collapsed" data-parent="#accordion_{{ bulletin.getId() }}_matiere" data-target="#{{ bulletin.getId() }}_{{ matiere.getId() }}" data-toggle="collapse">
<h4 class="panel-title">{{ matiere.getNom() }}</h4> <h4 class="panel-title">{{ matiere.getNom() }}</h4>
<p>Moyenne : {{ matiere.getMoyenne() }}</p> <div col="row">
<div class="col-sm-10"></div>
<div class="col-sm-2">
Moyenne : {{ matiere.getMoyenne() }}
</div>
</div>
</button> </button>
<div id="{{ bulletin.getId() }}_{{ matiere.getId() }}" class="panel-collapse collapse in" style="padding:5px" aria-expanded="false"> <div id="{{ bulletin.getId() }}_{{ matiere.getId() }}" class="panel-collapse collapse in" style="padding:5px">
{% for note in matiere.getNotes() %} {% for note in matiere.getNotes() %}
<div> <div class="row">
<div class="col-sm-1">
{% if note.getNote() >= 20 %} {% if note.getNote() >= 20 %}
<i class="fa fa-star" style="color:gold"></i> <i class="fa fa-star" style="color:gold"></i>
{% elseif note.getNote() >= 15 %} {% elseif note.getNote() >= 15 %}
@ -17,7 +23,13 @@
{% elseif note.getNote() >= 9 %} {% elseif note.getNote() >= 9 %}
<i class="fa fa-thumbs-up" style="color:green"></i> <i class="fa fa-thumbs-up" style="color:green"></i>
{% endif %} {% endif %}
{{ note.getIntitule() }} : {{ note.getNote() }} </div>
<div class="col-sm-10">
{{ note.getIntitule() }}
</div>
<div class="col-sm-1">
{{ note.getNote() }}
</div>
</div> </div>
{% endfor %} {% endfor %}
</div> </div>