templates/website/lesson/lesson-demo.html.twig line 1

Open in your IDE?
  1. {% extends 'website/main.template.html.twig' %}
  2. {% from 'utils.html.twig' import ico, moeda, imgUpload, btnAddCart %}
  3. {% block body %}
  4.     {% include 'website/includes/search-section.html.twig' %}
  5.     {% set infoOffer = getInfoAccessProductOffer(productOffer) %}
  6.     {% embed 'website/includes/page-title.html.twig' with { pageTitle: lesson.title }%}
  7.         {% block migalhas %}
  8.             <a href="{{ path('home') }}">{{ getLanguage('home', 'lesson_demo') }}</a>&ensp;/&ensp;<a href="{{ path('home') }}">{{ getLanguage('course', 'lesson_demo') }}</a>&ensp;/&ensp;<span>{{ lesson.title }}</span>
  9.         {% endblock %}
  10.     {% endembed %}
  11.     <div class="aula-demo">
  12.         {# PLAYER #}
  13.         <div class="demo-player">
  14.             {# FRAME #}
  15.             <div class="container">
  16.                 {% include 'website/includes/frame-play.html.twig' with { library: lesson.library } %}
  17.             </div>
  18.         </div>
  19.         <div class="container">
  20.             <div class="aula-info">
  21.                 {# PROFESSOR #}
  22.                 <div class="professor">
  23.                     <div class="foto">
  24.                         {% if lesson.user.photo %}
  25.                             <a href="{{ path('userProfilePublic', { username: lesson.user.username }) }}">
  26.                                 {{ imgUpload(lesson.user.photo, enum('AbstractEnum::PATH_PROFILES'), 'user-profile', lesson.user.name) }}
  27.                             </a>
  28.                         {% endif %}
  29.                     </div>
  30.                     <div>
  31.                         <a href="{{ path('userProfilePublic', { username: lesson.user.username }) }}">
  32.                             <h4>{{ lesson.user.name }}</h4>
  33.                             <p class="desc">{{ lesson.user.biography }}</p>
  34.                         </a>
  35.                         {% include 'website/includes/sociais.html.twig' with { profile: lesson.user } %}
  36.                     </div>
  37.                 </div>
  38.                 {# MATRICULAR #}
  39.                 <div class="matricula">
  40.                     <p class="tit">
  41.                         {% if productOffer.saleOption == enum('ProductOfferEnum::FREE') %}
  42.                             {{ getLanguage('access_full_course_free', 'lesson_demo') }}
  43.                         {% elseif infoOffer.allowBuyNow == false and infoOffer.isFree == false %}
  44.                             {{ getLanguage('access_wishlist', 'lesson_demo') }}
  45.                         {% else %}
  46.                             {{ getLanguage('access_full_course', 'lesson_demo') }}
  47.                         {% endif %}
  48.                     </p>
  49.                     <div class="desc">
  50.                         {% if infoOffer.allowBuyNow == true or infoOffer.userHasProduct == true or infoOffer.isFree == true %}
  51.                             <div class="price">
  52.                                 {# FREE #}
  53.                                 {% if productOffer.saleOption == enum('ProductOfferEnum::FREE') %}
  54.                                     <p class="free">{{ getLanguage('free', 'lesson_demo') }}</p>
  55.                                 {# NOT FREE #}
  56.                                 {% else %}
  57.                                         {% if parcelInfo.maxInstallments > 1 %}
  58.                                             <span class="prazo">
  59.                                                 {{ parcelInfo.maxInstallments }}&thinsp;&times; {{ getLanguage('of', 'lesson_demo') }} {{ productOffer.currencySymbol }}
  60.                                                 <b>{{ moeda(parcelInfo.parcelPrice, false) }}</b>
  61.                                             </span>
  62.                                             <span class="prazo-vista">{{ moeda(productOffer.getPriceRealCopy()) }} {{ getLanguage('in_cash', 'lesson_demo') }}</span>
  63.                                         {% else %}
  64.                                             <span class="vista">{{ productOffer.currencySymbol }} 
  65.                                                 <b>{{ moeda(productOffer.getPriceRealCopy(), false) }}</b> 
  66.                                                 <span>{{ getLanguage('in_cash', 'lesson_demo') }}</span>
  67.                                             </span>
  68.                                         {% endif %}
  69.                                 {% endif %}
  70.                             </div>
  71.                         {% endif %}
  72.                         <div class="actions">
  73.                             {{
  74.                                 btnAddCart(
  75.                                 getLanguage(infoOffer.text, 'product'), 
  76.                                 productOffer, 
  77.                                 infoOffer, 
  78.                                 'enroll',
  79.                                 )
  80.                             }}
  81.                             <button class="back" onclick="window.open(document.referrer,'_self')">{{ getLanguage('back', 'lesson_demo') }}</button>
  82.                         </div>
  83.                     </div>
  84.                 </div>
  85.             </div>
  86.         </div>
  87.         {# MÓDULOS #}
  88.         {% if lessonModules %}
  89.             <div class="container">
  90.                 {% include 'website/product/product-detail-course-content-section.html.twig' with { show: 3, open: 1 } %}
  91.             </div>
  92.         {% endif %}
  93.         {# TESTIMONIALS #}
  94.         <div class="container mobile--wid">
  95.             {% include 'website/course/course-testimonial-section.html.twig' with { layout: 'lesson' } %}
  96.         </div>
  97.         {# SUGESTÃO DO UPSELL #}
  98.         {% if productOfferSuggestions is not empty %}
  99.             <div class="container">
  100.                 {% include 'website/product/product-detail-upsell-section.html.twig' with { suggestions: productOfferSuggestions } %}
  101.             </div>
  102.         {% endif %}
  103.     </div>
  104.     {# MODAL -- WAITLIST #}
  105.     {% include 'website/includes/modal-waitlist.html.twig' with { languageKey: 'lesson_demo' } %}
  106.     {# MODAL -- FAST USER REGISTER #}
  107.     {% include 'website/includes/modal-register.html.twig' with { languageKey: 'lesson_demo' } %}
  108.     {# MODAL -- TERMOS DE USO #}
  109.     {% embed "website/includes/modal.html.twig" with {'id': 'modal-terms-of-use', 'title': getLanguage('ready_terms', 'register'), 'back': true } %}
  110.         {% block content %}
  111.             {{ getConfig('contract')|raw }}
  112.         {% endblock %}
  113.     {% endembed %}
  114. {% endblock %}
  115. {% block javascripts %}
  116.     {{ parent() }}
  117.     {# EAD PLAYER #}
  118.     {% if lesson.library.type in [
  119.         enum('LibraryEnum::CONTENT_AUDIO'),
  120.         enum('LibraryEnum::CONTENT_VIDEO_FILE'),
  121.     ]%}
  122.         <script src="{{ path('eadPlayerNew') }}" type="text/javascript"></script>
  123.     {% endif %}
  124. {% endblock %}