[Notes] Filtrage des affichages
- Rajout d'icones - Affichage plus propre
This commit is contained in:
parent
4a5ad7b40a
commit
262715db5e
2 changed files with 21 additions and 7 deletions
|
@ -1,14 +1,16 @@
|
|||
<div id="accordion" class="panel-group" role="tablist" aria-multiselectable="true">
|
||||
{% for identifier, eleve in eleves|sort %}
|
||||
{% set filteredEntries = entries|filter(e => e['listefiche5bf_eleve'] == identifier) %}
|
||||
{% if filteredEntries|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">
|
||||
<h4 class="panel-title">{{ eleve['bf_nom'] }}</h4>
|
||||
</button>
|
||||
<div id="{{ identifier }}" class="panel-collapse collapse in" aria-expanded="false">
|
||||
{% set filteredEntries = entries|filter(e => e['listefiche5bf_eleve'] == identifier) %}
|
||||
|
||||
<div id="{{ identifier }}" class="panel-collapse collapse in" style="padding:5px" aria-expanded="false">
|
||||
|
||||
{% include '@meeo/eleve_notes.twig' with { 'entries' : filteredEntries } %}
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
</div>
|
|
@ -1,16 +1,28 @@
|
|||
<div id="accordion" class="panel-group" role="tablist" aria-multiselectable="true">
|
||||
{% for identifier, matiere in matieres['label'] %}
|
||||
{% set filteredEntries = entries|filter(e => e['listeListeMatièrebf_matiere'] == identifier) %}
|
||||
{% if filteredEntries|default %}
|
||||
<div class="panel panel-primary">
|
||||
<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>
|
||||
</button>
|
||||
<div id="{{ identifier }}" class="panel-collapse collapse in" aria-expanded="false">
|
||||
{% for idEntry, entry in entries|filter(e => e['listeListeMatièrebf_matiere'] == identifier) -%}
|
||||
<div>
|
||||
<div id="{{ identifier }}" class="panel-collapse collapse in" style="padding:5px" aria-expanded="false">
|
||||
{% for idEntry, entry in filteredEntries %}
|
||||
<span>
|
||||
{% if entry['bf_note'] >= 20 %}
|
||||
<i class="fa fa-star" style="color:gold"></i>
|
||||
{% elseif entry['bf_note'] >= 15 %}
|
||||
<i class="fa fa-heart" style="color:red"></i>
|
||||
{% elseif entry['bf_note'] >= 12 %}
|
||||
<i class="fa fa-smile" style="color:green"></i>
|
||||
{% elseif entry['bf_note'] >= 9 %}
|
||||
<i class="fa fa-thumbs-up" style="color:green"></i>
|
||||
{% endif %}
|
||||
{{ entry['bf_intitule'] }} : {{ entry['bf_note'] }}
|
||||
</div>
|
||||
</span>
|
||||
{% endfor %}
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
</div>
|
Loading…
Reference in a new issue