templates/website/teacher/teacher-item-section.html.twig line 1

Open in your IDE?
  1. {% from 'utils.html.twig' import ico, imgUpload %}
  2. {% for teacher in teachers %}
  3.     {% if layout == 'slider' %}<div>{% endif %}
  4.         <div class="item-professor item-professor--{{ layout }}">
  5.             <header>
  6.                 {% if layout == 'lista' %}
  7.                     <div class="capa">
  8.                         {# USER #}
  9.                         {% if teacher.cover %}
  10.                             {{ imgUpload(teacher.cover, enum('AbstractEnum::PATH_COVERS_PROFILE'), 'user-profile-cover-box') }}
  11.                         {# DEFAULT #}
  12.                         {% else %}
  13.                             <img src="{{ cdn }}img/cover_default.jpg" alt="" onerror="imgError(this)">
  14.                         {% endif %}
  15.                     </div>
  16.                 {% endif %}
  17.                 <div class="foto">
  18.                     {{ imgUpload(teacher.photo, enum('AbstractEnum::PATH_PROFILES'), 'profile', teacher.name) }}
  19.                 </div>
  20.                 <h3 class="title">{{ teacher.name }}</h3>
  21.                 {% if layout == 'slider' %}
  22.                     {% if teacher.occupation %}
  23.                         <p class="cargo">{{ ico('briefcase') }}{{ teacher.occupation }}</p>
  24.                     {% endif %}
  25.                 {% endif %}
  26.             </header>
  27.             <div class="content">        
  28.                 <div class="desc">
  29.                     {% if teacher.biography is not empty %}
  30.                         {{ teacher.biography|raw }}
  31.                     {% else %}
  32.                         <p>{{ getLanguage('teacher_biogaphy', 'teachers') }}</p>
  33.                     {% endif %}
  34.                 </div>
  35.                 <footer>
  36.                     {% include 'website/includes/sociais.html.twig' with { profile: teacher } %}
  37.                     <a href="{{ path('teacherProfile', { username: teacher.username }) }}" class="link-perfil">{{ getLanguage('view_profile', 'teachers') }}&nbsp;{{ ico('log-in') }}</a>
  38.                 </footer>
  39.             </div>
  40.         </div>
  41.     {% if layout == 'slider' %}</div>{% endif %}
  42. {% endfor %}