templates/front/pro/_pro-review.html.twig line 1

Open in your IDE?
  1. <!-- Modal notes g -->
  2. <div class="modal fade bd-example-modal-lg {{ type }}" id="view-notes" tabindex="-1" role="dialog" aria-labelledby="view-notes" aria-hidden="true">
  3.     <div class="modal-dialog modal-lg modal-dialog-centered" role="document">
  4.         <div class="modal-content">
  5.             <div class="modal-body">
  6.                 <div class="modal-title-wrap">
  7.                     <h5 class="modal-title">{{ "pro_page.notes" | trans }}</h5>
  8.                     <button type="button" class="close" data-dismiss="modal" aria-label="Close">
  9.                         <i class="fal fa-times"></i>
  10.                     </button>
  11.                 </div>
  12.                 {% set averageNotes = getAverageNotes(pro)%}
  13.                 {% set average = averageNotes.total %}
  14.                 {% if average != 0 %}
  15.                     <div class="row total-average">
  16.                         <div class="col-12">
  17.                             <p class="average-note">{{ average }}</p>
  18.                             {% for i in 1..5 %}
  19.                                 {% if average >= i %}
  20.                                     <i class="fas fa-star"></i>
  21.                                 {% else %}
  22.                                     {% if average > (i - 1) %}
  23.                                         <i class="fas fa-star-half-alt"></i>
  24.                                     {% else %}
  25.                                         <i class="far fa-star"></i>                                    
  26.                                     {% endif %}
  27.                                 {% endif %}
  28.                             {% endfor %}
  29.                         </div>
  30.                     </div>
  31.                     <div class="row organization-education">
  32.                         <div class="global-note-col">
  33.                             <span class="text">{{ "pro_page.organization" | trans }}:</span>
  34.                             <div class="start-notes">
  35.                             {% if averageNotes.organization != 0 %}
  36.                                 {% for i in 1..5 %}
  37.                                     {% if averageNotes.organization >= i %}
  38.                                         <i class="fas fa-star"></i>
  39.                                     {% else %}
  40.                                         {% if averageNotes.organization > (i - 1) %}
  41.                                             <i class="fas fa-star-half-alt"></i>
  42.                                         {% else %}
  43.                                             <i class="far fa-star"></i>                                    
  44.                                         {% endif %}
  45.                                     {% endif %}
  46.                                 {% endfor %}
  47.                             {% else %}
  48.                                 {% for i in 1..5 %}
  49.                                     {% if i <= 4 %}
  50.                                         <i class="fas fa-star grey-star"></i>
  51.                                     {% else %}
  52.                                         <i class="far fa-star grey-star"></i>
  53.                                     {% endif %}
  54.                                 {% endfor %}
  55.                             {% endif %}
  56.                             </div>
  57.                         </div>
  58.                         <div class="global-note-col">
  59.                             <span class="text">{{ "pro_page.education" | trans }}:</span>
  60.                             <div class="start-notes">
  61.                             {% if averageNotes.education != 0 %}
  62.                                 {% for i in 1..5 %}
  63.                                     {% if averageNotes.education >= i %}
  64.                                         <i class="fas fa-star"></i>
  65.                                     {% else %}
  66.                                         {% if averageNotes.education > (i - 1) %}
  67.                                             <i class="fas fa-star-half-alt"></i>
  68.                                         {% else %}
  69.                                             <i class="far fa-star"></i>                                    
  70.                                         {% endif %}
  71.                                     {% endif %}
  72.                                 {% endfor %}
  73.                             {% else %}
  74.                                 {% for i in 1..5 %}
  75.                                     {% if i <= 4 %}
  76.                                         <i class="fas fa-star grey-star"></i>
  77.                                     {% else %}
  78.                                         <i class="far fa-star grey-star"></i>
  79.                                     {% endif %}
  80.                                 {% endfor %}
  81.                             {% endif %}
  82.                             </div>
  83.                         </div>
  84.                     </div>
  85.                     <div class="notes">
  86.                         {% for note in getNotes(pro) %}
  87.                             
  88.                         <div class="row note">
  89.                             <div class="col-md-3 pl-0">
  90.                                 <p class="trainee">{{ note.trainee.fullname }}</p>
  91.                                 <p class="date">{{ note.createdAt | date('d/m/Y') }}</p>
  92.                                 <div class="total">
  93.                                     {% for i in 1..5 %}
  94.                                         {% if note.getTotalNote >= i %}
  95.                                             <i class="fas fa-star"></i>
  96.                                         {% else %}
  97.                                             {% if note.getTotalNote > (i - 1) %}
  98.                                                 <i class="fas fa-star-half-alt"></i>
  99.                                             {% else %}
  100.                                                 <i class="far fa-star"></i>                                    
  101.                                             {% endif %}
  102.                                         {% endif %}
  103.                                     {% endfor %}
  104.                                 </div>
  105.                             </div>
  106.                             <div class="col-md-9 note-details px-0">
  107.                                 <a href={{ path('view_course', { 'token':note.course.token }) }} class="course">{{ note.course.getTranslatedContent(app.request.locale).name | raw }}</a>
  108.                                 <p class="comment">{{ note.comment }}</p>
  109.                                 <div class="row organization-education-note">
  110.                                     <div class="col-6">
  111.                                         {{ "pro_page.organization" | trans }}
  112.                                         {% if note.organization != null %}
  113.                                             {% for i in 1..5 %}
  114.                                                 {% if note.organization >= i %}
  115.                                                     <i class="fas fa-star"></i>
  116.                                                 {% else %}
  117.                                                     {% if note.organization > (i - 1) %}
  118.                                                         <i class="fas fa-star-half-alt"></i>
  119.                                                     {% else %}
  120.                                                         <i class="far fa-star"></i>                                    
  121.                                                     {% endif %}
  122.                                                 {% endif %}
  123.                                             {% endfor %}
  124.                                         {% else %}
  125.                                             {% for i in 1..5 %}
  126.                                                 {% if i <= 4 %}
  127.                                                     <i class="fas fa-star grey-star"></i>
  128.                                                 {% else %}
  129.                                                     <i class="far fa-star grey-star"></i>
  130.                                                 {% endif %}
  131.                                             {% endfor %}
  132.                                         {% endif %}
  133.                                     </div>
  134.                                     <div class="col-6">
  135.                                         {{ "pro_page.education" | trans }}
  136.                                         {% if note.education != null %}
  137.                                             {% for i in 1..5 %}
  138.                                                 {% if note.education >= i %}
  139.                                                     <i class="fas fa-star"></i>
  140.                                                 {% else %}
  141.                                                     {% if note.education > (i - 1) %}
  142.                                                         <i class="fas fa-star-half-alt"></i>
  143.                                                     {% else %}
  144.                                                         <i class="far fa-star"></i>                                    
  145.                                                     {% endif %}
  146.                                                 {% endif %}
  147.                                             {% endfor %}
  148.                                         {% else %}
  149.                                             {% for i in 1..5 %}
  150.                                                 {% if i <= 4 %}
  151.                                                     <i class="fas fa-star grey-star"></i>
  152.                                                 {% else %}
  153.                                                     <i class="far fa-star grey-star"></i>
  154.                                                 {% endif %}
  155.                                             {% endfor %}
  156.                                         {% endif %}
  157.                                     </div>
  158.                                 </div>
  159.                             </div>
  160.                         </div>
  161.                            
  162.                         {% endfor %}
  163.                     </div>
  164.                 {% else %}
  165.                     <div class="note-box">
  166.                         <p class="empty-note">{{ "pro_page.no_note" | trans }}</p>
  167.                     </div>
  168.                 {% endif %}
  169.                 
  170.                    
  171.             </div>
  172.         </div>
  173.     </div>
  174. </div>