templates/web/common/vote_bar/vote_bar.twig line 1

Open in your IDE?
  1. {##
  2.  # Vote bar
  3.  #}
  4. <div class="vote-bar{% if this.isEditable() %} editable{% endif %}">
  5.   <div class="rating-stars">
  6.     <div class="stars-row">
  7.       {% for num in this.getStarsCount() %}
  8.         <div class="star-single"><span class="fa fa-star"></span></div>
  9.       {% endfor %}
  10.     </div>
  11.     <div class="stars-row full" style="width: {{ this.getPercent() }}%;">
  12.       {% for num in this.getStarsCount() %}
  13.         <div class="star-single"><span class="fa fa-star"></span></div>
  14.       {% endfor %}
  15.     </div>
  16.     {% if this.isEditable() %}
  17.     <div class="stars-row hovered" style="display: none;">
  18.       {% for num in this.getStarsCount() %}
  19.         <div class="star-single star-num-{{ num }}" data-rating="{{num}}" data-rating-label="{{ this.getRatingLabelFor(num) }}"><span class="fa fa-star"></span></div>
  20.       {% endfor %}
  21.     </div>
  22.     <input type="hidden" name="{{ this.getFieldName() }}" value="{{ this.getRating() }}" />
  23.     {% endif %}
  24.   </div>
  25.   {% if this.getRatingLabel() %}
  26.     <span class="rating-label">{{ this.getRatingLabel() }}</span>
  27.   {% endif %}
  28. </div>