templates/Partial/TwigExtension/rating_display.html.twig line 1

Open in your IDE?
  1. {% if options.hide_when_null is not defined or options.hide_when_null is same as false or nb > 0 %}
  2. <div class="rating-stars-container{% if options.class is defined %} {{ options.class }}{% endif %}">
  3. {% if options.display_value is not defined or options.display_value is not same as false %}
  4. <span class="displayed-value">{{ nb_value }}</span>
  5. {% endif %}
  6. {% if nb > 0 %}
  7. {% for fullStar in 1..nb %}
  8. <i class="fas fa-star" {% if options.color is defined %} style="color: {{ options.color }}" {% endif %}></i>
  9. {% endfor %}
  10. {% endif %}
  11. {% set nbStarLeft = nbMax - nb %}
  12. {% if (nbStarLeft > 0) %}
  13. {% for emptyStar in 1..nbStarLeft %}
  14. <i class="fal fa-star" {% if options.color is defined %} style="color: {{ options.color }}" {% endif %}></i>
  15. {% endfor %}
  16. {% endif %}
  17. </div>
  18. {% endif %}