mirror of
https://github.com/ae-utbm/sith.git
synced 2024-12-02 05:51:15 +00:00
16 lines
565 B
Django/Jinja
16 lines
565 B
Django/Jinja
{% macro display_star(grade) -%}
|
|
|
|
{% if grade >= 0 %}
|
|
{% for i in range(5) %}
|
|
{% if i <= grade %}
|
|
<span class="fa fa-star pedagogy star-checked grade-with-star"></span>
|
|
{% else %}
|
|
<span class="fa fa-star pedagogy star-not-checked grade-with-star"></span>
|
|
{% endif %}
|
|
{% endfor %}
|
|
<span class="pedagogy grade-without-star">{{ grade }}/5</span>
|
|
{% else %}
|
|
<span class="grade-text"> {% trans %} not rated {% endtrans %} </span>
|
|
{% endif %}
|
|
|
|
{%- endmacro %} |